Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

bad-apple-turtle

A program that plays Bad Apple!! on a Python Turtle

This had just been nearly completely re-written to be better in almost every way. Pypotrace is no longer used in this version.

Python-vlc is used when playing back a video along side the turtle, but it technically optional. Make sure VLC Media Player is installed before python-vlc if you want to use it.

You can install this with pip install bad-apple-turtle. If you want VLC support, run pip install bad-apple-turtle[vlc], and if you also want to be able to download videos for the script, you can do pip install bad-apple-turtle[vlc,yt-dlp]. From there, you can run the command with bad-apple-turtle. If you want a quick demo and have yt-dlp installed, you can just do bad-apple-turtle --demo.

You have several options when running the command. You can directly play a video in a turtle by specifying it in the command with -v/--video. If you don't want the original to play next to it, you can use the --no-vlc argument. If you want to export the resulting vectorized video to a file, you can also specify an output file with -o/--output. You can then play the vectorized video again later using -i/--input. If you specify a vectorized video and a normal video at the same time, the turtle will play the vectorized one while VLC will play the normal video. If you just want to output a file without playing the video at the same time, you can use the --no-play argument. Once the vectorized video is exported, the original is no longer required for turtle playback, though there is no audio included.

If the turtle is not synchronized with the video, you can try increasing the --vlc_delay option, though it's already fairly high. If you are getting lots of dropped frames, you can use the simplification options, which are --max-points and --min-area. --max-points is the maximum number of points in a frame times the square root of the number of curves before the vectors are simplified. --min-area is the minimum area a curve needs for it to be rendered. Alternatively, you can try increasing --tolerance, which is how much time offset is allowed before frames are dropped, or get a faster computer.

Increasing the --threshold will increase how much of the greys are converted to black, and decreasing it will increase the amount of white. You can also use -ss and -to to specify starting and ending frames to playback (or export to a file)

There are other options and I recommend you use --help for more information.

I used this video for testing: https://www.youtube.com/watch?v=UkgK8eUdpAo

Theoretically, you could probably put any video through this, but I do not know how well it would work and it would be converted to binary black and white.

Release files for bad-apple-turtle 2.1.1b0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bad-apple-turtle 2.1.1b0
File Size Uploaded
bad-apple-turtle-2.1.1b0.tar.gz 12.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bad-apple-turtle 2.1.1b0
File Interpreter ABI Platform
bad_apple_turtle-2.1.1b0-py3-none-any.whl Python 3 none any Details

Total release size: 23.7 kB

Release files / bad-apple-turtle-2.1.1b0.tar.gz

Download URL bad-apple-turtle-2.1.1b0.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
510aa7355d785d114909396a9ee3db5c7ef654eb074396fb03b0c358a135aea7
BLAKE2b-256 checksum
How to use checksums
e2359d4ad6272227913554a29f96bbacb7c9a85fae63537bf2ec1a196d790d4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.1

Release files / bad_apple_turtle-2.1.1b0-py3-none-any.whl

Download URL bad_apple_turtle-2.1.1b0-py3-none-any.whl
Size 11.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
194702d37655f4a2a165912b866322e91561610510d4af7ffa00b0af3bc6f0ce
BLAKE2b-256 checksum
How to use checksums
314ece40fbe9aec93910929954bd22d8656f906a044f28bc6e798924a733a418
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.1
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page