Jump to content

rustycamper

Member
  • Posts

    8
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by rustycamper

  1. The clock starts ticking after you sign up for Google's cloud platform, not when you create an API key. This being said, try the following:

    1. Try to access the API via your web browser: https://translation.googleapis.com/language/translate/v2?key=YOUR_API_KEY_HERE&source=en&target=es&q=cow

    If you still get a 403 error, it's def. a problem with your key.

    2. Make sure you've the translation API enabled https://support.google.com/cloud/answer/6158841?hl=en

  2. 27 minutes ago, ckotte said:

    Could you create a small guide how to create the key? I have the JSON file, but I can't get the workflow working. Do I need to copy the private key with \n or without or what is the API key??? How can I verify (without the Alfred workflow) if my API key works?

    I am sorry but I won't be able to create a guide in the next 6 months as I am traveling South America with very sporadic access to internet and no laptop. @deanishe: thanks for answering mate!

  3. 11 hours ago, Scott said:

    Sounds great, but the instructions at that link make getting a Google Translate API key seem like a massive project. As in, I'd have to use this workflow thousands of times to make it remotely worth the effort. Is there a shortcut or a cliff's note version?

     

    Sorry, you Google requires you to have an API key. Please check out the updated workflow, as it now works with Microsoft Translate a well. Thanks,

  4. Hi, happy to share yet another translation workflow. The existing ones I found didn't have support for some languages that I needed, so here we go https://github.com/rustycamper/alfred-translate-workflow/releases/latest

     


    Translate from/to your favorite language using Google or Microsoft Translate.

     

    Usage:
    * `tr` <query>:
    translate query.

    * `tr-setapi` <API>: select Google or Microsoft Translate service.
    * `tr-setkey` <API key>: set your API key.
    * `tr-setlang` <language>: set target language (language to translate to).


    Note: You won't need to set a source (from) language. Both Google and Microsoft are pretty good at guessing 
    the origin language.

     

    Features:
    * Simple: setup once and just use it.
    * Secure: keys are stored in Mac's native Keychain tool.
    * Fast: repeat queries are cached for speed.

     

    Keyboard Shortcuts:
    * Enter: copy translation to clipboard.
    * Command + C: copy translation to clipboard.
    * Command + Y: show quick preview on the respective translation web site.
    * Command + L: show translated text in large font.

     

    Requirements:
    The first time you run the workflow, it will prompt you to enter your API key for Google or Microsoft. 
    * Instructions on how to get a Google API key: https://cloud.google.com/translate/docs/getting-started#set_up_your_project
    * Instructions on how to get a Microsoft API key: https://www.microsoft.com/en-us/translator/getstarted.aspx

     

     

     

    tr-setapi.gif

     

    tr-setlang.gif

     

    tr.gif

  5. On 11/18/2016 at 0:45 PM, Benjamski said:

    First of all, I love this workflow and use it constantly. Recently it started showing weird behaviour; not always showing the notification, never showing current timers, and sometimes it just worked and others it never went off.

     

    I just deleted the workflow and reinstalled from here, with migrated settings (pretty sure i never changed anything) 


    And now it works, but doesnt show me the confirmation notification, doesn't show in current timers, and doesn't notify me when it goes, off, just rings. 

     

    I'll include the debug log of me trying "timer 1 TEST"

     

    
    [2016-11-18 13:43:46][STDERR: input.scriptfilter] ls: /Users/Benjamski/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/carlosnz.eggtimer2/recent_timers: No such file or directory
    ls: /Users/Benjamski/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/carlosnz.eggtimer2/running_timers: No such file or directory
    ls: /Users/Benjamski/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/carlosnz.eggtimer2/running_autotimers: No such file or directory
    ls: /Users/Benjamski/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/carlosnz.eggtimer2/running_alarms: No such file or directory
    [2016-11-18 13:43:46][input.scriptfilter] <?xml version="1.0"?>
    	<items>
    	<item uid="newtimer" arg="newtimer" valid="yes">
    		<title>New Timer</title>
    		<subtitle>Create a new timer with EggTimer</subtitle>
    		<icon>icon.png</icon>
    	  </item>
      	<item uid="newalarm" arg="newalarm" valid="yes">
    		<title>New Alarm</title>
    		<subtitle>Create a new alarm with EggTimer</subtitle>
    		<icon>resources/icon_alarm.png</icon>
    	  </item>
     <item uid="timer" arg="" valid="no">
    				<title>No timers or alarms currently running</title>
    				<subtitle>Enter "timer help" for usage instructions.</subtitle>
    				<icon>icon.png</icon>
    			  </item>
    			</items>
    [2016-11-18 13:43:47][input.scriptfilter] <?xml version="1.0"?>
    	<items>
    	<item uid="newtimer" arg="new 1 Reminder" valid="yes">
    		<title>New Timer:</title>
    		<subtitle>"Reminder" in 1 minute</subtitle>
    		<icon>icon.png</icon>
    	 </item></items>
    [2016-11-18 13:43:48][input.scriptfilter] <?xml version="1.0"?>
    	<items>
    	<item uid="newtimer" arg="new 1 Reminder" valid="yes">
    		<title>New Timer:</title>
    		<subtitle>"Reminder" in 1 minute</subtitle>
    		<icon>icon.png</icon>
    	 </item></items>
    [2016-11-18 13:43:49][input.scriptfilter] <?xml version="1.0"?>
    	<items>
    	<item uid="newtimer" arg="new 1 T" valid="yes">
    		<title>New Timer:</title>
    		<subtitle>"T" in 1 minute</subtitle>
    		<icon>icon.png</icon>
    	 </item></items>
    [2016-11-18 13:43:49][input.scriptfilter] <?xml version="1.0"?>
    	<items>
    	<item uid="newtimer" arg="new 1 TE" valid="yes">
    		<title>New Timer:</title>
    		<subtitle>"TE" in 1 minute</subtitle>
    		<icon>icon.png</icon>
    	 </item></items>
    [2016-11-18 13:43:49][input.scriptfilter] <?xml version="1.0"?>
    	<items>
    	<item uid="newtimer" arg="new 1 TES" valid="yes">
    		<title>New Timer:</title>
    		<subtitle>"TES" in 1 minute</subtitle>
    		<icon>icon.png</icon>
    	 </item></items>
    [2016-11-18 13:43:49][input.scriptfilter] <?xml version="1.0"?>
    	<items>
    	<item uid="newtimer" arg="new 1 TEST" valid="yes">
    		<title>New Timer:</title>
    		<subtitle>"TEST" in 1 minute</subtitle>
    		<icon>icon.png</icon>
    	 </item></items>
    [2016-11-18 13:43:52][input.scriptfilter] Processing output of 'action.script' with arg 'new 1 TEST'
    [2016-11-18 13:43:52][action.script] Processing output of 'output.notification' with arg 'Reminder in 1 minute:
    "TEST"'

    I did notice the missing directories at the top, but I don't know enough about what they should be to want to dig in there without sound advice? Any thoughts? Thanks in advance for any help!

    Hi @Benjamski,

    Here https://www.dropbox.com/s/tu8detakhi3hsbo/eggtimer_v2.0_Alfred3_compatible.alfred3workflow?dl=1 is the original workflow with all paths updated to work with Alfred 3. Enjoy.

×
×
  • Create New...