{"id":39490062,"url":"https://github.com/lonsty/ansify","last_synced_at":"2026-01-18T05:33:55.596Z","repository":{"id":38236066,"uuid":"351084563","full_name":"lonsty/ansify","owner":"lonsty","description":"好玩的终端图片艺术工具。Python CLI to create ANSI/ASCII art.","archived":false,"fork":false,"pushed_at":"2023-01-12T17:06:10.000Z","size":927,"stargazers_count":7,"open_issues_count":10,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-06T10:41:48.653Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/lonsty.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2021-03-24T13:11:51.000Z","updated_at":"2025-07-09T08:51:23.000Z","dependencies_parsed_at":"2023-02-09T12:46:11.851Z","dependency_job_id":null,"html_url":"https://github.com/lonsty/ansify","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lonsty/ansify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lonsty%2Fansify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lonsty%2Fansify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lonsty%2Fansify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lonsty%2Fansify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lonsty","download_url":"https://codeload.github.com/lonsty/ansify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lonsty%2Fansify/sbom","scorecard":{"id":598289,"data":{"date":"2025-08-11","repo":{"name":"github.com/lonsty/ansify","commit":"d234098918eeb16a3665c8cfca55a14cb3e85a7e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/2 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Security-Policy","score":9,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Warn: One or no descriptive hints of disclosure, vulnerability, and/or timelines in security policy","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/greetings.yml:1","Warn: no topLevel permission defined: .github/workflows/release-drafter.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/lonsty/ansify/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/lonsty/ansify/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/lonsty/ansify/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/greetings.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/lonsty/ansify/greetings.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release-drafter.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/lonsty/ansify/release-drafter.yml/master?enable=pin","Warn: containerImage not pinned by hash: docker/Dockerfile:1: pin your Docker image by updating python:3.7-slim-buster to python:3.7-slim-buster@sha256:9bd2bfc822a533f99cbe6b1311d5bf0ff136f776ebac9b985407829f17278935","Warn: downloadThenRun not pinned by hash: docker/Dockerfile:15-18","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":0,"reason":"44 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-48 / GHSA-fj7x-q9j7-g6q6","Warn: Project is vulnerable to: PYSEC-2022-42986 / GHSA-43fp-rhv2-5gv8","Warn: Project is vulnerable to: PYSEC-2023-135 / GHSA-xqr8-7jwr-rhp7","Warn: Project is vulnerable to: PYSEC-2022-301 / GHSA-8fg9-p83m-x5pq","Warn: Project is vulnerable to: PYSEC-2024-4 / GHSA-2mqj-m65w-jghx","Warn: Project is vulnerable to: PYSEC-2023-165 / GHSA-cwvm-v4w8-q58c","Warn: Project is vulnerable to: PYSEC-2022-42992 / GHSA-hcpj-qp55-gfph","Warn: Project is vulnerable to: PYSEC-2023-137 / GHSA-pr76-5cm5-w9cj","Warn: Project is vulnerable to: PYSEC-2023-161 / GHSA-wfm5-v35h-vwf4","Warn: Project is vulnerable to: PYSEC-2024-60 / GHSA-jjg7-2v4v-x38h","Warn: Project is vulnerable to: GHSA-6p56-wp2h-9hxr","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: GHSA-3f63-hfp8-52jq","Warn: Project is vulnerable to: GHSA-44wm-f244-xhp3","Warn: Project is vulnerable to: GHSA-4fx9-vc88-q2xc","Warn: Project is vulnerable to: PYSEC-2021-331 / GHSA-7534-mm45-c74v","Warn: Project is vulnerable to: PYSEC-2021-137 / GHSA-77gc-v2xv-rvvh","Warn: Project is vulnerable to: PYSEC-2021-92 / GHSA-7r7m-5h27-29hp","Warn: Project is vulnerable to: PYSEC-2023-227 / GHSA-8ghj-p4vj-mr35","Warn: Project is vulnerable to: PYSEC-2022-10 / GHSA-8vj2-vxx3-667w","Warn: Project is vulnerable to: PYSEC-2021-317 / GHSA-98vv-pw6r-q6q4","Warn: Project is vulnerable to: PYSEC-2022-168 / GHSA-9j59-75qj-795w","Warn: Project is vulnerable to: PYSEC-2021-139 / GHSA-g6rj-rv7j-xwp4","Warn: Project is vulnerable to: PYSEC-2021-94 / GHSA-hjfx-8p6c-g7gx","Warn: Project is vulnerable to: GHSA-j7hp-h8jx-5ppr","Warn: Project is vulnerable to: PYSEC-2022-42979 / GHSA-m2vv-5vj5-2hm7","Warn: Project is vulnerable to: GHSA-mvg9-xffr-p774","Warn: Project is vulnerable to: PYSEC-2022-8 / GHSA-pw3c-h7wp-cvhx","Warn: Project is vulnerable to: PYSEC-2021-93 / GHSA-q5hq-fp76-qmrc","Warn: Project is vulnerable to: PYSEC-2021-138 / GHSA-rwv7-3v45-hg29","Warn: Project is vulnerable to: PYSEC-2022-9 / GHSA-xrcv-f9gm-v42c","Warn: Project is vulnerable to: PYSEC-2023-175","Warn: Project is vulnerable to: PYSEC-2022-42969","Warn: Project is vulnerable to: PYSEC-2023-117 / GHSA-mrwq-x4v8-fh7p","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2023-74 / GHSA-j8r2-6x86-q33q","Warn: Project is vulnerable to: GHSA-34jh-p97f-mpxf","Warn: Project is vulnerable to: PYSEC-2023-212 / GHSA-g4mx-q9vg-27p4","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v","Warn: Project is vulnerable to: PYSEC-2021-108 / GHSA-q2q7-5pp4-w6pg","Warn: Project is vulnerable to: PYSEC-2023-192 / GHSA-v845-jxx5-vc9f","Warn: Project is vulnerable to: PYSEC-2024-187 / GHSA-rqc4-2hc7-8c8v","Warn: Project is vulnerable to: GHSA-jfmj-5v4g-7637"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T23:44:06.312Z","repository_id":38236066,"created_at":"2025-08-20T23:44:06.313Z","updated_at":"2025-08-20T23:44:06.313Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28530902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2026-01-18T05:33:55.464Z","updated_at":"2026-01-18T05:33:55.581Z","avatar_url":"https://github.com/lonsty.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ansify\n\n\u003cdiv align=\"center\"\u003e\n\n[![Build status](https://github.com/lonsty/ansify/workflows/build/badge.svg?branch=master\u0026event=push)](https://github.com/lonsty/ansify/actions?query=workflow%3Abuild)\n[![Python Version](https://img.shields.io/pypi/pyversions/ansify.svg)](https://pypi.org/project/ansify/)\n[![Dependencies Status](https://img.shields.io/badge/dependencies-up%20to%20date-brightgreen.svg)](https://github.com/lonsty/ansify/pulls?utf8=%E2%9C%93\u0026q=is%3Apr%20author%3Aapp%2Fdependabot)\n\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Security: bandit](https://img.shields.io/badge/security-bandit-green.svg)](https://github.com/PyCQA/bandit)\n[![Pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white)](https://github.com/lonsty/ansify/blob/master/.pre-commit-config.yaml)\n[![Semantic Versions](https://img.shields.io/badge/%F0%9F%9A%80-semantic%20versions-informational.svg)](https://github.com/lonsty/ansify/releases)\n[![License](https://img.shields.io/github/license/lonsty/ansify)](https://github.com/lonsty/ansify/blob/master/LICENSE)\n\nAwesome `ansify` is a Python CLI to create ANSI/ASCII art from images.\n\n好玩的终端图片艺术工具\n\n\u003c/div\u003e\n\n## 工具特点\n\n- [X] 任意图片转成任意字符\n- [X] 支持彩色输出\n\n## 使用说明\n\n### 安装工具 ansify\n\n```bash\npip install -U ansify\n```\n\n### Let's go\n\n原图\n\n![](examples/ycy.jpg)\n\n- 黑白\n\n```bash\nansify --columns 120 --no-color examples/ycy.jpg\n```\n\n![](examples/demo_ycy_1.png)\n\n- 彩色\n\n```bash\nansify --columns 120 examples/ycy.jpg\n```\n\n![](examples/demo_ycy_2.png)\n\n- 像素\n\n```bash\nansify --columns 120 --grayscale pixel examples/ycy.jpg\n```\n\n![](examples/demo_ycy_3.png)\n\n- 自定义字符\n\n```bash\nansify --columns 120 --diy-grayscale \"你我爱超越\" examples/ycy.jpg\n```\n\n![](examples/demo_ycy_4.png)\n\n- 其他示例\n\n\n```bash\nansify --columns 80 --diy-grayscale \" 谁咬我苹果\" examples/apple.png\n```\n\n![](examples/demo_apple_1.png)\n\n\n```bash\nansify --columns 80 --grayscale emoji examples/apple.png\n```\n\n![](examples/demo_apple_2.png)\n\n```bash\nansify https://b-ssl.duitang.com/uploads/item/201712/06/20171206200408_txunr.thumb.700_0.jpeg\n```\n\n![](examples/demo_bilibili_1.png)\n\n### 参数说明\n\n```bash\n$ ansify --help\nUsage: ansify [OPTIONS] IMAGE\n\n  CLI to create ANSI/ASCII art from images.\n\nArguments:\n  IMAGE  Image file PATH or URL.  [required]\n\nOptions:\n  -c, --columns INTEGER           Output columns, number of characters per\n                                  line.  [default: 252]\n\n  -o, --output PATH               Save ANSI/ASCII art to the OUTPUT file.\n  -s, --scale FLOAT               The larger the scale, the thinner the art.\n                                  [default: 0.43]\n\n  -g, --grayscale [simple|morelevels|pixel|dragon|emoji]\n                                  Choose a built-in gray scale.  [default:\n                                  simple]\n\n  -d, --diy-grayscale TEXT        Customize your gray scale.\n  -n, --no-color                  Output a ANSI/ASCII art without color.\n                                  [default: False]\n\n  -r, --reverse-grayscale         Reverse the grayscale.  [default: False]\n  -R, --reverse-color             Reverse the color.  [default: False]\n  -q, --quite                     Hide output information.  [default: False]\n  -v, --version                   Prints the version of the ansify package.\n  --help                          Show this message and exit.\n```\n必要参数：\n\n- `IMAGE`: 本地图片文件路径，或者网络图片 URL\n\n可选参数：\n\n- `-c, --columns`：转化后图片的列数（汉字占两个字符，列数会减半），默认为终端的宽度\n- `-o, --output`：指定文件名如 `output.txt` 后，将输出字符保存到文件\n- `-s, --scale`：受终端配置（字间距、行高）与字符长宽比的影响，输出图像的长宽比与原图有差别。必要时使用此参数调整长宽比，该值越大，图片越高瘦\n- `-g, --grayscale`：预设的几种灰阶递增（字符越来越密集）字符，`[simple|morelevels|pixel|dragon|emoji]`\n- `-d, --diy-grayscale`：自定义灰阶字符，可以是单字符，多字符最好灰阶递增或递减\n- `-n, --no-color`：禁用彩色\n- `-r, --reverse-grayscale`：灰阶字符反转，终端背景为亮色时可以试试看\n- `-R, --reverse-color`：颜色反转\n- `-q, --quite`：输出结果中，屏蔽除字符图的其他信息\n\n其他：\n\n- `-v, --version`：打印工具版本信息\n- `--help`：打印工具使用说明\n\n## Release History\n\n### 1.0.0\n\nInitial release on PyPI.\n## 🛡 License\n\n[![License](https://img.shields.io/github/license/lonsty/ansify)](https://github.com/lonsty/ansify/blob/master/LICENSE)\n\nThis project is licensed under the terms of the `MIT` license. See [LICENSE](https://github.com/lonsty/ansify/blob/master/LICENSE) for more details.\n\n## 📃 Citation\n\n```\n@misc{ansify,\n  author = {lonsty},\n  title = {Awesome `ansify` is a Python CLI to create ANSI/ASCII art from images.},\n  year = {2021},\n  publisher = {GitHub},\n  journal = {GitHub repository},\n  howpublished = {\\url{https://github.com/lonsty/ansify}}\n}\n```\n\n## Credits\n\nThis project was generated with [`python-package-template`](https://github.com/TezRomacH/python-package-template).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flonsty%2Fansify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flonsty%2Fansify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flonsty%2Fansify/lists"}