Skip to content

tools: manage.py show names every picture a switch's row carries - #3544

Merged
Gathin23 merged 1 commit into
Gathin23:mainfrom
xbsheng:tools/manage-show-every-picture
Nov 9, 2026
Merged

Gathin23 merged 1 commit into
Gathin23:mainfrom
xbsheng:tools/manage-show-every-picture

Conversation

@xbsheng

@xbsheng xbsheng commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

manage.py show printed only the first picture of a switch's row in docs/switches.md, while the page lets a row carry more than one and holds every picture in a row to its rules: show vpn_pill named vpn_pill.jpg and never vpn_pill_rest.jpg, the pill at rest the page draws beside it, and icon_only_vpn lost icon_only_vpn_on.jpg the same way. switches() now reads every <img src> of a row in page order (img_srcs()), the item keeps them as screenshots while screenshot stays the first path so everything else that reads an item is unchanged, and show prints one screenshot: line per picture - a key with one picture prints exactly what it printed before.

Tested on: no TV; tools/manage.py against the checkout's own docs/switches.md, unit tests only

If this adds or changes a TV list

  • not a list change: nothing in examples/ or a tv.json is touched

If this touches the launcher

  • not a launcher change: no Java, no config.xml, no script on the install or Home path

If this adds or changes a theme

  • not a theme change: no theme folder, config.json or themes/README.md row is touched

If this adds a theme key (a switch)

  • not a new key: docs/switches.md is read, not edited (a new row would need a screenshot from a real TV)

If this adds an add-on

  • not an add-on change

Two files: tools/manage.py (+30 -6) and tests/test_manage_show_screenshots.py (new, 13 tests). No launcher Java, list, tv.json, generated table, count, workflow, PROMPT.md, disable.sh/check.py logic, Home guard or .github file touched.

Counter-proof, no TV: the new test file alone on origin/main 294d3d5, nothing else changed -> FAILED (failures=4, errors=7), e.g. AssertionError: 'vpn_pill_rest.jpg' not found in '... screenshot: .../vpn_pill.jpg ...' : show printed one of the two pictures docs/switches.md gives vpn_pill, and AssertionError: ['two.jpg', 'two_rest.jpg'] != ['two.jpg'] : show printed one picture of a row that carries two. On this branch the same file is 13 tests OK.

Tests: CLEANYOURTV_STRICT=1 tools/venv/bin/python -m unittest discover -s tests -> 3222 OK (skipped=36) = origin/main 294d3d5's own 3209 + 13; tools/venv/bin/python -I tools/gen_tables.py --check exit 0; no shell changed.

Collision: of the 54 open PRs, none touches tools/manage.py, tests/test_manage_show_screenshots.py or docs/switches.md except #2954, which appends its own row and picture to that page - a file this PR does not edit.

docs/switches.md lets one row show more than one picture - vpn_pill carries the
pill up and the pill at rest - and switches() kept only the first, so
`show vpn_pill` printed one of the two pictures the page ships.
@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

maintainer-bot review · suggests merge (p3)

Thanks for catching that show vpn_pill left out the picture of the pill at rest, and for the tests that check every picture the page gives a key. This looks ready to merge as it is: keys with one picture print exactly what they did before.

Checks
  • Size: size/M (+190 -6, 2 files)

This is a suggestion; a maintainer makes the final call. A maintainer can comment /bot review to run it again.

Reviewed by maintainer-bot · runs on 0G Private Computer

@github-actions github-actions Bot added bot-suggests:merge p3 scripts build-and-install, disable, restore, tv.py and the other tools labels Nov 8, 2026
@Gathin23
Gathin23 merged commit a23508e into Gathin23:main Nov 9, 2026
4 checks passed
@Gathin23

Gathin23 commented Nov 9, 2026

Copy link
Copy Markdown
Owner

Thanks @xbsheng, manage.py show now prints every picture a switch's row carries, so vpn_pill and icon_only_vpn show both of theirs, while 'screenshot' stays the first path for other readers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot-suggests:merge p3 scripts build-and-install, disable, restore, tv.py and the other tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants