QueryBite turns a small JSON list of SQL tips into finished 1080x1920 tip cards (SVG, PNG and an 8 second MP4) for a daily "SQL in 30 seconds" short-video series.
Free tools only: Python standard library, optional headless Chrome for PNG, optional ffmpeg for video. No accounts, no API keys, nothing to pay for.
Cards are 1080x1920 (vertical short-video size). These two are rendered by this pipeline and committed as SVG so they show right here:
data/content.jsonholds the content, one object per daily card (5 included).src/render.pypicks today's item (or the one you choose), draws the card as SVG, then optionally:- renders a PNG with headless Chrome (
--png) - makes an 8 second MP4 with a slow zoom using ffmpeg (
--video)
- renders a PNG with headless Chrome (
.github/workflows/build.ymlruns the same command every day on GitHub Actions and uploads the files as a build artifact.
git clone https://github.com/KhaledDawod88/querybite-sql
cd querybite-sql
python src/render.py --all # SVG cards for every item into out/
python src/render.py --png # today's card as PNG too
python src/render.py --index 2 --video # item 3 as PNG and MP4Append an object to data/content.json with the same keys as the existing items. The card layout is chosen by src/render.py; text wraps automatically, so keep lines short.
src/render.py: renderer and command linedata/content.json: the contentsamples/: committed sample output.github/workflows/build.yml: daily automated build
Code is free to use and adapt, with no warranty. Content belongs to the project owner.