bevesce

Spelling with google

12 posts in this topic

Moderator note: The github repository associated with this workflow no longer exists, so you can no longer download it.

 

Simple workflow that grabs selected text, checks spelling on the google search page (so it works for any language) and pastes it in active application.

 

Download:

https://github.com/bevesce/Spelling-with-google/raw/master/Google%20spelling.alfredworkflow

 

Source:

https://github.com/bevesce/Spelling-with-google

Edited by vitor
Warning about repository no longer existing
twinpeaks and arsenty like this

Share this post


Link to post

Thank you for this, it’ll definitely come in handy.

I would suggest, though, that a notification was output after the correction is done. Something like this

vxlJBMi.png

so the user knows when the text is available to paste.

Edited by Vítor

Share this post


Link to post

Thank you for this, it’ll definitely come in handy.

I would suggest, though, that a notification was output after the correction is done. Something like this

vxlJBMi.png

so the user knows when the text is available to paste.

 

I intended workflow to be more used with hotkey so new text just replaces selected one when ready.

 

I added keyword, well, just because.

Edited by bevesce

Share this post


Link to post

I intended workflow to be more used with hotkey so new text just replaces selected one when ready.

 

I added keyword, well, just because.

 

But the hotkey is still there (just not visible on the screenshot), and the notification still works with it. My point is that without it, there’s really no way for the user to know when the text was parsed, and is ready to paste (if they try pasting too soon, they won’t get the desired result).

Edited by Vítor

Share this post


Link to post

I understand what you mean, but that notification is not necessary in how I use workflow* and anyone who wants can add it easily enough.

 

*I type a word, select it, hit the hotkey, word is replaced by new version after second and there is no need to paste anything manually.

Share this post


Link to post

Oh, I hadn’t seen the “Automatically paste to front most app” option, I thought it just copied the result to the clipboard, but I see now it immediately replaces it. Yes, I agree, there’s no need for the notification.

Share this post


Link to post

Workflow/script now uses google api instead of scrapping, it have two advantages:

- it's faster

- it don't violates terms of use

and on disadvantage:

- you need to provide googles api key from https://code.google.com/apis/console/

 

Hi Sorry, but could you please detail how to get an API and how to insert it in the script? I've tried to get an API key from the address you provided but am not sure if I did it right.

 

I tried to insert various numbers between the brackets in the "google_spelling.py" file, but it doesn't work for me.

 

Thanks!

Share this post


Link to post

If someone could provide instructions for this, that would be awesome. 

 

 

1. Does it have to be the custom search API, or can another API work?

 

2. How do I generate the API? 

 

     Do I create a custom google search, find the ID, and input that into cx to generate? (Yes, I have no clue what I'm doing)

 

3. In google_spelling.py on line 11 do we put the API key inside the brackets?  And, is there anything else that needs to be changed in the file?

 

As in:

keys = [API_KEY_HERE]

Share this post


Link to post
Steps I took to get API key and add to file, to help others who maybe don't understand python or Google's developer console.
  1. Go to https://code.google.com/apis/console/
  2. Make sure you're on the 'Projects' overview page (click the "‹ Projects" link at the top left)
  3. Create a New Project (I called mine AlfredGoogleSpelling) and let it create, takes a few seconds
  4. Click the "Enable an API" button
  5. Browse for "Custom Search API"
  6. Enable it by Clicking the "Off" button to the right (accept any T&C's if it pops up)
  7. Go to "Credentials" in the nav on the left (Under APIs & Auth, if it's not open)
  8. Create a new Public API Access key
  9. Use "Browser Key"
  10. Leave HTTP referrers box empty and click "Create"
  11. Copy/note down the API key which is generated
  12. In Alfred's Preferences go to the "Workflows" tab and find the Google Spelling workflow
  13. Right click the "Script" icon and go to configure
  14. At the bottom right, click "open workflow folder"
  15. Open "google_spelling.py" in your text editor
  16. Replace the line "# provide at least one google api key from https://code.google.com/apis/console/" with your API key wrapped in single quotes (or double quotes, don't think it matters)
  17. Save that file and you're done!

Hope this helps someone!

Share this post


Link to post

 

Steps I took to get API key and add to file, to help others who maybe don't understand python or Google's developer console.

Hope this helps someone!

 

 

 

I helped me! Thank you very much. The instructions are perfect.

Share this post


Link to post

@bevesce The github repo for this workflow no longer exists. This was reported by a user, so I added a small note at the top of the top post.

 

Should we hide/delete this post, or do you intend on bringing the workflow back?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now