wikimedia-gadgets / afc-helper

A tool for reviewing Articles for Creation submissions on the English Wikipedia
https://en.wikipedia.org/wiki/Wikipedia:AFCH
GNU General Public License v3.0
37 stars 80 forks source link

Integrate DraftCleaner script with AFCH clean submission button #200

Closed NovemLinguae closed 2 years ago

NovemLinguae commented 3 years ago

Novem Linguae's DraftCleaner is a user script that cleans up drafts by running regex's on its wikitext.

List of DraftCleaner features ```` - converts [inline external links] to s - reduces more than 2 enters in a row, to 2 enters - removes spaces in front of s - get rid of any level 2 heading that contains the article's title - bold the first occurrence of the article title - remove bold from headings - convert =TitleHeading= to ==H2Heading== - replace Covid-19 with COVID-19 - remove enter characters between s - trim whitespace at beginning and end - remove self wikilinks to the article title - convert ==Reference== to ==References== - swap ref period with period ref - turn bare URLs into references - fix errant spaces at beginning of lines, which makes a blockquote looking thing - add references section if missing - delete whitespace at the end of lines - convert smart quotes to regular quotes - convert double spaces to single spaces - remove blank heading - in refs, turn short links into long links, so you can see the domain - change year range dash to ndash - if in draftspace, and draft in categories, disable the categories - delete
. in drafts, these are usually poorly placed - fix empty references section - right align images - remove whitespace if that is the only character on a line - correct capitalization of see also, references, further reading, external links - if article has headings but no lead, remove first heading - replace unicode bullets with asterisks ````

@enterprisey suggested that DraftCleaner be merged into AFCH here, and I am open to it. I'd like to use this ticket to gauge consensus for this and to discuss implementation details.