# pngsource **Repository Path**: geek-educator/pngsource ## Basic Information - **Project Name**: pngsource - **Description**: PNGSource 一个能让你轻松地在 PNG 文件中嵌入源代码的工具 - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: main - **Homepage**: https://www.oschina.net/p/pngsource - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2022-01-16 - **Last Updated**: 2022-07-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 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](screenshot.png) ## 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!) # Building Only if you plan on contributing or need a different platform: `make platforms VERSION=` or `make platforms BRANCH= VERSION=` or `make platforms GO= BRANCH= VERSION=` Full-on release: `make release` instead of `make platforms` # 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.