Submission for HackClub's BLOT project.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
This is a quick series of programs I created for the BLOT project. HackerClub put out a drawing CNC machine, with the challenge of creating a program to generate art for it. The purpose of this repo is to allow anyone to upload a (square-shaped) image and get an output that they can use to create art with BLOT. The programs are written in Python and JavaScript, and are designed to be as simple as possible to use. I hope you enjoy using them!
All you'll need to get started is to have Python, PIL, and Node.js installed on your machine. You can install them by following the instructions below:
- Python
sudo apt-get install python3 pip install pillow
- Node.js
sudo apt-get install nodejs
You'll also want to grab an image to translate into BLOT art. There's a few examples in the images folder to get you started. If you want to use your own, try getting a .png - they don't suffer from compression artifacts like .jpgs do. Also, try using a square image for the best results.
- Clone the repo
git clone TSKoduru/BLOT
You only need to run two commands to get an image ready for blot. First, we'll run the preprocessor.py script to convert the image to a 2D greyscaled image. Basically, we're taking the color out of images so that we can draw them with just a pen. Then, we'll run blot.js to convert the greyscaled image to a series of commands that the BLOT machine can understand.
Finally, you can paste the output into the provided template and run that in the BLOT interface, located at https://blot.hackclub.com/editor?guide=start.
Here's all you need to copy (Make sure to replace the placeholder names.):
python3 preprocessor.py -i images/your_image.png -o greyscales/your_image_greyscale.png
node blot.js greyscales/your_image_greyscale.png outputs/your_image_output.txtThen, in the template, replace the placeholder with the output from the last command:
let finalLines = "Whatever's in the output.txt file."Then, you're done! Paste the template into the BLOT editor and watch your image come to life! Here's a few examples, using the provided images:
- Minor Bugfixes, especially on some black and white images.
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt for more information.
Teja koduru - @TJKoduru - [email protected]
Project Link: https://github.com/TSKoduru/BLOT


