{"id":21159174,"url":"https://github.com/rufflewind/ascii-art","last_synced_at":"2025-06-17T08:37:53.606Z","repository":{"id":15767049,"uuid":"18505947","full_name":"Rufflewind/ascii-art","owner":"Rufflewind","description":"ASCII art generator","archived":false,"fork":false,"pushed_at":"2014-04-07T04:17:42.000Z","size":128,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-09T00:38:44.608Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","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/Rufflewind.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-07T03:58:09.000Z","updated_at":"2015-08-09T04:28:59.000Z","dependencies_parsed_at":"2022-09-24T04:01:52.552Z","dependency_job_id":null,"html_url":"https://github.com/Rufflewind/ascii-art","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Rufflewind/ascii-art","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rufflewind%2Fascii-art","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rufflewind%2Fascii-art/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rufflewind%2Fascii-art/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rufflewind%2Fascii-art/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rufflewind","download_url":"https://codeload.github.com/Rufflewind/ascii-art/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rufflewind%2Fascii-art/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260324038,"owners_count":22992115,"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":[],"created_at":"2024-11-20T12:59:47.699Z","updated_at":"2025-06-17T08:37:53.564Z","avatar_url":"https://github.com/Rufflewind.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"ASCII art generator\n===================\n\nThis is a small [Haskell][1] script that converts image files into ASCII art\nsuitable for output in terminals that support 256-color escape codes.  The\nscript can be modified to use only the standard 16 colors as well.\n\nOther than a working Haskell package (obviously), it has only one (very\nimportant) dependency: the [`JuicyPixels` library][2], used to decode the\nimages.  Note that it's probably OK to use a slightly newer or older version\nof this library (as well as the Haskell `base` library).  To install\nJuicyPixels, run:\n\n    cabal install JuicyPixels\n\nUsage\n-----\n\nYou can run it either directly as a script:\n\n    runhaskell Main.hs FILE...\n\nor as a compiled executable:\n\n    # with Cabal\n    cabal build \u0026\u0026 dist/build/ascii-art/ascii-art FILE...\n\n    # without Cabal\n    ghc -O2 -Wall Main.hs \u0026\u0026 ./Main FILE...\n\nHere, `FILE` is an argument that specifies the path to the image file.\n\nInput\n-----\n\nThanks to JuicyPixels, several image formats are supported, including PNG and\nJPEG.  However, only certain color formats are supported (including\n8-bit/channel RGB or 8-bit grayscale, with or without alpha).\n\nSince characters are usually longer vertically, it's probably a good idea to\nresize your images to an approximate ratio of 2:1 before converting into text.\n\nCustomization\n-------------\n\nThere are many ways to customize / extend this.  I'd be happy to hear what you\ncan come up with!  ^^\n\n- To restrict the colors to the more portable 16-color palette, you can change\n  the `convert` variable in `pixelToChar` to `approxS16`.\n\n- Unicode would probably work fine with a bit of tweaking to the alpha\n  (transparency) to character converter: `alphaToChar`.\n\n- To change the maximum width used to center the image, you can alter the\n  `maxWith` variable in `main`.  Or, set it to zero to disable centering\n  altogether.\n\n[1]: http://haskell.org\n[2]: http://hackage.haskell.org/package/JuicyPixels\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frufflewind%2Fascii-art","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frufflewind%2Fascii-art","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frufflewind%2Fascii-art/lists"}