{"id":15283740,"url":"https://github.com/wikimedia/popularpages","last_synced_at":"2025-10-20T03:30:36.652Z","repository":{"id":16871161,"uuid":"80581900","full_name":"wikimedia/popularpages","owner":"wikimedia","description":"Tool for generating popular page reports for WikiProjects","archived":false,"fork":false,"pushed_at":"2024-09-28T23:51:41.000Z","size":1953,"stargazers_count":2,"open_issues_count":1,"forks_count":3,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-01-30T13:34:50.556Z","etag":null,"topics":["analytics","bot","wikipedia"],"latest_commit_sha":null,"homepage":"https://wikitech.wikimedia.org/wiki/Tool:Popular_Pages","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wikimedia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-01T02:06:49.000Z","updated_at":"2024-09-28T23:51:45.000Z","dependencies_parsed_at":"2024-05-04T12:32:58.355Z","dependency_job_id":"47234938-464d-45ed-af21-c6a3dd81229c","html_url":"https://github.com/wikimedia/popularpages","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikimedia%2Fpopularpages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikimedia%2Fpopularpages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikimedia%2Fpopularpages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikimedia%2Fpopularpages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wikimedia","download_url":"https://codeload.github.com/wikimedia/popularpages/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237253952,"owners_count":19279955,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analytics","bot","wikipedia"],"created_at":"2024-09-30T14:45:15.579Z","updated_at":"2025-10-20T03:30:31.332Z","avatar_url":"https://github.com/wikimedia.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Popular Pages\n=============\n![CI](https://github.com/wikimedia/popularpages/workflows/CI/badge.svg)\n\nA tool for generating monthly popular pages reports for WikiProjects.\n\nSee [the tool's homepage](https://wikitech.wikimedia.org/wiki/Tool:Popular_Pages) for more information.\n\n##### Setting up the bot\n* Copy `config.ini.example` to `config.ini` and add the bot's username and password.\n* Run `composer install` from the command line.\n* Either run the bot manually or set up a cron job to run it once a month.\n\n##### How does the bot work?\n* Fetches config from [on wiki config page](https://en.wikipedia.org/wiki/User:Community_Tech_bot/Popular_pages_config.json) (example for English Wikipedia).\n* Runs on all projects listed in the config, compiling pageviews statistics for the previous month.\n* Updates [the info page on wiki](https://en.wikipedia.org/wiki/User:Community_Tech_bot/Popular_pages) with the timestamp of page update.\n\n##### App structure:\n* **`bin/checkReports.php`**: Starting point for a new bot run. Gets config info for all projects not already updated for past month and then passes it to `ReportUpdater`.\n* **`bin/generateReport.php`**: Script to manually regenerate a report for a single project.\n* **`bin/generateIndex.php`**: Script for generating the index page.\n* **`src/ReportUpdater.php`**: The file that actually updates projects.\n* **`src/WikiRepository.php`**: Contains all helper functions for dealing with the API and Database (bit of a misnomer).\n* **`src/PageviewsRepository.php`**: Contains all helper functions for dealing with the Pageviews API.\n* **`src/Logger.php`**: Responsible for logging updates to the files in the `logs` directory.\n\n##### Setting up a new wiki\n* Make sure the translations for the language are in the /messages directory.\n* Add the configuration for the project in `wikis.yaml`. This indicates where the WikiProjects configuration and index pages live.\n* Add your WikiProjects configuration on the corresponding on-wiki JSON page.\n* Add a new cron job for the wiki, such as `0 0 1 * * checkReports.php en.wikipedia`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwikimedia%2Fpopularpages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwikimedia%2Fpopularpages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwikimedia%2Fpopularpages/lists"}