Jump to content

Alfred 2 Accordance Workflows


JTG

Recommended Posts

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?

Link to comment
Share on other sites

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.blogspot.com/2009/01/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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

Nathan,

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?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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:

 

https://www.dropbox.com/s/b380rqxwcq4c323/Accordance%20Control.alfredworkflow

 

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 8 months later...

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

  • 3 months later...
  • 3 years later...

Hello Nathan,

Is this workflow still working?

I downloaded it. It does not work on my computer.

The link for Accordance Automation Script Library is not working either. I think we probably don't need to down it anymore. But still, the workflow seems not working. Do I need to modify anything? or is there an updated version for the workflow?

Thanks!

Link to comment
Share on other sites

Here's a link that works for the old Accordance Script Library that you place in ~/Library/Scripts/ but this is an older solution. Newer stuff is now incorprated into the the Accordance bundle what we can use for calls. Sorry that I don't have Alfred to be of help.

Link to comment
Share on other sites

Hello Joe,

 

It is working now! Thank you so much!!! 

 

A more question, When I try to display the ESV, it says that the text module "ESV" is not found. I do have the ESV with Strong's number. Did I miss something else?

Link to comment
Share on other sites

You need to verify you are using the right short name by clicking the info button in the Library. Is it ESVS?

Link to comment
Share on other sites

This reminds me that the Accordance Script Library can still useful for folks wanting to use its functions to interface with AppleScript, Quicksilver, Alfred, VBA, etc.  I can maybe get around to updating the library in December.

  • Like 3
Link to comment
Share on other sites

Please do it, Joe.

I came to this thread when I did searching on something else. This is such an awesome thing! I'm very impressed.

 

I'm not sure what caused the problem, but it maybe related to script issue. When I use the display function or the Get verses service, if I choose the Chinese version (user imported bible), the verse reference has a very interesting problem.

For instance, if I get Gen 1:1-3, the result will be:

1 起初神创造天地。

2 地是空虚混沌。渊面黑暗。神的灵运行在水面上。

3 神说,要有光,就有了光。 (Gen 1:)

 

If I get Gen 1:1-2, it will be:

 

1 起初神创造天地。

2 地是空虚混沌。渊面黑暗。神的灵运行在水面上。 (Gen 1:)

 

You know the pattern now. If I get Gen 1:1-4, it will be:

1 起初神创造天地。

2 地是空虚混沌。渊面黑暗。神的灵运行在水面上。

3 神说,要有光,就有了光。

4 神看光是好的,就把光暗分开了。 (Gen 1:)

 

If I choose English, Greek or Hebrew bible, it will be just normal...It will just be Gen 1:1-2, or 1:1-3, or 1:1-4.

 

Does anyone know what's going on?

Link to comment
Share on other sites

Also, is it possible to designate a font for the largetype text? For example, I want to designate Accordance font for the text to be shown in largetype.

Link to comment
Share on other sites

  • 11 months later...

I've realised that I've accidentally deleted the dropbox link to the Alfred script. Here is a new one for those still interested:

 

https://www.dropbox.com/s/b380rqxwcq4c323/Accordance%20Control.alfredworkflow

 

Alfred continues to be a great way to interact with Accordance!

 

I've adapted Nathan Lovell's Accordance workflow to be activated by a hotkey and accept selected text so that I can select a verse reference (on a webpage, PDF, or in any text document) and display the verse on the screen in LargeType text by hitting the designated hotkey.

 

Also, within the same Accordance workflow, when used in an editable document a different hotkey can be selected to automatically paste the of the highlighted verse reference. (i.e. You type a verse reference and then highlight the reference and hit the hotkey so that the entire verse text is inserted in the document.)

 

This Alfred Workflow can be downloaded here:  (Powerpack required. This does not work with the free version of Alfred)

https://www.dropbox.com/s/9rfnwv5slb01kgj/Accordance%20Paste%20or%20Display%20Verse.alfredworkflow?dl=0

 

 

- OSchrock

post-31975-0-60621000-1540219350_thumb.png

  • Like 1
Link to comment
Share on other sites

  • 2 years later...

 

On 4/25/2013 at 1:14 AM, Nathan Lovell said:

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.blogspot.com/2009/01/downloads.html

 

On 10/25/2017 at 1:13 PM, Joe Weaks said:

This reminds me that the Accordance Script Library can still useful for folks wanting to use its functions to interface with AppleScript, Quicksilver, Alfred, VBA, etc.  I can maybe get around to updating the library in December.

 

 

Does anyone know if these scripts work with the free version of Accordance? I'm trying to help someone set this up with their version of Accordance Lite and we're running into problems. Not sure if it's due to limitations of the free version, or some other settings?

 

Link to comment
Share on other sites

39 minutes ago, OSchrock said:

Does anyone know if these scripts work with the free version of Accordance?

I would be very surprised to learn that the basic scripts don't work. "Lite" is not a separate download, it's the same application. Some features are disabled, but I can't imagine they disabled the Apple Event api's.

 

If you could get them to test with this one line script. They could launch Script Editor and paste this in and run it:

tell application "Accordance" to display dialog («event AccdTxRf» {"ESVS", "John 11:35", true})

They may need to change ESVS to another module short name.

 

  • Like 2
Link to comment
Share on other sites

 

7 minutes ago, Joe Weaks said:

I would be very surprised to learn that the basic scripts don't work. "Lite" is not a separate download, it's the same application. Some features are disabled, but I can't imagine they disabled the Apple Event api's.

 

If you could get them to test with this one line script. They could launch Script Editor and paste this in and run it:

tell application "Accordance" to display dialog («event AccdTxRf» {"ESVS", "John 11:35", true})

They may need to change ESVS to another module short name.

 

 

Thank You 👍

 

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
On 4/25/2013 at 1:14 AM, Nathan Lovell said:

...you need "Accordance Script Library.scpt" installed already or it won't work. (You can download the script library here: http://macbiblioblog.blogspot.com/2009/01/downloads.html) The workflow is nothing revolutionary - its just an Alfred 2 wrapper for that library. I have three functions at the moment:

 

Just to follow up with this, the scripts do indeed work with Accordance Lite. My only problem was that I initially forgot about installing Joe Weak's Accordance Script Library. After we installed that, everything worked perfectly!

 

Thank you everybody!

  • Like 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...