{"id":15728571,"url":"https://github.com/ninest/craftpainting","last_synced_at":"2025-05-07T21:45:23.762Z","repository":{"id":41982440,"uuid":"273564282","full_name":"ninest/craftpainting","owner":"ninest","description":"🌄 Create Minecraft-style paintings","archived":false,"fork":false,"pushed_at":"2023-02-16T05:30:50.000Z","size":6564,"stargazers_count":16,"open_issues_count":7,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-20T09:56:24.561Z","etag":null,"topics":["craftpainting","flask","flask-web","image","minecraft","pillow","python","python3"],"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/ninest.png","metadata":{"funding":{"github":"ninest","patreon":null,"open_collective":null,"ko_fi":"parthkabra","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://www.buymeacoffee.com/ninest"]},"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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":"2020-06-19T18:45:33.000Z","updated_at":"2024-10-26T02:10:50.000Z","dependencies_parsed_at":"2024-10-24T21:22:12.472Z","dependency_job_id":"eb1e3c47-5f98-48a5-9852-525244d4e569","html_url":"https://github.com/ninest/craftpainting","commit_stats":{"total_commits":45,"total_committers":3,"mean_commits":15.0,"dds":0.1333333333333333,"last_synced_commit":"3c9392ba2bc6b61d126d4a211504dd23e74fac53"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninest%2Fcraftpainting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninest%2Fcraftpainting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninest%2Fcraftpainting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninest%2Fcraftpainting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ninest","download_url":"https://codeload.github.com/ninest/craftpainting/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252961845,"owners_count":21832192,"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":["craftpainting","flask","flask-web","image","minecraft","pillow","python","python3"],"created_at":"2024-10-03T23:03:50.094Z","updated_at":"2025-05-07T21:45:23.741Z","avatar_url":"https://github.com/ninest.png","language":"Python","funding_links":["https://github.com/sponsors/ninest","https://ko-fi.com/parthkabra","https://www.buymeacoffee.com/ninest"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eCraftpainting\u003c/h1\u003e\n\u003cp align=\"center\"\u003eCreate Minecraft-like paintings in the terminal\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://pypi.org/project/craftpainting/\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/v/craftpainting?color=blue\u0026style=flat-square\" alt=\"Version\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://pypi.org/project/craftpainting/\"\u003e\n    \u003cimg alt=\"PyPI - Downloads\" src=\"https://img.shields.io/pypi/dm/craftpainting?color=red\u0026style=flat-square\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"http://makeapullrequest.com/\"\u003e\u003cimg src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square\" alt=\"Make a PR\" /\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/github/license/ninest/craftpainting?style=flat-square\" alt=\"MIT\" /\u003e\n  \u003ca href=\"https://www.buymeacoffee.com/ninest\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Donate-Buy%20Me%20A%20Coffee-orange.svg?style=flat-square\" alt=\"Buy Me A Coffee\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/ninest/craftpainting/master/images/painting_sunset_dense.jpg\" alt=\"sunset dense\" width=\"500\"\u003e\n\u003c/p\u003e\n\n\n## 🚀 Usage\n\nInstall it by running\n\n```bash\npip install craftpainting\n\n# on on mac,\npip3 install craftpainting\n```\n\n### CLI\n```bash\ncraftpainting input_path.png -s SIZE -r REPETITIONS -o output_path.png \n```\n\n#### size\nEnter a string of `WxH`, such as `2x1`. Units are Minecraft blocks, so a width of `2x1` translates to an image of `32x16`.\n\n#### repetitions\nThe number of times enlarge the image. By default, an image `32x16` or `48x32` is too small and doesn't look good.\n\nThe value of `-r` dictates how many times each pixel should be multiplied. It's `15` by default, so an image of size `2x1` in blocks looks like it's `32x16` pixels, but is actually `480x240`.\n\nSet to `0` to get the minimum possible size.\n\n#### gray\nAppend `-g` (or `--gray`) to the command to make the painting black and white.\n\n#### outputpath\nIf no output path is specified, the image will be shown, but won't be saved.\n\n### Python\n```python\nfrom craftpainting import create_painting, enlarge_image\nfrom PIL import Image\n\nimage = Image.open('images/sunset_dense.jpg')\np = create_painting(image)  # create the (super tiny) image\np = enlarge_image(p, repetitions=15)  # enlarge it so it looks better\n# note that the default repetitions is 10\n\np.show()\n```\n\nTo use in Python, Pillow is required. Install it:\n\n```bash\npip install pillow\n\n# or on mac,\npip3 install pillow\n```\n\n### Web\nVisit [craftpainting.herokuapp.com](https://craftpainting.herokuapp.com/).\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/ninest/craftpainting/master/images/cpweb.png\" alt=\"web demo\" width=\"700\"\u003e\n\u003c/p\u003e\n\n*Note: the website is hosted on Heroku on the free plan, so it will take around 10 seconds to load.*\n\n## 🏳️‍🌈 Examples\n### Sunset dense\n```bash\ncraftpainting sunset_dense.jpg -o painting_sunset_dense.jpg\n```\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/ninest/craftpainting/master/images/painting_sunset_dense.jpg\" alt=\"sunset dense\" width=\"300\"\u003e\n\u003c/p\u003e\n\n#### Original\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/ninest/craftpainting/master/images/sunset_dense.jpg\" alt=\"sunset dense\" width=\"300\"\u003e\n\u003c/p\u003e\n\n### Beach\n```bash\ncraftpainting beach.png -s 3x2 -o painting_beach.png\n```\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/ninest/craftpainting/master/images/painting_beach.png\" alt=\"beach\" width=\"300\"\u003e\n\u003c/p\u003e\n\n#### Original\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/ninest/craftpainting/master/images/beach.png\" alt=\"beach\" width=\"300\"\u003e\n\u003c/p\u003e\n\n### Code\n```bash\ncraftpainting code.jpg -s 2x2 -o painting_code.jpg\n```\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/ninest/craftpainting/master/images/painting_code.jpg\" alt=\"code\" width=\"300\"\u003e\n\u003c/p\u003e\n\n#### Original\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/ninest/craftpainting/master/images/code.jpg\" alt=\"code\" width=\"300\"\u003e\n\u003c/p\u003e\n\n\n### Landscape\n```bash\ncraftpainting landscape.jpg -g -r 5 -o painting_landscape.jpg\n```\n\nSmaller values of `repetitions` produce images of smaller sizes.\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/ninest/craftpainting/master/images/painting_landscape.jpg\" alt=\"code\" width=\"300\"\u003e\n\u003c/p\u003e\n\n#### Original\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/ninest/craftpainting/master/images/landscape.jpg\" alt=\"code\" width=\"300\"\u003e\n\u003c/p\u003e\n\n\n## 🛠 Build setup\n\n```bash\n# install all packages\ncd src/\npipenv shell\npipenv install\n\n# run test.py\npython test.py\n```\n\n### Web\n```bash\ncd web/\npipenv shell\npipenv install\n\n# run the site on the dev server\npython app.py\n\n# host on heroku\ngit add .\ngit commit -m \"update site\"\ncd ..  # go to the route directory\ngit subtree push --prefix web heroku master\n```\n\n## ♥️ Support\nIf you liked this project, consider supporting by\n- ⭐️ Starring the repository\n- 🎒 Checking out my other [projects](https://github.com/ninest)\n- ☕️ Buying me [coffee](https://www.buymeacoffee.com/ninest)\n\n## 📜 License\n- MIT\n- Sunset Dense taken from [Minecraft Gamepedia](https://minecraft.gamepedia.com/Painting)\n- Other images taken from [Pexels](https://www.pexels.com/)\n\n\u003c!-- ## 🔖 Legal attribution --\u003e\n\u003c!-- Google Play and the Google Play logo are trademarks of Google LLC. --\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fninest%2Fcraftpainting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fninest%2Fcraftpainting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fninest%2Fcraftpainting/lists"}