Files
cleanyourtv/docs/workflows/press.md
T
xbsheng ea6dd3fe02 tools: the card scripts say where the font comes from
The three scripts that draw README's card read sys.argv[1], sys.argv[2] at the top of the module,
so a run with no arguments died on IndexError, and press.md's Fredoka.ttf - a Google Fonts file no
folder of this repo holds - died inside Pillow on 'OSError: cannot open resource'. One font_and_out()
guard per script, before the Pillow import; gen_tables.py --font refuses a missing path itself
instead of wrapping their message in CalledProcessError; press.md says where the font comes from.

The one test that ran gen_tables.py --check on this tree and demanded exit 0 is gone: the tables are
stale on any branch that adds a list folder, which docs/workflows/tv-list.md tells a list PR to do
and leaves to a maintainer after merging, so that assertion would have been red on every list PR.
In its place, --check must give the same verdict with and without --font.
2026-10-25 07:19:31 +08:00

1.2 KiB

Workflow: Add a press entry

When to use this: an article about this project.

  1. Add a row | Outlet | [Headline](<url>) | Date | to the right country section of docs/PRESS.md, in the headline's own language. The link must open and show the article: no syndicated copies, no auto-generated listings, nothing that cannot be checked.
  2. Update the counts in all four places tests/test_press_counts.py checks: the docs/PRESS.md intro line, its index line, the README card's alt text ("and N more: N articles from N countries") and MORE in tools/readme_featured.py. Redrawing docs/featured.png and docs/card.jpg needs Pillow, which the performance requirements install: tools/venv/bin/pip install -r tools/requirements-perf.txt, then tools/readme_featured.py Fredoka.ttf docs/featured.png and tools/readme_card.py Fredoka.ttf docs/card.jpg. Fredoka is the variable TTF from Google Fonts and its file is not in the repo, so that first argument is the path of the copy you downloaded; each script says so when the path is wrong. If you cannot redraw them, say so in the PR.

Then run the tests: python3 -m unittest discover -s tests -v.