{"id":17761678,"url":"https://github.com/pathoschild/wikimedia-contrib","last_synced_at":"2025-04-07T07:09:39.521Z","repository":{"id":3424899,"uuid":"4476402","full_name":"Pathoschild/Wikimedia-contrib","owner":"Pathoschild","description":"A collection of user scripts and Tool Labs tools intended for users of Wikimedia Foundation wikis.","archived":false,"fork":false,"pushed_at":"2025-02-01T22:50:44.000Z","size":1962,"stargazers_count":47,"open_issues_count":13,"forks_count":28,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-03-31T06:01:44.978Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/Pathoschild.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2012-05-29T01:27:51.000Z","updated_at":"2025-03-10T18:51:27.000Z","dependencies_parsed_at":"2024-06-02T21:46:32.998Z","dependency_job_id":"1a7b7da5-b23d-4894-b460-6b7598d3d43e","html_url":"https://github.com/Pathoschild/Wikimedia-contrib","commit_stats":{"total_commits":467,"total_committers":32,"mean_commits":14.59375,"dds":"0.16488222698072807","last_synced_commit":"cb9604d418a6b61cb9195df0f3d0c1d1b994ea31"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pathoschild%2FWikimedia-contrib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pathoschild%2FWikimedia-contrib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pathoschild%2FWikimedia-contrib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pathoschild%2FWikimedia-contrib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pathoschild","download_url":"https://codeload.github.com/Pathoschild/Wikimedia-contrib/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247608151,"owners_count":20965952,"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-26T19:42:42.295Z","updated_at":"2025-04-07T07:09:39.492Z","avatar_url":"https://github.com/Pathoschild.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"**Wikimedia-contrib** is a collection of user scripts and Toolforge tools intended for users of Wikimedia Foundation wikis.\r\n\r\n## For users\r\n### Tools\r\n\r\n[Toolforge](https://toolforge.org/) is part of the Wikimedia Cloud infrastructure hosted by the Wikimedia Foundation for community-developed tools and bots. These tools provide analysis and data to support wiki editors and functionaries.\r\n\r\n* **[Account Eligibility](https://meta.toolforge.org/accounteligibility/)** analyzes a user account to determine whether it's eligible to vote in the specified event.\r\n* **[Category Analysis](https://meta.toolforge.org/catanalysis/)** analyzes edits to pages in the category tree rooted at the specified category (or pages rooted at a prefix). This is primarily intended for test project analysis by the Wikimedia Foundation [language committee](https://meta.wikimedia.org/wiki/Language_committee).\r\n* **[Crosswiki Activity](https://meta.toolforge.org/crossactivity/)** measures a user's latest edit, bureaucrat, or sysop activity on all wikis.\r\n* **[Global Groups](https://meta.toolforge.org/globalgroups/)** shows a live review of extra permissions assigned to [global groups](https://meta.wikimedia.org/wiki/Steward_handbook#Globally_and_wiki_sets) on Wikimedia Foundation wikis.\r\n* **[Global User Search](https://meta.toolforge.org/gusersearch/)** provides searching and filtering of global users on Wikimedia wikis.\r\n* **[ISO 639 Database](https://meta.toolforge.org/iso639db/)** is a searchable database of languages and ISO 639 codes augmented by native language names from Wikipedia.\r\n* **[Magic Redirect](https://meta.toolforge.org/magicredirect/)** redirects to an arbitrary URL with tokens based on user and wiki filled in. This is primarily intended for Wikimedia templates ([see example](https://meta.toolforge.org/magicredirect/?url=//{wiki.domain}/wiki/Special:UserRights/{user.name}@{wiki.name}\u0026wiki=metawiki\u0026user=Pathoschild)).\r\n* **[Stalktoy](https://meta.toolforge.org/stalktoy/)** shows global details about a user across all Wikimedia wikis. You can provide an account name (like `Pathoschild`), an IPv4 address (like `127.0.0.1`), an IPv6 address (like `2001:db8:1234::`), or a CIDR block (like `212.75.0.1/16` or `2600:3C00::/48`).\r\n* **[Stewardry](https://meta.toolforge.org/stewardry/)** estimates which users in a group are available based on their last edit or action.\r\n* **[Synchbot](https://meta.wikimedia.org/wiki/Synchbot)** synchronises user pages across Wikimedia projects in every language. This allows users to create user pages on every wiki, or to have global JavaScript and CSS. (Due to the potential for misuse, this bot is not open-source.)\r\n* **[User Pages](https://meta.toolforge.org/userpages/)** finds your user pages on all wikis (or finds wikis where you don't have user pages).\r\n\r\n### User scripts\r\n\r\nThese user scripts extend the wiki interface seen by a user, and they're sometimes available to all users as gadgets (particularly TemplateScript). See _[Gadget kitchen](https://www.mediawiki.org/wiki/Gadget_kitchen)_ for an introduction to user scripts \u0026 gadgets.\r\n\r\n* **[ForceLTR](https://meta.wikimedia.org/wiki/Force_ltr)** enforces left-to-right layout and editing on right-to-left wikis. This resolves editing glitches in many browsers when one's preferred language is left-to-right, and corrects display when the interface language is not right-to-left.\r\n* **[StewardScript](https://meta.wikimedia.org/wiki/StewardScript)** extends the user interface for [Wikimedia stewards](https://meta.wikimedia.org/wiki/Stewards)' convenience. It extends the sidebar (with links to steward pages), [Special:Block](https://meta.wikimedia.org/wiki/Special:Block) (with links to [stalktoy](https://toolserver.org/~pathoschild/stalktoy/) and [Special:CentralAuth](https://meta.wikimedia.org/wiki/Special:CentralAuth) if preloaded with a target), [Special:CentralAuth](https://meta.wikimedia.org/wiki/Special:CentralAuth) (with links to external tools, one-click status selection, a preselected template reason, and convenient links in the 'local accounts' list), global renaming and [Special:UserRights](https://meta.wikimedia.org/wiki/Special:UserRights) (with template summaries).\r\n* **[TemplateScript](https://meta.wikimedia.org/wiki/TemplateScript)** adds a menu of configurable templates and scripts to the sidebar. It automatically handles templates for various forms (from editing to protection), edit summaries, auto-submission, and filtering which templates are shown based on namespace, form, or arbitrary conditions. Templates can be inserted at the cursor position or at a preconfigured position, and scripts can be invoked when a sidebar link is activated. TemplateScript is also used as a framework for other scripts, and includes a [fully-featured regex editor](https://meta.wikimedia.org/wiki/User:Pathoschild/Scripts/TemplateScript#Regex_editor).\r\n* **[UseJS](https://meta.wikimedia.org/wiki/UseJS)** imports JavaScript for the current page when the URL contains a parameter like `\u0026usejs=MediaWiki:Common.js`. It only accepts scripts in the protected `MediaWiki:` namespace.\r\n\r\n## For maintainers\r\n### Deploy to Toolforge\r\nThis repo uses three Toolforge accounts by default:\r\n\r\naccount | tools\r\n------- | -----\r\n`meta`  | most tools\r\n`meta2` | crossactivity\r\n`meta3` | stalktoy\r\n\r\nThey redirect as needed, so all tools can be accessed through eitherhostname. To use different\r\naccounts, edit the `tool-labs/backend/modules/__config__.php` and `tool-labs/.lighttpd*` files\r\naccordingly.\r\n\r\nTo deploy from scratch:\r\n\r\n1. [Connect to Toolforge via SSH](https://wikitech.wikimedia.org/wiki/Portal:Toolforge/Tool_Accounts).\r\n2. Run this script:\r\n   ```sh\r\n   ##########\r\n   ## Set up meta\r\n   ##########\r\n   # switch to the meta project\r\n   become meta\r\n\r\n   ## set up tool files\r\n   git clone https://github.com/Pathoschild/Wikimedia-contrib.git git/wikimedia-contrib\r\n   mkdir cache\r\n   mkdir public_html\r\n   ln -s git/wikimedia-contrib/tool-labs/.lighttpd.meta.conf .lighttpd.conf\r\n   cd public_html\r\n   for TARGET in backend content 'toolinfo.json' accounteligibility catanalysis globalgroups gusersearch iso639db magicredirect pgkbot regextoy stewardry userpages\r\n   do\r\n      ln -s \"../git/wikimedia-contrib/tool-labs/$TARGET\"\r\n   done\r\n\r\n   # set up script CDN (accessed via https://tools-static.wmflabs.org/meta/scripts/*.js).\r\n   mkdir ~/www\r\n   mkdir ~/www/static\r\n   cd ~/www/static\r\n   ln -s ~/git/wikimedia-contrib/user-scripts scripts\r\n\r\n   ## launch server\r\n   webservice --backend=kubernetes start\r\n\r\n\r\n   ##########\r\n   ## Set up meta2\r\n   ##########\r\n   ## switch to the meta2 project\r\n   exit\r\n   become meta2\r\n\r\n   ## set up files\r\n   git clone https://github.com/Pathoschild/Wikimedia-contrib.git git/wikimedia-contrib\r\n   mkdir cache\r\n   mkdir public_html\r\n   ln -s git/wikimedia-contrib/tool-labs/.lighttpd.meta2.conf .lighttpd.conf\r\n   cd public_html\r\n   for TARGET in backend content crossactivity\r\n   do\r\n      ln -s \"../git/wikimedia-contrib/tool-labs/$TARGET\"\r\n   done\r\n\r\n   ## launch server\r\n   webservice --backend=kubernetes start\r\n\r\n\r\n   ##########\r\n   ## Set up meta3\r\n   ##########\r\n   ## switch to the meta3 project\r\n   exit\r\n   become meta3\r\n\r\n   ## set up files\r\n   git clone https://github.com/Pathoschild/Wikimedia-contrib.git git/wikimedia-contrib\r\n   mkdir cache\r\n   mkdir public_html\r\n   ln -s git/wikimedia-contrib/tool-labs/.lighttpd.meta3.conf .lighttpd.conf\r\n   cd public_html\r\n   for TARGET in backend content stalktoy\r\n   do\r\n      ln -s \"../git/wikimedia-contrib/tool-labs/$TARGET\"\r\n   done\r\n\r\n   ## launch server\r\n   webservice --backend=kubernetes start\r\n   ```\r\n\r\nThat's it! The new tools should now be running at https://meta.toolforge.org. To update an account\r\nlater, just login and run these commands:\r\n\r\n```sh\r\ngit -C git/wikimedia-contrib pull\r\nwebservice restart\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpathoschild%2Fwikimedia-contrib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpathoschild%2Fwikimedia-contrib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpathoschild%2Fwikimedia-contrib/lists"}