User:Darylgolden/sandbox

militiant, militant, regex testing

Proposed bodged semi-automated way of fixing typos on WP:Typo Team/moss

 * 1) Install AutoHotKey.
 * 2) Install JWB.
 * 3) Create a script that will do the functions stated below.
 * 4) Using a key binding, start the session. This will open a new window of a browser (Firefox) to the moss main page, identify the "quick link", open it, press "edit source" and copy and paste the text into a local file. It will then open AutoWikiBrowser/Script in a new tab, click the "Generate" button under Page list. It will then do the following:
 * Tick "Links on page" and enter "Wikipedia:Typo Team/moss/I", then click "Generate".
 * Under the editing tab, fill in an appropriate edit summary.
 * Using a python program, create a regex page of the misspelling listing.
 * Copy and paste the text in the regex page and paste it in the "Replace:" text box.
 * Enter "lfixl" (or some placeholder word) into the "Replace with:" text box.
 * Check the "Regular Expression" checkbox.
 * Click "More replace fields" and enter the same rule a few more times (for some reason, each rule only appears to work on one instance of a typo on a page).


 * 1) Press a binded key to start. The script will record the name of the first article. Make an autohotkey script that automatically presses Ctrl+F "lfixl" or your placeholder word to find it in the editing window. Using the script, bind a button to automatically press next on the Ctrl-F and highlight the word. Look at the left diff to figure out what the typo was.
 * For genuine typos, replace the placeholder word with the corrected word. Click "save" and repeat.
 * For false positives, press a binded key that will cause the script to skip the typo, and record the false positive.
 * To skip, press a binded key that will cause the script to skip the typo/page.


 * 1) To end the session, press a binded key that will
 * Close JWB.
 * From the copied text of the page, identify which pages have been fixed and remove them.
 * Identify which pages contain false positives, append a comment to that line, remove that line and then append it to case notes.
 * Paste the new text of the typo list into the editing window and save the page.

New way to fix TSDOT and TSCOMMA typos
Simply create a new find and replace regex list using the typo list already provided on the misspelling list. Method 1: (word|asda|sdad).(dgdfg|gdfgfdg|fgdfg) -> $1. $2. Method 2: Individual find and replace rules for each typo. Method 1 will produce more false positives but method 2 requires the importing of a new find and replace regex document thing.