Grants:Project/Jayprakash12345/Improve documentation of MediaWiki maintenance scripts/Final

From Meta, a Wikimedia project coordination wiki


Report accepted
This report for a Project Grant approved in FY 2020-21 has been reviewed and accepted by the Wikimedia Foundation.



Welcome to this project's final report! This report shares the outcomes, impact and learnings from the grantee's project.

Part 1: The Project[edit]

Summary[edit]

This project is about to improve the documentation of MediaWiki maintenance scripts on MediaWiki.org. There are almost 200+ maintenance scripts. Out of 200+, 125 scripts needed to document, and others were required to restructure. There were 42 scripts that only have a predefined template, and 43 scripts that only had predefined template + one-line descriptions.

MediaWiki maintenance scripts play a vital role in wiki maintenance. According to WikiApiary, There are 21647 standalone wikis and it is painful for the sysadmin to read documentation from the docstring of the script file before running the maintenance script. Lack of documentation can cost to site down for some time. MediaWiki.org is the primary source to provide these kinds of basic support. According to MassViews in 2021, There were 287 views per day on maintenance script pages. So it became important to document them on MediaWiki.org.


Under this project, 180 MediaWiki maintenance scripts have been documented in a structured way with Details, Options/Arguments, Usage, and Common issues section along with Category.

Apart from this, 13 categories have been created according to the nature of the scripts, and the landing main page has been rewritten along with their new sidebar.

Project Goals[edit]

  • Creating a format/structure with minimum sections like Details, Usage, Parameter/Options, and Troubleshooting.
Originally only 124 scripts mentioned on grant proposal page for documentation but 180 MediaWiki maintenance scripts have been documented in a structured way. This structured documentation consists Details, Options/Arguments, Usage, and Common issues sections (Troubleshooting section renamed to Common issues; The scripts that don't require troubleshooting, don't have this section). And every 180 script also have category in it according to their nature.
  • Creating templates for maintenance script documentations
Under this project, mw:Template:Maintenance scripts and mw:Template:Force option have been created. These templates are used in the scripts pages and main landing pages. These templates help to remove repeated work.
  • Expanding scripts having an only predefined template
All 42 scripts mentioned on grant proposal page has been documented.
  • Expanding scripts having predefined template + one-line description
Out of 43 scripts mentioned on grant proposal page, 40 scripts has been documented. In remaining three, two scripts are include files that don't require documentation as they are scripts to support other scrips.
  • Expanding scripts having predefined template + one-line description + outdated template
Out of 8 scripts mentioned on grant proposal page, 6 scripts has been documented.
  • Expanding/Improving other scripts
All 31 scripts mentioned on grant proposal page has been documented.

Project Impact[edit]

Targets[edit]

Planned measure of success
(include numeric target, if applicable)
Actual result Explanation
124 scripts 180 scripts Originally 124 maintenance scripts were planned to document in grant but we go beyond that.


Grantee documented the below scripts with the following details.

S. No. Script Details Parameter/Options Usage See also Category
1 generateSchemaSql.php YesY YesY YesY YesY YesY
2 makeTestEdits.php YesY YesY YesY YesY YesY
3 findMissingFiles.php YesY YesY YesY YesY YesY
4 findDeprecated.php YesY YesY YesY YesY YesY
5 invalidateUserSessions.php YesY YesY YesY YesY YesY
6 jsparse.php YesY YesY YesY YesY YesY
7 validateRegistrationFile.php YesY YesY YesY YesY YesY
8 resetPageRandom.php YesY YesY YesY YesY YesY
9 dumpCategoriesAsRdf.php YesY YesY YesY YesY YesY
10 mysql.php YesY YesY YesY YesY YesY
11 view.php YesY YesY YesY YesY YesY
12 protect.php YesY YesY YesY YesY YesY
13 mctest.php YesY YesY YesY YesY YesY
14 orphans.php YesY YesY YesY YesY YesY
15 populateInterwiki.php YesY YesY YesY YesY YesY
16 purgeModuleDeps.php YesY YesY YesY YesY YesY
17 mcc.php YesY YesY YesY YesY YesY
18 addSite.php YesY YesY YesY YesY YesY
19 categoryChangesAsRdf.php YesY YesY YesY YesY YesY
20 deleteTag.php YesY YesY YesY YesY YesY
21 exportSites.php YesY YesY YesY YesY YesY
22 importSites.php YesY YesY YesY YesY YesY
23 refreshFileHeaders.php YesY YesY YesY YesY YesY
24 renameRestrictions.php YesY YesY YesY YesY YesY
25 initUserPreference.php YesY YesY YesY YesY YesY
26 cleanupRevActorPage.php YesY YesY YesY YesY YesY
27 checkBadRedirects.php YesY YesY YesY YesY YesY
28 findOrphanedFiles.php YesY YesY YesY YesY YesY
29 migrateFileRepoLayout.php YesY YesY YesY YesY YesY
30 copyFileBackend.php YesY YesY YesY YesY YesY
31 updateCredits.php YesY YesY YesY YesY YesY
32 manageForeignResources.php YesY YesY YesY YesY YesY
33 cleanupRemovedModules.php YesY YesY YesY YesY YesY
34 populateBacklinkNamespace.php YesY YesY YesY YesY YesY
35 populateRevisionSha1.php YesY YesY YesY YesY YesY
36 runBatchedQuery.php YesY YesY NoN YesY YesY
37 syncFileBackend.php YesY YesY YesY YesY YesY
38 checkImages.php YesY YesY YesY YesY YesY
39 manageJobs.php YesY YesY YesY YesY YesY
40 mergeMessageFileList.php YesY YesY YesY YesY YesY
41 cleanupBlocks.php YesY YesY YesY YesY YesY
42 addRFCandPMIDInterwiki.php YesY YesY YesY YesY YesY
43 checkDependencies.php YesY YesY YesY YesY YesY
44 deduplicateArchiveRevId.php YesY YesY YesY YesY YesY
45 deleteAutoPatrolLogs.php YesY YesY YesY YesY YesY
46 populateIpChanges.php YesY YesY YesY YesY YesY
47 minify.php YesY YesY YesY YesY YesY
48 populatePPSortKey.php YesY YesY YesY YesY YesY
49 refreshExternallinksIndex.php YesY YesY YesY YesY YesY
50 checkLess.php YesY YesY YesY YesY YesY
51 deleteSelfExternals.php YesY YesY YesY YesY YesY
52 populateArchiveRevId.php YesY YesY YesY YesY YesY
53 updateArticleCount.php YesY YesY YesY YesY YesY
54 cleanupWatchlist.php YesY YesY YesY YesY YesY
55 deleteLocalPasswords.php YesY YesY YesY YesY YesY
56 populateParentId.php YesY YesY YesY YesY YesY
57 removeUnusedAccounts.php YesY YesY YesY YesY YesY
58 purgeExpiredWatchlistItems.php YesY YesY YesY YesY YesY
59 purgeExpiredUserrights.php YesY YesY YesY YesY YesY
60 updateExtensionJsonSchema.php YesY YesY YesY YesY YesY
61 getConfiguration.php YesY YesY YesY YesY YesY
62 renameDbPrefix.php YesY YesY YesY YesY YesY
63 updateRestrictions.php YesY YesY YesY YesY YesY
64 initEditCount.php YesY YesY YesY YesY YesY
65 patchSql.php YesY YesY YesY YesY YesY
66 convertUserOptions.php YesY YesY YesY YesY YesY
67 preprocessorFuzzTest.php YesY YesY YesY YesY YesY
68 fixExtLinksProtocolRelative.php YesY YesY YesY YesY YesY
69 dumpLinks.php YesY YesY YesY YesY YesY
70 generateLocalAutoload.php YesY YesY YesY YesY YesY
71 cleanupInvalidDbKeys.php YesY YesY YesY YesY YesY
72 getReplicaServer.php YesY YesY YesY YesY YesY
73 checkUsernames.php YesY YesY YesY YesY YesY
74 rebuildmessages.php YesY YesY YesY YesY YesY
75 formatInstallDoc.php YesY YesY YesY YesY YesY
76 showSiteStats.php YesY YesY YesY YesY YesY
77 rebuildImages.php YesY YesY YesY YesY YesY
78 deleteOrphanedRevisions.php YesY YesY YesY YesY YesY
79 importSiteScripts.php YesY YesY YesY YesY YesY
80 checkComposerLockUpToDate.php YesY YesY YesY YesY YesY
81 deleteDefaultMessages.php YesY YesY YesY YesY YesY
82 purgeChangedPages.php YesY YesY YesY YesY YesY
83 fixTimestamps.php YesY YesY YesY YesY YesY
84 migrateImageCommentTemp.php ‎ YesY YesY YesY YesY YesY
85 tidyUpT39714.php YesY YesY YesY YesY YesY
86 uppercaseTitlesForUnicodeTransition.php YesY YesY YesY YesY YesY
87 fixDefaultJsonContentPages.php YesY YesY YesY YesY YesY
88 populateFilearchiveSha1.php YesY YesY YesY YesY YesY
89 populateImageSha1.php YesY YesY YesY YesY YesY
90 populateExternallinksIndex60.php YesY YesY YesY YesY YesY
91 populateLogSearch.php YesY YesY YesY YesY YesY
92 compareParserCache.php YesY YesY YesY YesY YesY
93 findHooks.php YesY YesY YesY YesY YesY
94 fileOpPerfTest.php YesY YesY YesY YesY YesY
95 getSlaveServer.php YesY YesY YesY YesY YesY
96 mwdoc-filter.php YesY YesY YesY YesY YesY
97 populateRecentChangesSource.php ‎ YesY YesY YesY YesY YesY
98 populateRevisionLength.php YesY YesY YesY YesY YesY
99 populateContentTables.php YesY YesY YesY YesY YesY
100 pruneFileCache.php‎ YesY YesY YesY YesY YesY
101 purgeChangedFiles.php YesY YesY YesY YesY YesY
102 populateLogUsertext.php YesY YesY YesY YesY YesY
103 clearInterwikiCache.php YesY YesY YesY YesY YesY
104 eraseArchivedFile.php YesY YesY YesY YesY YesY
105 deleteBatch.php YesY YesY YesY YesY YesY
106 refreshImageMetadata.php YesY YesY YesY YesY YesY
107 populateCategory.php YesY YesY YesY YesY YesY
108 nukePage.php YesY YesY YesY YesY YesY
109 updateDoubleWidthSearch.php YesY YesY YesY YesY YesY
110 dumpTextPass.php YesY YesY YesY YesY YesY
111 attachLatest.php‎ YesY YesY YesY YesY YesY
112 fixUserRegistration.php YesY YesY YesY YesY YesY
113 updateCollation.php‎ YesY YesY YesY YesY YesY
114 copyJobQueue.php‎ YesY YesY YesY YesY YesY
115 wrapOldPasswords.php‎ YesY YesY YesY YesY YesY
116 alltrans.php YesY YesY YesY YesY YesY
117 langmemusage.php YesY YesY YesY YesY YesY
118 dumpMessages.php YesY YesY YesY YesY YesY
119 digit2html.php YesY YesY YesY YesY YesY
120 benchmarkHooks.php YesY YesY YesY YesY YesY
121 benchmarkParse.php YesY YesY YesY YesY YesY
122 benchmarkPurge.php YesY YesY YesY YesY YesY
123 checkStorage.php YesY YesY YesY YesY YesY
124 moveToExternal.php YesY YesY YesY YesY YesY
125 lag.php YesY YesY YesY YesY YesY
126 dumpRev.php YesY YesY YesY YesY YesY
127 date-formats.php YesY YesY YesY YesY YesY
128 listVariants.php YesY YesY YesY YesY YesY
129 sql.php YesY YesY YesY YesY YesY
130 SqliteMaintenance.php YesY YesY YesY YesY YesY
131 sqlite.php YesY YesY YesY YesY YesY
132 sqlite.inc YesY n/a n/a YesY YesY
133 doMaintenance.php YesY n/a YesY YesY YesY
134 createCommonPasswordCdb.php YesY YesY YesY YesY YesY
135 convertExtensionToRegistration.php ‎ YesY YesY YesY YesY YesY
136 deleteArchivedFiles.php ‎ YesY YesY YesY YesY YesY
137 deleteArchivedRevisions.php ‎ YesY YesY YesY YesY YesY
138 deleteEqualMessages.php ‎ YesY YesY YesY YesY YesY
139 deleteOldRevisions.php ‎ YesY YesY YesY YesY YesY
140 deleteUserEmail.php‎ YesY YesY YesY YesY YesY
141 fixMergeHistoryCorruption.php ‎ YesY YesY YesY YesY YesY
142 getText.php‎ YesY YesY YesY YesY YesY
143 fetchText.php YesY YesY YesY YesY YesY
144 findClasses.php YesY YesY YesY YesY YesY
145 emptyUserGroup.php ‎ YesY YesY YesY YesY YesY
146 findMissingActors.php ‎ YesY YesY YesY YesY YesY
147 getLagTimes.php YesY YesY YesY YesY YesY
148 generateConfigDefaultSettings.php ‎ YesY YesY YesY YesY YesY
149 generateConfigNames.php‎ YesY YesY YesY YesY YesY
150 generateConfigSchemaArray.php YesY YesY YesY YesY YesY
151 generateConfigSchemaYaml.php YesY YesY YesY YesY YesY
152 cleanupUsersWithNoId.php ‎ YesY YesY YesY YesY YesY
153 createAndPromote.php YesY YesY YesY YesY YesY
154 cleanupUploadStash.php YesY YesY YesY YesY YesY
155 cleanupTitles.php YesY YesY YesY YesY YesY
156 cleanupSpam.php YesY YesY YesY YesY YesY
157 cleanupPreferences.php YesY YesY YesY YesY YesY
158 cleanupEmptyCategories.php YesY YesY YesY YesY YesY
159 cleanupCaps.php YesY YesY YesY YesY YesY
160 addChangeTag.php YesY YesY YesY YesY YesY
161 blockUsers.php ‎ YesY YesY YesY YesY YesY
162 changePassword.php ‎ YesY YesY YesY YesY YesY
163 createBotPassword.php ‎ YesY YesY YesY YesY YesY
164 dumpUploads.php ‎ YesY YesY YesY YesY YesY
165 invalidateBotPasswords.php ‎ YesY YesY YesY YesY YesY
166 migrateActors.php ‎ YesY YesY YesY YesY YesY
167 nukeNS.php YesY YesY YesY YesY YesY
168 pageExists.php ‎ YesY YesY YesY YesY YesY
169 populateChangeTagDef.php ‎ ‎ YesY YesY YesY YesY YesY
170 purgeExpiredBlocks.php‎ YesY YesY YesY YesY YesY
171 purgeOldText.php YesY YesY YesY YesY YesY
172 purgePage.php‎ YesY YesY YesY YesY YesY
173 reassignEdits.php YesY YesY YesY YesY YesY
174 rebuildall.php YesY YesY YesY YesY YesY
175 rebuildrecentchanges.php‎ YesY YesY YesY YesY YesY
176 rebuildtextindex.php ‎ ‎ YesY YesY YesY YesY YesY
177 removeInvalidEmails.php ‎ ‎ YesY YesY YesY YesY YesY
178 recountCategories.php‎ YesY YesY YesY YesY YesY
179 purgeMessageBlobStore.php YesY YesY YesY YesY YesY
180 purgeParserCache.php‎ YesY YesY YesY YesY YesY

Story[edit]

When I got this grant approved, I got COVID infected along with my family at that time. That was hard time for me as this project slip for two months. But my project advisor Alex was so supportive that we started project with new energy.

There were many things that I did not think but I added that thing in scripts while documentation like using MW version template to show MediaWiki version in which the script was added.

Originally, I planned for 124 script as mentioned in the grant proposal. But I got so interested in this project that I continued the work till 180 maintenace script. We finnally finished the work with 180 maintenace. This number is too far from what I expected while starting the work.

It is weird for me but an experienced user endorsed my grant even after 9 months after from grant approved. This show success of this project.

Survey(s)[edit]

Project Pralekhan feedback was collected from 25 Feb 2022 to 5 March 2022 through Google Forms. We got 12 responses from Google Form. There are 6 responses with username (including 2 WMF staff). Please read the detailed compiled version at mw:Project Pralekhan/Survey Result.

Interesting outputs or outcomes
  1. 91% of users are finding new structured documentation helpful. (A huge surprise success)
  2. 75% users are satisfied with the usage section (Again, huge success as project documentation main goal was to demonstrate usage)
  3. 33% users are not finding easy navigation between the scripts. (We improved mw:Manual:Maintenance scripts/List of scripts based on this feedback)
  4. Use LimeSurvey ( LimeSurvey ) instead of Google Form for future surveys as Google Form is forbidden in China and many other countries.

Apart from this, grantee also took a Unconference session on this project at Wikimania 2021 to showcase and take feedback from community.

Other[edit]

Is there another way you would prefer to communicate the actual results of your project, as you understand them? You can do that here!

Methods and activities[edit]

Project resources[edit]

Learning[edit]

What worked well[edit]

It is now good to see that so many scripts now have structured documentation. With great help from APaskulin (WMF), I have done 180 maintenance scripts. Everything going very well except the below challenges.

I find below learning pattern useful:

What didn’t work[edit]

  • Every script has its own use so creating the environment for every script is sometimes very stressful. I need to collect information and then have to replicate different-different situations for every script to run in the terminal.
  • Some scripts have a bug (Like one I discovered during this project see phab:T291331) that makes documentation a little bit hard.
  • I faced an issue with collecting feedback from visitors as it has some privacy concern that needs some follow-up with WMF's legal team. It was discussed with project advisor at phab:T295695 and we decided to not take feedback at wiki instead, used Google Form.

Other recommendations[edit]

If you have additional recommendations or reflections that don’t fit into the above sections, please list them here.

Next steps and opportunities[edit]

There are total of 200-250 maintenance scripts. Under this project, I have documented 180 maintenance scripts. This project already done lot of work and there is small amount of work remained. So I will be work on those as volunteer to document them. So there is nothing major for future's next steps.

Part 2: The Grant[edit]

Finances[edit]

Actual spending[edit]

Expense Approved amount Actual funds spent Difference
Technical writer 8750 8750 0
Internet 200 240 -40
Contingency 400 261 139
Total 9350 9251 99


There is a minor $40 increase in the Internet bill as I forget to add tax on the $200 internet plan. There is an 18% of Goods and Services tax per Government of India. This amount has been adjusted through the contingency fund.

Although, It took 420 hours for the technical writer as he documented 180 scripts instead 124 scripts that were originally mentioned in the grant. But this is not being compensated through a contingency fund. It is just being mentioned here for any reference.

Remaining funds[edit]

Do you have any unspent funds from the grant?

Remaining funds have been used or will be used for other approved mission-aligned activities. This use has been requested in writing and approved by WMF.
  • Yes, the remaining amount is 99 USD. Since, It is part of contingency so this was as a backup fund.

If you have unspent funds, they must be returned to WMF. Please see the instructions for returning unspent funds and indicate here if this is still in progress, or if this is already completed:

Documentation[edit]

Did you send documentation of all expenses paid with grant funds to grantsadmin(_AT_)wikimedia.org, according to the guidelines here?

  • Yes

Confirmation of project status[edit]

Did you comply with the requirements specified by WMF in the grant agreement?

  • Yes, best in my knowledge.

Is your project completed?

  • Yes, with major success.

Grantee reflection[edit]

It is a really very awesome experience for me to work on maintenance scripts. Even, I have been working on MediaWiki since early 2017 but only after working on this project, I came to know many other scripts as well that are very useful. I got Alex as my mentor. I can't express how she is good in nature. A great thank you, Alex.

The project got some delay from my end which I acknowledge. But this is the nature of human work. We can't expect to things go as well as planned. Working and giving shape to this project with help of Alex really made me proud. Thank you again Alex for your support and WMF for funding.-Jayprakash >>> Talk 19:08, 30 March 2022 (UTC)