• Stars
    star
    105
  • Rank 318,678 (Top 7 %)
  • Language
    HTML
  • License
    Other
  • Created over 2 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Embed Embed source code in png files

PNGSource

A tool that makes it easy to embed source code in a PNG file. It can also read source code previously embedded, of course!

Screenshot

Benefits

I detest losing source code, and I like creating diagrams using a descriptive language (be it YAML, UML, Python...) -- Diagrams.com (formerly Draw.io) lets users save their code alongside the generated PNG files. So, that's our prior art! (I tried to remain compatible with their encoding)

What it does

If you provide PNGSource with the path to an existing PNG file (or drag/drop) it will display that file's decoded text chunk, if it exists.

You can also provide a PNG file and a text file (or enter text manually) and embed the text in the file, in a text chunk.

What it does not do

There is no stenography involved here. Although I am planning on performing a few tests to see if this would let me embed a reasonable amount of code in any image format.

Using

Simply download a CLI tool for your platform, or the GUI application (installer on Windows, disk image on MacOs, standalone on Linux)

Run the cli command with --help to see what you can do. The GUI app should be self explanatory (I hope!)

If you are running the application on MacOS and are getting an error message, please check the FAQ section.

Building

Only if you plan on contributing or need a different platform:

make platforms VERSION=<semantic version>

or

make platforms BRANCH=<git branch> VERSION=<semantic version>

or

make platforms GO=<go version> BRANCH=<git branch> VERSION=<semantic version>

Full-on release:

make release instead of make platforms

Build dependencies

  • hfsplus (OS package)
  • hfsplus support in your kernel... you may have to rebuild a new kernel with CONFIG_HFS_FS=y
  • pkg-config (OS package)
  • libgtk-3-dev (OS package)
  • libwebkit2gtk-4.0-dev (OS package)
  • zip (OS package)
  • nsis nsis-doc nsis-pluginapi (OS packages, Windows packager)
  • yarn: yarn install

FAQ

Is this an Electron app?

No. It is significantly smaller and less greedy than an Electron-based application. It does, however, rely on a combination of go, webview, tailwindcss and native dialogs.

Why isn't it working for me?

Please create an issue. If possible, include the files you were working with (image and code) so that I can reproduce the issue.

Why am I getting an error message on MacOS?

You may be getting a message about the application being damaged. It is not, but the gatekeeper is blocking it. You can work around this from the shell:

sudo xattr -cr /Applications/pngsource.app

More Repositories

1

libui.cr

Crystal-lang bindings for libui
Crystal
176
star
2

kittendns

Go
144
star
3

pywhistle

Unofficial Whistle 3 API consumer
Python
20
star
4

RootTools

Root Tools
Java
19
star
5

krew-plugins-for-m1

Kubectl Krew plugins built for Mac M1 processors
Shell
12
star
6

extphp

This is the ExtPHP wrapper I wrote before ExtJS changed license.
11
star
7

CActor

The Actor Model for Plain Old C
C
11
star
8

crystalvault

A zero-knowledge server to store and share secrets: credentials, keys, etc.
HTML
9
star
9

Twitterified

The Twitterified Client, fully open-sourced
ActionScript
9
star
10

s2ajax

The awesome Sajax for Python/PHP, but for Python, including 3.0, and PHP5, with objects support.
PHP
7
star
11

SuperBomberGame

This is not a complete game, but small demo of how one could write a game loop in ReasonML.
Reason
6
star
12

sbase-for-android

Shell tools that suck less!
C
5
star
13

data.cr

A bumbling foray in immutable data structures land. In Crystal!
Crystal
5
star
14

ztncli

A companion CLI for Key Network's ztncui ZeroTier controller interface
Shell
5
star
15

crafty-things

A CraftX Extension
TypeScript
5
star
16

applekeyboarddriver

A laptop/PS2 keyboard driver for recalcitrant laptops/desktops running Leopard...er Darwin
C++
4
star
17

modernfbv

Go
4
star
18

NativeTools

C++
3
star
19

mailbiter

Go
3
star
20

n2

n2: More ketchup.
PHP
3
star
21

wekanapi

A standalone API for Wekan
Crystal
2
star
22

BambooGarden

Using RootTools' new Java interfaces, handle multiple notebooks in Wacom's Bamboo Paper
Java
2
star
23

U-Must-Sync

Currently, non-functional code to synchronize Toodledo and The Hit List
2
star
24

crystal-pack

A partial implementation of pack() and unpack() for the Crystal language
Crystal
2
star
25

reasonable-fidelity

Replay recorded web sessions, check for fidelity
Python
2
star
26

lenses

PHP Framework
PHP
2
star
27

shl

Execute from shell some commands that query online services
Go
1
star
28

php-error-reporter

Display stack traces, variables states, and will try to notify you
1
star
29

CFRAnimated

A "compressed time" animation library for Android (currently Canvas)
Java
1
star
30

ezedit

Edit any web page. Easily. Very very easily.
PHP
1
star
31

glauth-qr-code-rust

Rust
1
star
32

mezzanine-mollom

Mollom SPAM filter for Mezzanine CMS
Python
1
star
33

awesome-supervisor

A curated list of supervisor(d) configurations, etc
Shell
1
star
34

slotmachine

Find a free slot in a slice, quick, in Go
Go
1
star
35

cfr_minimal_shell

This is my minimal shell tarball. Use it if you must, but it's not an actual project.
Vim Script
1
star
36

php-migrate

A migration tool, relying on YAML syntax, for your PHP projects
1
star
37

crystal-block

Highlight matching Crystal block in Atom editor
CoffeeScript
1
star