Grants:Project/Rapid/-jem-/Chronology sorting

From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search
Chronology sorting
Developing a new bot module and web tool to rearrange interactively and automatically the lists and tables of content pages which contain years or dates to follow the chronological order (from oldest to newest).
targetes.wikipedia initially; others in the future
start dateApril 27
start year2019
end dateJune 3
end year2019
budget (local currency)800 EUR
budget (USD)904.99 USD
grant typeIndividual

Project Goal[edit]

Briefly explain what are you trying to accomplish with this project, or what do you expect will change as a result of this grant. Example goals include, "recruit new editors", "add high quality content", or "train existing editors on a specific skill".

Exposition for es.wikipedia, can be extrapolated for other projects
In this thread in the Village Pump of Wikipedia in Spanish in 2015 a consensus was established to use the oldest to newest order in lists with years or dates in the pages (articles and annexes), after it was noted that the reverse order is used quite often. The task was added to the bot Grillitus, but it was just for tables, it fixed just one article, its code was not published and it is no longer active.
Currently the problem is still present in hundreds of articles, probably more than 1000, and this is a specially unpleasant task for humans, as it requires copying and pasting line by line, from and to different points of the text every time. So, the main goal is to improve the encyclopedical format of an important number of articles, and also to allow editors to spend their time in more profitable tasks.
The code will include the possibility of working on projects other than es.wikipedia with very little extra work (mostly about including local full date formats).

Project Plan[edit]


Tell us how you'll carry out your project. What will you and other organizers spend your time doing?

The project will be split into two complementary parts:
1. Bot module. It will be integrated with the functions and modules already programmed by me for the Wikimedia Projects, in use under the account Jembot. These will be some of its features:
  • The wikitext will be analyzed and each list or table with years or dates will be identified and treated separately.
  • Several formats of years or dates will be recognized (full dates with month names, parenthesis, different dashes and spaces around them, etc.).
  • Each line or row will be asigned a date mark which will be used to establish the order and rearrange the contents.
  • The order of the bibliographic listings, which is normally alphabetical, will be respected.
  • Cases in which there are more than one year or date per line or row will be excluded, logged and categorized for manual review.
  • The "sortable" class will be added to "wikitable" tables which doesn't have it (extra feature added after positive feedback).
2. Web tool. It will be available in the Toolforge servers under my tool Jembot, and it will include:
  • User interface to write freely any article or annex to be checked and fixed by the bot module.
  • Suggestions list of articles and annexes which haven't been examined yet and are likely to need sorting, according to properties read from Wikidata or words like "date(s)" or "year(s)" in the title (actors, writers, prizes, annual events, etc.).
  • Communication with the bot module to pass on the article name and receive the current status information, and then to pass on the article name and lists or tables selected in it to make the sorting.
  • User interaction to show the lists or tables detected, their current status and the status after the changes, and to allow the user to select which lists or tables need sorting and which ones don't.
  • Show statistics and useful information.

How will you let others in your community know about your project (please provide links to where relevant communities have been notified of your proposal, and to any other relevant community discussions)? Why are you targeting a specific audience?

The project, together with other ideas presented for discussion and evaluation for future grant proposals, has been announced in several Wikimedia projects:
All announcements refer to this page in es.wikipedia for the discussion of all my ideas, or this page in meta for other Wikimedia projects to be included.
I have targeted specifically other projects in Spanish and the Wikipedias in the other languages spoken in Spain because they are nearby communities with which I can communicate easily and which probably already know me or my work. Anyway, the idea can be carried on to any other project which has this kind of lists or tables in their contents, and I don't exclude anyone, but when getting down to the announcements, time and practical limitations made me choose only those ones.

What will you have done at the end of your project? How will you follow-up with people that are involved with your project?

After programming and testing, the web tool will be available and operational at and users will have the possibility to select an article or annex of the suggestions list, or write an article or annex name on their own. After accepting the information about the changes that will be done, the tool will invoke the bot code, the fix will be done under the Jembot account, and the user will see the link for the diff of the result. The operation will be logged, in order to exclude the page from current and future suggestions lists. The tool will also include some use statistics and other useful information.
The project will stay open indefinitely to further feedback and improvements with my volunteer time, and anyone interested in getting involved will be welcome to do so.


How will you know if the project is successful and you've met your goals? Please include the following targets and feel free to add more specific to your project:

  1. Number of total participants: N/A (the tool will be anonymous, but this could change in the future)
  2. Number of articles improved: 75 at least, for the tests and startup phase in es.wikipedia (potentially, more than 1000 articles or annexes could be fixed with future uses, not counting other projects)
  3. Number of media uploaded to Wikimedia Commons: N/A
  4. Number of media used on Wikimedia projects: N/A


What resources do you have? Include information on who is the organizing the project, what they will do, and if you will receive support from anywhere else (in-kind donations or additional funding).

The programming and testing will be carried on totally by myself, with feedback of any wikimedians interested, of course. The code will be published, so other contributions can come through direct code improvements in the future. There are no additional donations or funding.

What resources do you need? For your funding request, list bullet points for each expense:

  • Previous work: search and analysis of cases and exceptions, general code design (5 h)
  • Addition of bot code for wikitext parsing, sorting and updating (10 h)
  • Addition of web tool code for bot invocation at user request (10 h)
  • Extraction of lists of suggested articles for the web tool (using Wikidata properties, project titles and log checking) (5 h)
  • Documentation and integration in my framework for logging, source code publishing, etc. (2 h)
Total: 32 hours, at a rate of 25 euros/hour (after careful consideration of all factors involved): 800 euros
That would be completed with my volunteer time in complementary tasks and future maintenance.