{"id":16102326,"url":"https://github.com/chlodalejandro/deputy","last_synced_at":"2025-03-17T17:31:29.140Z","repository":{"id":39098564,"uuid":"471516759","full_name":"ChlodAlejandro/deputy","owner":"ChlodAlejandro","description":"Copyright cleanup and case processing tool for Wikipedia","archived":false,"fork":false,"pushed_at":"2024-04-29T01:19:45.000Z","size":17164,"stargazers_count":4,"open_issues_count":15,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-02T03:12:08.029Z","etag":null,"topics":["copyright","userscript","wikimedia","wikipedia"],"latest_commit_sha":null,"homepage":"https://chlodalejandro.github.io/deputy/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ChlodAlejandro.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-03-18T21:05:05.000Z","updated_at":"2024-05-06T02:33:20.009Z","dependencies_parsed_at":"2023-10-04T12:15:00.614Z","dependency_job_id":"8e435f7a-48fd-4f06-83db-f23e71405361","html_url":"https://github.com/ChlodAlejandro/deputy","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChlodAlejandro%2Fdeputy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChlodAlejandro%2Fdeputy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChlodAlejandro%2Fdeputy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChlodAlejandro%2Fdeputy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChlodAlejandro","download_url":"https://codeload.github.com/ChlodAlejandro/deputy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243872484,"owners_count":20361493,"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":["copyright","userscript","wikimedia","wikipedia"],"created_at":"2024-10-09T18:53:32.586Z","updated_at":"2025-03-17T17:31:28.267Z","avatar_url":"https://github.com/ChlodAlejandro.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deputy\n\n\u003cimg align=\"right\" width=\"70\" height=\"70\" alt=\"Deputy logo\" src=\"https://upload.wikimedia.org/wikipedia/commons/2/2b/Deputy_logo.svg\"\u003e\n\n[Deputy](https://w.wiki/7NWR) is\na [contributor copyright investigation](https://en.wikipedia.org/wiki/Wikipedia:Contributor_copyright_investigations) (CCI) and copyright cleanup assistance tool for Wikipedia. Its goal is to streamline the workflow for CCI case pages, making it easier to\nprocess and go through each case. For user-specific information, see [Wikipedia:Deputy](https://en.wikipedia.org/wiki/Wikipedia:Deputy).\n\nDeputy exposes a `deputy` variable on the `window` object for public use. The API is documented\nat [chlodalejandro.github.io/deputy](https://chlodalejandro.github.io/deputy/classes/Deputy.html).\n\nDeputy relies on modules from [Dispatch](https://github.com/ChlodAlejandro/deputy-dispatch) to\nperform bulk data operations. Dispatch is hosted on Wikimedia Toolforge, more information can be\nfound [here](https://github.com/ChlodAlejandro/deputy-dispatch#README).\n\n## Installation\nSee [Wikipedia:Deputy § Installation](https://en.wikipedia.org/wiki/Wikipedia:Deputy#Installation) on the English Wikipedia for more information.\n\n## Developing\n\nPlease clone with submodules (`--recursive`/`--recurse-submodules`) to ensure that\n[Dispatch types](https://github.com/ChlodAlejandro/deputy-dispatch-types)\nare also cloned alongside the repo.\n\nIf you forgot to clone with submodules, just run the following commands to\ninitialize the submodule for types:\n```bash\ngit submodule update --init --recursive\n```\n\nRun the development server with the following. Be sure to run `npm install` first to download required dependencies.\n\n```shell\nnpm run dev\n```\n\nImport the script into your user JavaScript file of\nchoice ([common.js](https://en.wikipedia.org/wiki/Special:MyPage/common.js)) with the following:\n\n```js\nmw.loader.load( \"http://localhost:45000/Deputy.js\" );\nmw.hook( 'deputy.preload' ).add( function () {\n\t// Replace resource root to load local development assets\n\twindow.deputy.resourceRoot = { type: \"url\", url: new URL( \"http://localhost:45000/\" ) };\n\twindow.deputy.getWikiConfig().then( function (wikiConfig) {\n\t\t// Used to test in a sandbox environment than on the actual CCI pagespace.\n\t\t// Feel free to change the values to fit your sandbox.\n\t\twikiConfig.cci.rootPage.set(new mw.Title( 'User:Chlod/Scripts/Deputy/tests' ));\n\t\twikiConfig.ia.rootPage.set(new mw.Title(\"User:Chlod/Scripts/Deputy/tests/Problems\"));\n\t} );\n} );\n```\n\n## Testing\n\n### Live testing\n\nBleeding edge builds of Deputy are always provided through [GitHub Actions](https://github.com/ChlodAlejandro/deputy/actions). You may experiment with these versions of Deputy, but keep in mind that they are **extremely unstable**\nand significant bugs may be found. Nevertheless,\nplease [report bugs found](https://github.com/ChlodAlejandro/deputy/issues) so that they may be actioned on.\n\n### Automated testing\n\nUnit and end-to-end tests exist for Deputy and can be found in the [`tests/`](tests) directory. These tests are run with\nSelenium and Jest. This ensures that Deputy's most vital components work as expected. Tests are still incomplete and\ncoverage is not available, however by the end of the project, at least one end-to-end test should be finished.\n\nYou can trigger automated testing by running the following:\n\n```shell\nnpm run test\n```\n\nYou may also modify the browser to be used with Selenium using the `BROWSER` environment variable.\n\nYou **must** have the appropriate browser driver installed for whichever browser you wish to test on. If you want to test on Chrome browsers, run `npm i -g chromedriver@106.x` prior to running any tests (and change `106` to whichever version of Chrome you're using). For Firefox, run `npm i -g geckodriver`. Not having the proper browser driver installed with causes tests to fail.\n\nSome automated tests require an internet connection as they load English Wikipedia pages. Ensure that you have a working (and decently fast) internet connection to pass tests.\n\n## Licensing\n\n```\nCopyright 2022 Chlod Aidan Alejandro\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n       https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\nThe userscript is bundled with multiple dependencies, all of which have been manually vetted for compatibility with the\nApache License 2.0. The userscript, in particular, bundles with the following libraries:\n\n* [tslib](https://github.com/Microsoft/tslib) - 0BSD, Microsoft - For TypeScript polyfills and helper functions.\n* [idb](https://github.com/jakearchibald/idb) - ISC, Jake Archibald - IndexedDB wrapper for ease of use.\n* [broadcastchannel-polyfill](https://github.com/JSmith01/broadcastchannel-polyfill) - Unlicense, Joshua Bell - Polyfill\n  for BroadcastChannel (facilitates communication between tabs).\n* [tsx-dom](https://github.com/Lusito/tsx-dom) - MIT, Santo Pfingsten - TSX/JSX that compiles to native `HTMLElement`s.\n\n## Funding\n\nThe initial development of Deputy was covered by a [Wikimedia Foundation Rapid Grant](https://w.wiki/4xk$). Deputy is now being maintained through volunteer effort without compensation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchlodalejandro%2Fdeputy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchlodalejandro%2Fdeputy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchlodalejandro%2Fdeputy/lists"}