|
1 | | -# get_stick_bugged_lol |
2 | | -A python package and command-line tool that generates a 'get stick bugged' video from an image. |
| 1 | +# get-stick-bugged-lol |
| 2 | +A python module and command-line tool that generates a 'get stick bugged' video from any image. |
| 3 | + |
| 4 | +This script uses [pylsd-nova](https://github.com/AndranikSargsyan/pylsd-nova) to detect line segments in the image, |
| 5 | +Pillow to draw the lines as move to form the stick bug, and MoviePy to create the video. |
| 6 | + |
| 7 | +## Installation |
| 8 | +This package can be install using pip: |
| 9 | +``` |
| 10 | +pip install get-stick-bugged-lol |
| 11 | +``` |
| 12 | + |
| 13 | +## Usage |
| 14 | +#### In the terminal |
| 15 | +Installing the package will register the `gsbl` command in the terminal. To use the image `input.png` to generate the |
| 16 | +video `output.mp4`: |
| 17 | +``` |
| 18 | +gsbl input.png output.mp4 |
| 19 | +``` |
| 20 | +Optional arguments: |
| 21 | +* `-h, --help` Display the help message and exit |
| 22 | +* `--line-color R G B` RGB color to use for line segments (default: 255 255 211) |
| 23 | +* `--bg-color R G B` RGB color to use for background after image disappears (default: 125 115 119) |
| 24 | + |
| 25 | +More options will be added in later releases. |
| 26 | + |
| 27 | +#### In a Python script |
| 28 | + |
| 29 | +```python |
| 30 | +import gsbl |
| 31 | + |
| 32 | +# generate the video from input.png |
| 33 | +video = gsbl.generate_stick_bug('input.png') |
| 34 | + |
| 35 | +# save the video as output.mp4 |
| 36 | +gsbl.save_video(video, 'output.mp4') |
| 37 | +``` |
| 38 | + |
| 39 | +## TODO |
| 40 | +* Rewrite to be more object-oriented and easier to maintain |
| 41 | +* Add more customization options, especially with the line detection and video resolution |
| 42 | +* Make a GUI |
| 43 | + |
| 44 | +## License |
| 45 | +This package is available under the MIT License. See [LICENSE](LICENSE) for more info. |
| 46 | + |
| 47 | +This package makes use of the following external libraries: |
| 48 | +* [pylsd-nova](https://github.com/AndranikSargsyan/pylsd-nova) |
| 49 | +* [NumPy](https://numpy.org) |
| 50 | +* [Pillow](https://python-pillow.org) |
| 51 | +* [MoviePy](https://github.com/Zulko/moviepy) |
0 commit comments