Wikipedia:Bots/Requests for approval/C1MM-bot 3
Operator: C1MM (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 04:42, Thursday, December 12, 2024 (UTC)
Automatic, Supervised, or Manual: automatic
Programming language(s): Python
Source code available:
Function overview: Adds or modifies election templates in 'Results' section of Indian Lok Sabha/Assembly constituencies
Links to relevant discussions (where appropriate):
Edit period(s): One time run on a category of pages.
Estimated number of pages affected: ~4000
Exclusion compliant (Yes/No): No
Already has a bot flag (Yes/No): Yes
Function details: This bot modifies the results sections of Indian Lok Sabha/assembly constituencies. It takes the 'Results' section and for the most recent two elections with published data it adds in all candidates with vote percentages above 0.9% and removing candidates with vote percentages under 0.9%. It does not edit candidate data (i.e. hyperlinks are preserved) except to correctly capitalise candidate names in all upper case. 'change' parameter is only filled if there is no elections which take place between the two data.
Candidates are sorted by vote totals and the subsections are sorted by election years in descending order (most recent election comes first). If a 'Results' section does not exist, it is placed in front of the 'References' section and the results from the two most recent elections are placed there.