Skip to content

Instantly share code, notes, and snippets.

@RayBB
Created April 12, 2020 17:11
Show Gist options
  • Save RayBB/c743bf664e60d22f2d917462a22e80f7 to your computer and use it in GitHub Desktop.
Save RayBB/c743bf664e60d22f2d917462a22e80f7 to your computer and use it in GitHub Desktop.
Helps me edit Wikipedia faster
property comment : "adding links to other articles"
on run {input, parameters}
(*
Follow the steps here to get this setup:
https://apple.stackexchange.com/questions/175215/how-do-i-assign-a-keyboard-shortcut-to-an-applescript-i-wrote
Wikipedia hotkeys here:
https://en.wikipedia.org/wiki/Wikipedia:Keyboard_shortcuts
This is a small script to help make editing Wikipedia faster
I found an article that does have any pages linking to it so I search wikipedia for pages mentioning the article and add the link.
Once I add the link I use the hotkey CMD+SHIFT+. to activate this script which: opens the publish dialogue, adds comment, marks as minor, and publishes.
*)
tell application "System Events"
keystroke "i" using {control down, option down} -- open publish dialog as minor edit
delay 1
keystroke comment
keystroke "s" using {control down, option down} -- publish
delay 2
keystroke "w" using {command down} -- close tab
end tell
return input
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment