This is a Google Docs script that uses a crowdsourced list of pairs of words and their pronunciations to automatically add them to a Google Doc (video here). Contributions of pronunciation guides, bug fixes, or features are very much appreciated.
- Open Google Doc of interest
- Click Tools -> Script Editor (will open new tab)
- Replace entire file with contents in autoPG.gs
- Press Ctrl-S or click the floppy symbol to save and enter 'autoPG' for the project name (or whatever you want)
- Close the tab and reload the Google Doc, you should now see an 'Auto PG' menu pop up to the right of the "Help" menu (it might take a second)
- Click Auto PG -> Insert PGs
- Click "Authorize" and chose your Google account
- If on Chrome, click "Advanced" and choose "Go to autoPG (unsafe)"
- Click "Allow" (this will give the script permission to modify the contents of your document)
- The tab will close and the script will run, asking the user to add a PG for each word it has a PG for
Step 8 will eventually be obviated, if/when I am able to publish the script as an Add On for Google Docs
- Currently only works for words with spaces before and after (e.g. " Aachen " but not " Aachen,")
- Currently case sensitive
- Breaks formatting for words in answerlines
- Running again will double up on PGs
Let me know of any issues!
- Priority value for PGs, allowing the user to only add PGs for words with a certain priority
- "Accept all PGs" button
- "Remove all PGs" menu item (right now PGs can be undone with a Ctrl-Z)
- A script for extracting PGs from old packets
- Give user some context in the confirmation dialog for each PG (e.g. Metis the Greek god vs the Metis people)
- Give user ability to mark a PG as incorrect (button next to "Yes" and "No" that could read "Report as incorrect", populates a spreadsheet with corrections)
- Customizable styles for pronunciation guide
Send me suggestions for features!