English | 繁體中文
A Node.js + TypeScript application for Wikimedia Commons Photo Challenge operations. It provides a Web UI and CLI for three common workflows:
- prepare voting pages from submission pages
- process votes and generate revised/result/winners pages
- plan and publish post-results maintenance tasks
- Node.js
26.3.0 - npm
11or newer - A Wikimedia Commons BotPassword login
Setup details:
- copy
.env.exampleto.env - set
NAMEto your full BotPassword login such asMainAccount@BotAppName - set
BOT_PASSWORD - optional: set
USER_AGENT,PORT, andCREDENTIAL_SERVICE_NAME
npm installWeb app:
npm run devProduction build:
npm run build
npm startCLI examples:
npm run cli -- create-voting --challenge "2026 - March - Three-wheelers"
npm run cli -- count-votes-and-select-winners --challenge "2026 - February - Orange"
node dist/cli.js post-results-maintenance --challenge "2026 - February - Orange" --paired-challenge "2026 - February - First aid" --publish-mode dry-run
node dist/cli.js post-results-maintenance --challenge "2026 - February - Orange" --publish-mode liveUse this before voting starts.
Outputs are written under output/jobs/<job-id>/generated/, including *_voting.txt, *_files.json, *_challenge-config.json, and *_summary.txt.
The default is a single-image, single-month challenge. For paired-image challenges, use --entry-mode duo-coequal or --entry-mode duo-reference. Only override --submission-start and --submission-end when the community has approved an exceptional duration; paired-image mode does not automatically extend the submission window.
Use this after voting ends.
This workflow validates voters and votes, checks deadlines, and generates *_revised.txt, *_result.txt, and *_winners.txt.
Late-vote checks use the default Photo Challenge closing time in UTC, and the generated outputs reflect that same cutoff.
Use this after winners are known.
It creates winner notifications, challenge announcements, Previous-page updates, and file assessment plans. sandbox and live now formally publish all four maintenance edit types, and the Web UI still provides grouped review before or after publishing.
create-votingandcount-votes-and-select-winnerssupportdry-run,sandbox, andlivepost-results-maintenancesupportsdry-run,sandbox, andlivefor winner notifications, central announcements, Previous-page updates, and file assessment templates- sandbox targets are derived from the main account part before
@inNAME - saved credentials use the system keychain when available, with in-memory fallback for the current process
- job history is rebuilt from
output/jobs/*/logs/job.log
Useful commands:
npm run check
npm run check:test
npm testCompatibility status: the project is verified on Node.js 26.3.0 with npm 11.16.0.
Notes:
- keep
.envout of version control - preserve
output/jobs/if you want to reopen past runs or review publish history - use
sandboxbeforelivewhen testing new workflow changes
Implemented and working today:
- Web UI for job creation, progress tracking, artifact preview, publish review, and maintenance review
- CLI for main workflows plus list/archive/voting-index helper commands
- Commons publishing for voting/result/winners pages
- formal maintenance publishing for winner notifications, central announcements, Previous-page updates, and file assessment templates
- regression coverage for parsers, renderers, CLI, job history, and offline workflow fixtures
Maintainer docs:
- Architecture and responsibility boundaries: docs/architecture.md
Recommended next steps:
- add deployment and operations documentation for non-local usage
- expand fixtures for older Commons page variants and unusual signatures
- add end-to-end Web flow coverage for create-voting, count-votes-and-select-winners, and maintenance publish
- consider finer-grained inline word diff inside changed lines
- Example environment file: .env.example
- Original upstream project: Commons Photo Challenge, by Jarek Tuszynski (public domain)
- Traditional Chinese README: README.zh-TW.md