I'm curious whether anyone has built any Alfred 2 workflows for Accordance. I haven't began trying to build any (not really a skill of mine), but am imagining how helpful it would be to have the features of the Accordance widget available with a few keystrokes. I'm sure there are a some other ways this could be awesome. Anyone messed with it?
Alfred 2 Accordance Workflows
Posted 25 April 2013 - 01:14 AM
I have done a workflow, based on Joe Weak's script library for accordance. That is, you need "Accordance Script Library.scpt" installed already or it won't work. (You can download the script library here: http://macbiblioblog.../downloads.html) The workflow is nothing revolutionary - its just an Alfred 2 wrapper for that library. I have three functions at the moment:
(1) Copy verse to clipboard (from whatever bible version you desire) eg. "acc Deut 6:4" (copy default english version), "acc Deut 6:4@Heb" (copy default Hebrew version), or "acc Deut 6:4@ESV" (copy ESV) etc.
(2) Display verse on screen (in a pop-over window, not in accordance, again from whatever bible version you desire)
(3) Search accordance for something
All of them need to have accordance open (the script will open accordance if its not already), but #1 and #2 don't bring it to the front. That is, you can copy verses or view verses without switching from whatever application you are in. It's such a useful timesaver for writing sermons and lectures!
I haven't made it publicly available because I really don't have time to fix problems that may crop up with it. There will be issues, for example, if you don't have the same bibles installed that I do - you'd have to do minor modifications to the script to set a default Gk, Heb and Eng version. I really couldn't in good conscience, release it publicly without more work. However, I'd be happy to share it with you personally if you'd like. Send me a message with your email and I'll send you a copy.
Posted 26 April 2013 - 12:50 AM
Very interested in seeing this idea being developed further.
Alfred is a great app launcher and now with workflows included in Alfred 2, the potential for Accordance shortcuts looks amazing.
Thank you Joe Weaks for the work you've done already.
Edited by paulmj21, 26 April 2013 - 04:12 AM.
Posted 26 April 2013 - 04:54 PM
Good for you.
Why don't you post the code and we can work on it collectively here.
When I tried Alfred for about 6 months, I wrote scripts to work with it. It never caught QS and when QS development picked back up, I've never looked back.
Does it still have the limitations on passing variables to an Applescript plugin? That's why you're putting Acc keyword and the verse reference in the text? If you're wanting to paste a full text from a text reference, you can use an option in the Accordance Script Library that circumvents the clipboard, making it more robust. Do you still need to purchase the additional Powerpack in Alfred?
The Macintosh Biblioblog
Sometimes I'm so helpful even I can't stand it.
Posted 27 April 2013 - 09:10 AM
I've been using Nathan's workflow with Joe's script and the three main commands have been working flawlessly:
1. Enter verse(s) and it copies it ready for pasting. (I've tweaked Accordance settings so that I get the perfect paste result for my particular style).
There's even an option to paste it straight into the active word processor.
2. Enter verse(s) and displays it (large) on the screen.
3. Enter word and it will do a simple Accordance search.
It even starts Accordance for me if it happens to be closed.
Joe's script is quite extended and it might be better divided up so that each workflow is only dealing with a singe command,. i.e each of the above. Or instead of directing Alfred to Joe's file in library/scripts to paste the commands straight into Alfred's script editor.
One note: Joe's script only worked after I placed it in my user/library/scripts and not the root/library/scripts (if in doubt try both).
I'm going to have a look at building some other commands, but I suggest Nathan goes along with Joe's advice and post his workflow publicly. It's a great first start for other Alfred/Accordance users to build on.
Thank you both for your work.
Edited by paulmj21, 27 April 2013 - 12:07 PM.
Posted 29 April 2013 - 03:14 AM
I'd be happy for others to work on it, but as I said it's not very robust right now. Given the volume of emails I've received requesting it anyway, I think I'll just take Joe's advice and post it. For those interested:
Joe, in answer to your questions, you would need the power pack installed or workflows don't work. I'm not sure what you mean by limitations on passing variables. Do you mean on the command line? If so, then the answer is that you can pass command line variables. I'm not sure I understand your other question either. I type "acc <text>@<version>" as the command to copy/view text. The "acc" part lets Alfred know you are controlling accordance (because you don't have to have any Accordance workspace visible for it to work), and then the rest tells it what you want on the clipboard/screen.
I'm hesitant to circumvent the clipboard because I do my word processing in MS Word for Windows running through parallels. (I'm still waiting for either pages or word for Mac to support r-to-l text properly). Obviously windows programs don't interact with applescript well. I couldn't for example, use your script library directly. I can interact with the mac though clipboard though.
If anyone has more time than me and wants to fix this script properly for everyone then two things need to happen:
1. There is a lot of code duplication inside the script filters that needs to be remedied.
2. The default versions for Eng, Heb and Gk need some thought because they rely on what texts people have installed. Joe gets around this in his script library by calling "the first Hebrew text" as the default one. This is probably a workable solution.
As well, Joe's library is extensive and useful way beyond what I need, and I've ignored a lot of it. Other people's needs will be different, and creating wrappers for other functions will be handy as well.
Posted 29 April 2013 - 11:10 AM
Sorry, but I can't help out in this project.
I don't use Alfred, so don't have a license. I asked the Alfred license folk if they'd like me to have a license so I may provide more functionality for an Alfred workflow for you guys, but they were not interested.
Nathan, you've done well. Assembling an Alfred workflow has a steep curve up front.
Sorry that I can not offer ideas for improvement, since I can not test.
The Macintosh Biblioblog
Sometimes I'm so helpful even I can't stand it.
Posted 23 January 2014 - 05:10 PM
I know this is an older topic, but since the newest pages no longer supports Applescipt I have started using Alfred. It has been working flawlessly for me. So, thanks for those who have worked on this.
The question I have, I am not sure how to customize the out put of the Alfred work flow. I really want the verse numbers to be within the text. Currently it will past the verses I need with the reference at the end. But it excludes the numbers before each verse. Is it possible to retain the numbers? Thanks.
Posted 23 January 2014 - 06:18 PM
I'm not an Alfred user, but it sounds like Alfred is copying as citation. If this is true, you can change your "Citation" preferences in Accordance. Specifically, you want to set the drop-down in the "Content References" section to Before Verse, Omit Book and Chapter or Omit Book Name Only.
Does that help?
Running Accordance on:
Mac 10.10 (Yosemite)
iOS 8 (iPad)
Windows Vista Home Premium
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users