{"id":27698191,"url":"https://github.com/mark24code/convert2ascii","last_synced_at":"2025-04-25T16:40:18.374Z","repository":{"id":272167175,"uuid":"913182236","full_name":"Mark24Code/convert2ascii","owner":"Mark24Code","description":"Convert Image/Video to ASCII art. 🔮","archived":false,"fork":false,"pushed_at":"2025-01-13T15:46:56.000Z","size":12999,"stargazers_count":39,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-25T08:44:27.132Z","etag":null,"topics":["art","ascii","ascii-art","ascii-art-generator","command","command-line-tool","gem","ruby","rubygem","terminal","tui","video","video-player","video-processing"],"latest_commit_sha":null,"homepage":"https://github.com/Mark24Code/convert2ascii","language":"Ruby","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/Mark24Code.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2025-01-07T07:34:07.000Z","updated_at":"2025-03-18T03:40:52.000Z","dependencies_parsed_at":"2025-01-12T17:29:50.086Z","dependency_job_id":null,"html_url":"https://github.com/Mark24Code/convert2ascii","commit_stats":null,"previous_names":["mark24code/convert2ascii"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mark24Code%2Fconvert2ascii","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mark24Code%2Fconvert2ascii/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mark24Code%2Fconvert2ascii/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mark24Code%2Fconvert2ascii/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mark24Code","download_url":"https://codeload.github.com/Mark24Code/convert2ascii/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250854491,"owners_count":21498245,"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","ascii-art-generator","command","command-line-tool","gem","ruby","rubygem","terminal","tui","video","video-player","video-processing"],"created_at":"2025-04-25T16:40:17.587Z","updated_at":"2025-04-25T16:40:18.348Z","avatar_url":"https://github.com/Mark24Code.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Convert2Ascii\n\nConvert Image/Video to ASCII art.\n\n\n## Intro\n\nconvert2ascii provides two executable commands：\n\n* image2ascii: transform picture to ascii art and display in terminal.\n* video2ascii: transform video to ascii art, you can save or play it in terminal.\n\nIt also provides classes as a gem:\n\n* Convert2Ascii::Image2Ascii\n* Convert2Ascii::Video2Ascii\n\nyou can use it in your code and make your own ascii art !\n\n\n## Test pass\n\n* MacOS 15.2 ✅\n* Ubuntu 24.04 ✅\n* Windows 11  ❌\n* Docker ✅\n\n## Example\n\n* Black Myth: Wukong\n\n![example](./example/wukong.jpg)\n\n* The Matrix: Neo\n\n![neo](./example/neo.gif)\n\n## Prerequisites\n\n* Ruby 3+\n* ImageMagick ([Download here](https://imagemagick.org/script/download.php))\n* ffmpeg ([Download here](https://www.ffmpeg.org/))\n\n# How to use\n\n## Try in Docker\n\n`$ docker run -it -v $(pwd):/app  mark24code/convert2ascii bash -c \"cd /app \u0026\u0026 exec bash\"`\n\n\u003e  `$(pwd)` can be changed to your local path. Here, use your working path.\n\n```bash\n# image\nimage2ascii -i \u003c/path/to/image\u003e\n\n# video \nvideo2ascii -i \u003c/path/to/video.mp4\u003e\n```\n\n\n## Install\n\n`$ gem install convert2ascii`\n\n\n## Executable commands\n\n### image2ascii\n\nConvert an image to ascii art.\n\n```bash\nimage2ascii -h\nUsage: image2ascii [options]\n        --version                    version\n    -i, --image=URI                  image uri (required)\n    -w, --width=WIDTH                image width (integer)\n    -s, --style=STYLE                ascii style: 'color'/'text'\n    -b, --block                      ascii color style use BLOCK or not true/false\n```\n\n### video2ascii\n\nConvert a video to ascii art.\n\n```bash\nUsage: video2ascii [options]\n\n* By default, it will generate and play without saving.\n* The -p option will just play the ascii frames within the directory, and ignore -i, -o other options. --loop will play loop\n* -i,-o will just generate and output frames and ignore others options\n        --version                    version\n    -i, --input=URI                  video uri (required)\n    -w, --width=WIDTH                video width (integer)\n    -s, --style=STYLE                ascii style: ['color'| 'text']\n    -b, --block                      ascii color style use BLOCK or not [ true | false ]\n    -o, --ouput=OUTPUT               save ascii frames to the output directory\n    -p, --play_dir=PLAY_DIRNAME      input the ascii frames directory to play\n        --loop\n```\n\n\n## As a Gem\n\n### Convert2Ascii::Image2Ascii\n\n\n```ruby\nrequire 'convert2ascii/image2ascii'\n\n# generate image\nuri = \"path/to/image\"\nascii = Convert2Ascii::Image2Ascii.new(uri:, width: 50)\n\n# generate image\nascii.generate\n# display in your terminal\nascii.tty_print\n\n\n# also chain call\nascii.generate.tty_print\n\n```\n\n\n### Convert2Ascii::Video2Ascii\n\n```ruby\nrequire 'convert2ascii/video2ascii'\n\n# generate video\nuri = \"path/to/video.mp4\"\nascii = Convert2Ascii::Video2Ascii.new(uri:, width: 50)\n# generate video\nascii.generate\n# save frames\nascii.save(output_path)\n\n# play in terminal\nascii.play\n\n\n# chain call\nascii.generate.play\n\n```\n\n\n## Inspired by\n\n* [michaelkofron/image2ascii](https://github.com/michaelkofron/image2ascii)\n* [andrewcohen/video_to_ascii](https://github.com/andrewcohen/video_to_ascii)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmark24code%2Fconvert2ascii","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmark24code%2Fconvert2ascii","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmark24code%2Fconvert2ascii/lists"}