{"id":20125821,"url":"https://github.com/adamnieto/codeography","last_synced_at":"2025-03-02T21:13:51.766Z","repository":{"id":183833082,"uuid":"184832121","full_name":"adamnieto/codeography","owner":"adamnieto","description":":mag: :camera: Generate source code from an image of a code snippet/pseudocode using steganography","archived":false,"fork":false,"pushed_at":"2024-01-21T21:20:03.000Z","size":21361,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-13T08:12:10.682Z","etag":null,"topics":["carbon-now","carbon-now-cli","rust","steganography"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adamnieto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-03T23:34:54.000Z","updated_at":"2024-01-21T21:21:50.000Z","dependencies_parsed_at":"2025-01-13T08:11:13.971Z","dependency_job_id":"fd9f8dc6-8b2f-4847-9824-4a62a4691126","html_url":"https://github.com/adamnieto/codeography","commit_stats":null,"previous_names":["adamnieto/codeography"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamnieto%2Fcodeography","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamnieto%2Fcodeography/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamnieto%2Fcodeography/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamnieto%2Fcodeography/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adamnieto","download_url":"https://codeload.github.com/adamnieto/codeography/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241570920,"owners_count":19984002,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["carbon-now","carbon-now-cli","rust","steganography"],"created_at":"2024-11-13T20:10:36.123Z","updated_at":"2025-03-02T21:13:51.741Z","avatar_url":"https://github.com/adamnieto.png","language":"Rust","readme":"# :camera: codeography\n---\nA CLI that creates code snippet images using `carbon-now-cli` ([here](https://github.com/mixn/carbon-now-cli)), however, it can also encapsulate and generate the source code these code snippets represent pictorially via steganography. \n\nTo understand a little bit better here is a diagram to explain:\n\n\n![alt text](https://raw.githubusercontent.com/adamnieto/codeography/main/codeography_diagram.png)\n\n## What is Steganography? \n\nSteganography is the process of representing information within another message or physical/virtual object in such a way that is not evident in plain sight or after human inspection.\n\nIn other words, steganography is a way for us to hide messages within everyday files or objects. \n\n## Inspiration and Use Case\n\n* The inspiration for this project comes out of the need for providing customizable syntax highlighting to code snippets through an image without losing the ability to copy and paste the source code the code-snippet image represents pictorially. Intrinsically, this tool does the copying and pasting for you by simply generating the file from the code-snippet image you already have.\n\n* For instance, this tool can be used to encode a source file of a program but display pictorially the pseudocode of that program.\n\n* This CLI is useful for presentations that may contain code snippets, allowing the presenter to avoid styling the code manually for a slide but also not burden viewers in having to download a separate file, or copy/paste (formatting may screw up) the code snippet.\n\n---\n\n## Installation:\n\n### Installing using Dev Container (recommended)\n\n**Pre-requisites:** Please make sure that you have Docker installed on your machine and you are using Visual Studio Code. \n\n1. Download this repo:\n\n```bash\ngit clone https://github.com/adamnieto/codeography.git\n```\n2. Wait for the dev container to finish running including the `postCreateCommand` once that has finished it should have installed the `codeography` command and you can start using it.\n\n### Installing Manually\n\n1. Make sure that you have already installed the `carbon-now-cli`. Follow the installation rules [here](https://github.com/mixn/carbon-now-cli).\n\n2. [Install Rust](https://www.rust-lang.org/tools/install/)\n\n3. Download this repo:\n\n```bash\ngit clone https://github.com/adamnieto/codeography.git\n\n```\n\n4. Once inside of the `codeography` directory run the following command: \n\n```\ncargo install --path .\n```\n\n---\n## Usage:\n\n### Creating a code snippet image\n\nTo create a code snippet image all you need to execute is the following command:\n\n```\ncodeography imagify \u003cINPUT_CODE_FILE\u003e\n```\n\nExample: \n\nIn this example, codeography will delegate to the `carbon-now-cli` in interactive mode.\n\n```\ncodeography imagify code_snippet.rs\n```\n\n[![asciicast](https://asciinema.org/a/244240.svg)](https://asciinema.org/a/244240)\n\n### Encoding a code-snippet image to steganographic code-snippet image\n\n```\ncodeography encode \u003cINPUT_CODE_FILE\u003e \u003cINPUT_IMAGE_TO_ENCODE\u003e \u003cENCODE_OUTPUT_IMAGE_FILE_NAME\u003e\n```\n\nExample: \n\nIn this example the CLI will create `codeography_code_snippet.png`.\n\n```\ncodeography encode code_snippet.rs code_snippet.png codeography_code_snippet\n```\n\n[![asciicast](https://asciinema.org/a/244241.svg)](https://asciinema.org/a/244241)\n\n### Decoding a steganographic code-snippet image to its original source code file\n\n```\ncodeography decode \u003cINPUT_IMAGE_TO_DECODE\u003e \u003cDECODE_OUTPUT_FILE_NAME\u003e\n```\n\nExample: \n\nIn this example the program will create `code_snippet.rs`.\n```\ncodeography decode codeography_code_snippet.png code_snippet\n```\n\n[![asciicast](https://asciinema.org/a/244243.svg)](https://asciinema.org/a/244243)\n\n---\n## Notes\n\nThis project is still in its early stages. If you find any bugs please report them in the issues tab. \n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamnieto%2Fcodeography","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadamnieto%2Fcodeography","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamnieto%2Fcodeography/lists"}