smarg19 Posted May 6, 2014 Share Posted May 6, 2014 (edited) Parsers Greek and Latin parsers for Alfred Version: 2.0 Download at Packal This is a somewhat specialized workflow, but for those who read Greek and Latin, it will likely prove beneficial. This workflow uses the Perseus parsing backend to allow full parsing of both Greek and Latin terms. Simply use the keyword parse followed by the unknown Greek or Latin word. Parsers will automatically fetch all of the parsing data from Perseus, munch it up, and offer you all of the possible parsings via Alfred's elegant UI. If you would like a bit more information, Parsers adds two actions for any selected parsing. Using cmd+return, you can view a HUD of the parsing data chosen, pretty printed, and have that data copied to the clipboard. Greek: Latin: Alternatively, you can use shift+return to view a HUD of the lexicon entry for that parsing term, and this lexicon data will also be copied to the clipboard (NOTE: Parsers will attempt to display the lexicon entry from the most concise lexicon available for the chosen term). Greek: Latin: Let me know if you have any further feature suggestions. And enjoy your Greek and Latin, stephen Edited December 13, 2014 by smarg19 Link to comment
smarg19 Posted May 6, 2014 Author Share Posted May 6, 2014 Updated to Version 1.1.1 with fixes for Latin lexica. Link to comment
smarg19 Posted September 15, 2014 Author Share Posted September 15, 2014 UPDATE: I have just pushed version 2.0 to Packal. This is a total rewrite, but it keeps the essential UI. Use a keyboard shortcut or the Script Filter to get parsing options. Then, either [1] directly copy that parsing info, [2] copy a nicely formatted version of the parsing info, or [3] (this is the newest part) look up that lemma in a lexicon. The lexicon lookup with show a webview with a cleaned-up, well-formatted version of the lexicon entry. This text is selectable and copyable, and is much easier to read than on Perseus' website. This is a great update. Hope you like it, stephen Link to comment
M1m1s Posted December 13, 2014 Share Posted December 13, 2014 Thanks for sharing this interesting workflow. However, i get an error when I try to run it: 'nonetype' object is not iterable. I'm running Yosemite, maybe that's why? Incidentally, when I first run it, I was asked to authorize something (sorry but I don't remember what exactly) to always run. Is that normal? Thank you! Link to comment
smarg19 Posted December 13, 2014 Author Share Posted December 13, 2014 Can you run the workflow with Alfred's debugger on, and then post the debugger output? I need specific line numbers and such. Also, the authorization was to download a dependency. I'm using an early version of a workflow utility to allow workflows to download utilities at runtime, instead of bundling them all with the workflow. This reduces the size of the workflow itself, and thus alleviates user's Dropboxes (if they are syncing). Link to comment
M1m1s Posted December 13, 2014 Share Posted December 13, 2014 Thank you so much for the prompt reply. Here goes, enjoy: Starting debug for 'Parsers' [ERROR: alfred.workflow.input.scriptfilter] Code 1: 15:48:13 parser.py:369 DEBUG {u'<argument>': u'noun sg masc nom', u'<flag>': u'lexica', u'display': False, u'launch': True, u'search': False} 15:48:13 parser.py:104 DEBUG Running launch_codepath... 15:48:13 workflow.py:1832 ERROR 'NoneType' object is not iterable Traceback (most recent call last): File "/Users/*/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.FF230D30-ADBD-480A-A904-7448BCD6D718/workflow/workflow.py", line 1830, in run func(self) File "parser.py", line 371, in main res = pd.run(args) File "parser.py", line 107, in run return method() File "parser.py", line 359, in launch_codepath self.log_vocab(self._chosen_item()) File "parser.py", line 263, in _chosen_item for item in parsing_data TypeError: 'NoneType' object is not iterable [ERROR: alfred.workflow.input.scriptfilter] Code 1: 15:48:13 parser.py:369 DEBUG {u'<argument>': u'noun sg masc nom', u'<flag>': u'lexica', u'display': False, u'launch': True, u'search': False} 15:48:13 parser.py:104 DEBUG Running launch_codepath... 15:48:13 workflow.py:1832 ERROR 'NoneType' object is not iterable Traceback (most recent call last): File "/Users/*/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.FF230D30-ADBD-480A-A904-7448BCD6D718/workflow/workflow.py", line 1830, in run func(self) File "parser.py", line 371, in main res = pd.run(args) File "parser.py", line 107, in run return method() File "parser.py", line 359, in launch_codepath self.log_vocab(self._chosen_item()) File "parser.py", line 263, in _chosen_item for item in parsing_data TypeError: 'NoneType' object is not iterable [ERROR: alfred.workflow.input.scriptfilter] Code 1: 15:48:13 parser.py:369 DEBUG {u'<argument>': u'noun sg masc nom', u'<flag>': u'lexica', u'display': False, u'launch': True, u'search': False} 15:48:13 parser.py:104 DEBUG Running launch_codepath... 15:48:13 workflow.py:1832 ERROR 'NoneType' object is not iterable Traceback (most recent call last): File "/Users/*/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.FF230D30-ADBD-480A-A904-7448BCD6D718/workflow/workflow.py", line 1830, in run func(self) File "parser.py", line 371, in main res = pd.run(args) File "parser.py", line 107, in run return method() File "parser.py", line 359, in launch_codepath self.log_vocab(self._chosen_item()) File "parser.py", line 263, in _chosen_item for item in parsing_data TypeError: 'NoneType' object is not iterable Link to comment
smarg19 Posted December 13, 2014 Author Share Posted December 13, 2014 Damn. If I had a nickel everytime I made that error, I'd probably have a dollar. I accidentally hardcoded the arguments for the workflow in the script file. But, it's an easy fix. I've just uploaded version 2.1 to Packal. Download the new version and give it a whirl Link to comment
M1m1s Posted December 13, 2014 Share Posted December 13, 2014 Wow, that was quick! Works perfectly now (in Yosemite, too). Thank you so much! smarg19 1 Link to comment
Jakub Sypiański Posted April 3, 2019 Share Posted April 3, 2019 Thank you for this fantastic Workflow. In my case however it works only partially. The query is parsed in Alfred in the actions' window, but I cannot get Alfred to display anything in this dark big HUD through ⌘⏎ or ⇧⏎. defmc 1 Link to comment
defmc Posted September 22, 2019 Share Posted September 22, 2019 This is absolutely out of the ball park. But like @Jakub Sypiański i cant get the lookup-modifiers to work. Would be amazing to get this workflow to work with Alfred 4 🙌 Link to comment
deanishe Posted September 22, 2019 Share Posted September 22, 2019 smargh19 isn't around any more. If you want the workflow updating, you'll have to do it yourself or find someone else to do it. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now