Skip to content

Geoword upload upsert - #602

Open
dn285 wants to merge 3 commits into
qbreader:mainfrom
dn285:geoword-upload-upsert
Open

dn285 wants to merge 3 commits into
qbreader:mainfrom
dn285:geoword-upload-upsert

Conversation

@dn285

@dn285 dn285 commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Places a new parser script in tools/geoword/parsers/, which turns Young's files into the answers.json that upload-packet.js reads:

  • The trailing tag on each answer (e.g. <rock>) becomes the tossup's category and is removed from the answer, where the browser was hiding it as an unknown HTML element. Unknown tags are an error.
  • The prompt becomes instructions and the .docx clue list becomes question.
  • It tolerates missing commas between metadata entries and repairs misnested answer HTML.

Tested on the September demo files (all 10 questions tagged correctly), then end to end: a prod-mode upload tagged all "Pop Culture / Music", followed by --upsert with the parser output, fixed the categories while keeping tossup ids and an existing buzz attached.

dn285 and others added 3 commits October 15, 2026 21:34
Updates an existing packet's tossups in place from answers.json instead
of deleting and recreating them. Tossup ids are kept, so existing buzzes
stay attached, which makes it safe on a packet people have already played
(where --replace is refused). Audio and packet settings are left alone;
new questions are inserted and questions missing from the folder are
reported, not deleted. Creates the packet if it doesn't exist, so the
same command can be rerun on the same folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tools/geoword/parsers/ holds per-tournament scripts that turn a
tournament's own files into the answers.json upload-packet reads.

soundtracks.js reads the metadata .json and packet .docx. Each answer's
trailing tag (e.g. `<rock>`) becomes the tossup's category instead of
staying in the answer, where the browser hid it as an unknown element;
unknown tags are an error. The prompt becomes the instructions and the
docx clue list the question. It also tolerates missing commas between
metadata entries and repairs misnested answer HTML.

read-docx-paragraphs.js extracts .docx text with zlib and jsdom, so no
new dependency is needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Soundtracks is all music, so a "Music" subcategory on every tossup says
nothing. The Soundtracks parser no longer adds one, upload-packet no
longer requires one in prod mode, and the results and protests pages
show just `<Category>` when a tossup has none. Rerunning with --upsert
removes the old subcategory from an existing packet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant