{"id":13496621,"url":"https://github.com/orhnk/RASCII","last_synced_at":"2025-03-28T19:30:44.581Z","repository":{"id":63890110,"uuid":"570827689","full_name":"orhnk/RASCII","owner":"orhnk","description":"Advanced image to ASCII art tool \u0026 crate written in Rust 🦀🚀","archived":false,"fork":false,"pushed_at":"2025-03-16T14:23:21.000Z","size":166876,"stargazers_count":195,"open_issues_count":2,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T13:16:40.882Z","etag":null,"topics":["art","ascii","ascii-art","command-line","img","img2ascii","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/orhnk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-11-26T08:59:53.000Z","updated_at":"2025-03-25T10:31:12.000Z","dependencies_parsed_at":"2023-12-21T08:03:57.990Z","dependency_job_id":"cd01b79e-805f-47f0-94eb-1e9373d80564","html_url":"https://github.com/orhnk/RASCII","commit_stats":null,"previous_names":["utfeight/rascii","kobruhh/rascii","ocaml-case/rascii","orhnk/rascii"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orhnk%2FRASCII","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orhnk%2FRASCII/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orhnk%2FRASCII/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orhnk%2FRASCII/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orhnk","download_url":"https://codeload.github.com/orhnk/RASCII/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246088362,"owners_count":20721668,"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":["art","ascii","ascii-art","command-line","img","img2ascii","rust"],"created_at":"2024-07-31T19:01:53.168Z","updated_at":"2025-03-28T19:30:44.332Z","avatar_url":"https://github.com/orhnk.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n[![Crate Status](https://img.shields.io/crates/v/rascii_art.svg)](https://crates.io/crates/rascii_art)\n[![Docs Status](https://docs.rs/rascii_art/badge.svg)](https://docs.rs/crate/rascii_art/)\n\n\u003cp style=\"margin-bottom: 0 !important;\"\u003e\n    \u003cimg alt=\"RASCII Logo\" src=\"https://user-images.githubusercontent.com/101834410/204127025-b98aaf39-778b-468b-8f41-36fd858708e8.png\" width=600\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n```\nAdvanced ASCII Art Generator\n\nUsage: rascii [OPTIONS] \u003cFILENAME\u003e\n\nArguments:\n  \u003cFILENAME\u003e  Path to the image\n\nOptions:\n  -w, --width \u003cWIDTH\u003e      Width of the output image. Defaults to 128 if width and height are not specified\n  -H, --height \u003cHEIGHT\u003e    Height of the output image, if not specified, it will be calculated to keep the aspect ratio\n  -c, --color              Whether to use colors in the output image\n  -i, --invert             Inverts the weights of the characters. Useful for white backgrounds\n  -C, --charset \u003cCHARSET\u003e  Characters used to render the image, from transparent to opaque. Built-in charsets: block, emoji, default, russian, slight [default: default]\n  -h, --help               Print help\n  -V, --version            Print version\n```\n\n## Features\n\n- **Available as a crate:** RASCII has a very simple API allowing you to use\n  RASCII from your programs without using the system shell.\n\n- **Colored ASCII art generation**: RASCII uses ANSI color codes to generate\n  colored ASCII art.\n\n  \u003c!-- deno-fmt-ignore --\u003e\n  \u003e [!NOTE]\n  \u003e Your terminal emulator has to support `truecolor` (don't worry,\n  \u003e almost all modern terminal emulators do).\n\n- **Super efficient colored output**: RASCII never repeats the same ANSI color\n  code if it is already active.\n  \u003e This makes a huge difference in images with little alternating color, up to\n  \u003e about 1800% reduction in output size. Woah!\n\n- **Custom dimensions**: RASCII allows you to give custom dimensions to the\n  outputted ASCII art while keeping the aspect ratio (unless both dimensions are\n  provided).\n\n- **Custom charsets:** RASCII allows you to use custom charsets to generate your\n  ASCII art.\n\n\u003c!-- deno-fmt-ignore --\u003e\n\u003e [!NOTE]\n\u003e The given charset must go from transparent to opaque.\n\n- **Lots of pre-included charsets.**\n\n## Installing The CLI\n\n## Via Cargo\n\n\u003c!--deno-fmt-ignore--\u003e\n\u003e [!NOTE]\n\u003e This is the recommended way of installing the RASCII CLI.\n\n\u003c!--deno-fmt-ignore--\u003e\n\u003e [!WARNING]\n\u003e You must have `~/.cargo/bin/` in your `PATH` to run `rascii`\n\u003e directly.\n\n```sh\ncargo install rascii_art\n```\n\n## Manually\n\n\u003c!--deno-fmt-ignore--\u003e\n\u003e [!WARNING]\n\u003e this installation method is discouraged and only works for\n\u003e GNU/Linux or any other POSIX compatible systems!\n\n```sh\ngit clone https://github.com/KoBruhh/RASCII \u0026\u0026 cd RASCII\nchmod +x install.sh\n./install.sh\n```\n\n## Using The Crate\n\nInstead of using the unreliable system shell to call RASCII, you can add the\n`rascii_art` crate to your project and use it in Rust!\n\nTo do so, run `cargo add rascii_art` to add RASCII to your Cargo project.\n\nHere is a code example:\n\n```rs\nuse rascii_art::{\n    render_to,\n    RenderOptions,\n};\n                                                            \nfn main() {\n    let mut buffer = String::new();\n                                                            \n    render_to(\n        r\"/path/to/image.png\",\n        \u0026mut buffer,\n        \u0026RenderOptions::new()\n            .width(100)\n            .colored(true)\n            .charset(\u0026[\".\", \",\", \"-\", \"*\", \"£\", \"$\", \"#\"]),\n    )\n    .unwrap();\n}\n```\n\n## Showcase\n\n### Japanese Charset\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/KoBruhh/RASCII/assets/101834410/c038edc9-cab3-4270-95df-0269203763fd\"\u003e\n\u003c/p\u003e\n\n### Emoji Charset\n\n\u003c!--deno-fmt-ignore--\u003e\n\u003e [!NOTE]\n\u003e The emoji charset does not guarantee your outputs color will match\n\u003e the color of your image, this is just a coincidence that happened with Ferris.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/101834410/204243964-f4cfdf8d-10b9-4a2c-8d3c-41182320c789.png\"\u003e\n\u003c/p\u003e\n\n### Chinese Charset\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/KoBruhh/RASCII/assets/101834410/357c084f-ea93-40f9-baa8-16e329b95a51\"\u003e\n\u003c/p\u003e\n\n### Block Charset\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/KoBruhh/RASCII/assets/101834410/3ac7e920-7ab4-441d-886e-2028b108578d\"\u003e\n\u003c/p\u003e\n\n\u003c!-- ![RASCII output of Ferris with the block charset](https://github.com/KoBruhh/RASCII/assets/101834410/5122c5ba-8707-489e-a720-caf2e183b026) --\u003e\n\n### Custom ASCII Charset\n\nYou can use the `--charset` (or `-C`) CLI option to provide a custom charset to\nuse when generating some ASCII art.\n\nThe value of this must option must go from transparent to opaque, like so:\n\n```sh\nrascii --charset \" ░▒▓█\" --color ferris.png\n```\n\nNote that a charset similar to the above charset is available as a builtin named\n`block`.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/101834410/204243768-4a15bb21-ba93-4979-bd4f-d8e8b1dc4112.png\"\u003e\n\u003c/p\u003e\n\n### Contributors\n\n![KoBruhh](https://github.com/KoBruhh/RASCII/assets/101834410/2b06a6b0-9cb9-448e-8979-4a5182e2e4b2)\n![RGBCube](https://github.com/KoBruhh/RASCII/assets/101834410/3e5b18c3-d7c8-4862-bee5-b5cf06c83994)\n![felixonmars](https://github.com/KoBruhh/RASCII/assets/101834410/66914a48-a5c5-4619-a46d-b99c77b3cd77)\n![fnordpig](https://github.com/fnordpig/RASCII/assets/1621189/5b3225f3-ae83-4ed3-a3fb-3d88de18f82e)\n\n---\n\n\u003c!--deno-fmt-ignore--\u003e\n\u003e [!NOTE]\n\u003e There is a python script at repository root that can be used to generate\n\u003e the above contributor ASCII Art.\n\u003e\n\u003e ```sh\n\u003e python contributors.py\n\u003e ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forhnk%2FRASCII","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forhnk%2FRASCII","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forhnk%2FRASCII/lists"}