{"id":15974454,"url":"https://github.com/octfx/wikijournalbot","last_synced_at":"2025-04-06T22:41:20.456Z","repository":{"id":42565851,"uuid":"468849840","full_name":"octfx/WikiJournalBot","owner":"octfx","description":"Wikiversity List update Bot","archived":false,"fork":false,"pushed_at":"2022-08-05T09:37:27.000Z","size":164,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-13T04:48:13.313Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/octfx.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}},"created_at":"2022-03-11T17:53:55.000Z","updated_at":"2022-03-17T08:03:49.000Z","dependencies_parsed_at":"2022-08-31T19:51:46.541Z","dependency_job_id":null,"html_url":"https://github.com/octfx/WikiJournalBot","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/octfx%2FWikiJournalBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octfx%2FWikiJournalBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octfx%2FWikiJournalBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octfx%2FWikiJournalBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/octfx","download_url":"https://codeload.github.com/octfx/WikiJournalBot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247563925,"owners_count":20958971,"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":[],"created_at":"2024-10-07T21:41:46.131Z","updated_at":"2025-04-06T22:41:20.422Z","avatar_url":"https://github.com/octfx.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WikiJournalBot\nThis bot can automatically list the articles of a given journal in the [WikiJournal user Group](https://en.wikiversity.org/wiki/WikiJournal_User_Group) (WikiJournal_of_X/Volume_Y_Issue_Z).\n\nThe bot retrieves all pages that transclude the `{{WikiJournalBotList}}` template.  \nBased on this list, the content of each page is retrieved and the volume and issue is extracted.\n\nThen a SPARQL query retrieves all 'scholarly_article' (P31) that are:\n- published in 'WikiJournal of Medicine' (P1433 = Q24657325)\n- and match the given volume (P478) and issue (P433)\n\nNow the page content between [`{{WikiJournalBotList}}`](https://en.wikiversity.org/wiki/Template:WikiJournalBotList) and [`{{ListEnd}}`](https://en.wikiversity.org/wiki/Template:ListEnd) is replaced with the articles found in the query.\n\nThe actual rendering of the item is done by a separate template, it can be configured through the `row_template` argument.\n\nNote: Currently only one list per page is supported.\n\nThe bot will honor the [`{{bots}}`](https://en.wikipedia.org/wiki/Template:Bots) template, with the username set in `.env`.  \nThe bot can be disabled by placing [`{{nobots}}`](https://en.wikipedia.org/wiki/Template:nobots) on its user page.\n\n## Usage\nPages that should be edited by the bot need to contain two templates.  \nThe beginning of a list is denoted by the `{{WikiJournalBotList}}` template, it takes the following arguments:\n- `journal` (required when journal is not set in the page title)\n  - The journal name to use to find the journal QID to use in the SPARQL query\n- `volume` (required when volume is not set in the page title)\n  - The volume number to use in the SPARQL query\n- `issue` (required when issue is not set in the page title)\n    - The issue number to use in the SPARQL query\n- `row_template`\n  - The template to use for all found articles\n  - The WikiData ID is set as the `Q` argument\n\nThe SPARQL query automatically fetches an available image set in P18 and sets it as `image=File.ending` in the template\ndefined in `row_template`.\n\n## Installation\nHead over to [OAuthConsumerRegistration](https://meta.wikimedia.org/wiki/Special:OAuthConsumerRegistration/propose) and register a consumer only OAuth 1.0 application.  \nCheck: `This consumer is for use only by XXX.`  \nApplicable project: `enwikiversity`  \nRequired grants: `Edit existing pages`  \n\nCopy `.env.example` to `.env` and set the four keys you've got after the consumer proposition.  \nSet `ARTICLE_VOLUME_LIST_TEMPLATE` in `.env` to the template that is used on pages that should have automatic bot updates.  \nSet `LIST_END_TEMPLATE` in `.env` to the template that denotes the end of the list.\n\nRun `composer install --no-dev` in the folder where `.env` resides.  \nRun `php bot.php updateArticleLists` to start the update process.  \n\nAdd a cronjob to schedule updating the lists periodically\n```\n# Runs every monday on 06:00\n0 6 * * 1 jsub -N WikiJournalListUpdate -quiet php bot.php updateArticleLists\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctfx%2Fwikijournalbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foctfx%2Fwikijournalbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctfx%2Fwikijournalbot/lists"}