Jump to content


Photo

Alfred 2 Accordance Workflows


  • Please log in to reply
18 replies to this topic

#1 JTG

JTG

    Member

  • Members
  • Pip
  • 6 posts

Posted 24 April 2013 - 07:53 PM

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?



#2 Nathan Lovell

Nathan Lovell

    Member

  • Active Members
  • Pip
  • 24 posts
  • Gender:Male
  • Accordance Version:10.x

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.



#3 Paul Meiklejohn

Paul Meiklejohn

    Gold

  • Active Members
  • PipPipPipPip
  • 363 posts
  • Gender:Male
  • Location:Gloucester, England
  • Interests:Photography, running and coffee (lots of coffee...)
  • Accordance Version:12.x
  • Platforms:Mac OS X, iOS

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.

Paul M.

 

Pastor.

All things Apple, iMac, Air, iPad, iPhone.

Long term Accordance user. (10 years).  v.11.

 


#4 Joe Weaks

Joe Weaks

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,257 posts
  • Gender:Male
  • Location:Odessa, TX
  • Interests:I like things that are Orange, and possibly Blue.
  • Accordance Version:11.x

Posted 26 April 2013 - 04:54 PM

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?


Joe Weaks
The Macintosh Biblioblog

Sometimes I'm so helpful even I can't stand it.

#5 Paul Meiklejohn

Paul Meiklejohn

    Gold

  • Active Members
  • PipPipPipPip
  • 363 posts
  • Gender:Male
  • Location:Gloucester, England
  • Interests:Photography, running and coffee (lots of coffee...)
  • Accordance Version:12.x
  • Platforms:Mac OS X, iOS

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.

Paul M.

 

Pastor.

All things Apple, iMac, Air, iPad, iPhone.

Long term Accordance user. (10 years).  v.11.

 


#6 Nathan Lovell

Nathan Lovell

    Member

  • Active Members
  • Pip
  • 24 posts
  • Gender:Male
  • Accordance Version:10.x

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:

 

https://www.dropbox.....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.



#7 Joe Weaks

Joe Weaks

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,257 posts
  • Gender:Male
  • Location:Odessa, TX
  • Interests:I like things that are Orange, and possibly Blue.
  • Accordance Version:11.x

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.


Joe Weaks
The Macintosh Biblioblog

Sometimes I'm so helpful even I can't stand it.

#8 JakeBondo

JakeBondo

    Member

  • Active Members
  • Pip
  • 10 posts
  • Twitter:@JakeBondo
  • Gender:Male
  • Location:New Orleans
  • Accordance Version:11.x
  • Platforms:Mac OS X, iOS

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.



#9 Lorinda H. M. Hoover

Lorinda H. M. Hoover

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,736 posts
  • Gender:Female
  • Location:Iowa
  • Accordance Version:11.x
  • Platforms:Mac OS X, Windows, iOS

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.11 (El Capitan)
iOS 9 (iPad & iPhone)
Windows 10

[Vista Home Premium before 3/20/2016]


#10 Nathan Lovell

Nathan Lovell

    Member

  • Active Members
  • Pip
  • 24 posts
  • Gender:Male
  • Accordance Version:10.x

Posted 24 January 2014 - 06:01 AM

Yes. That should work I think.



#11 Nathan Lovell

Nathan Lovell

    Member

  • Active Members
  • Pip
  • 24 posts
  • Gender:Male
  • Accordance Version:10.x

Posted 04 May 2014 - 10:09 AM

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.....alfredworkflow



#12 Martin Zhang

Martin Zhang

    Gold

  • Active Members
  • PipPipPipPip
  • 386 posts
  • Gender:Male
  • Accordance Version:12.x
  • Platforms:Mac OS X, Windows, iOS

Posted 24 October 2017 - 04:28 PM

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!


Martin

Accordance v.12

MacOS High Sierra

iOS 11

Win10 Pro

Android? ??

Accordance tutorials in Chinese.


#13 Joe Weaks

Joe Weaks

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,257 posts
  • Gender:Male
  • Location:Odessa, TX
  • Interests:I like things that are Orange, and possibly Blue.
  • Accordance Version:11.x

Posted 24 October 2017 - 11:48 PM

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.


Joe Weaks
The Macintosh Biblioblog

Sometimes I'm so helpful even I can't stand it.

#14 Martin Zhang

Martin Zhang

    Gold

  • Active Members
  • PipPipPipPip
  • 386 posts
  • Gender:Male
  • Accordance Version:12.x
  • Platforms:Mac OS X, Windows, iOS

Posted 25 October 2017 - 12:06 PM

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?


Martin

Accordance v.12

MacOS High Sierra

iOS 11

Win10 Pro

Android? ??

Accordance tutorials in Chinese.


#15 Joe Weaks

Joe Weaks

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,257 posts
  • Gender:Male
  • Location:Odessa, TX
  • Interests:I like things that are Orange, and possibly Blue.
  • Accordance Version:11.x

Posted 25 October 2017 - 12:17 PM

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


Joe Weaks
The Macintosh Biblioblog

Sometimes I'm so helpful even I can't stand it.

#16 Martin Zhang

Martin Zhang

    Gold

  • Active Members
  • PipPipPipPip
  • 386 posts
  • Gender:Male
  • Accordance Version:12.x
  • Platforms:Mac OS X, Windows, iOS

Posted 25 October 2017 - 12:41 PM

Yes. It is ESVS. I've fixed the script.

Thank you so much.


Martin

Accordance v.12

MacOS High Sierra

iOS 11

Win10 Pro

Android? ??

Accordance tutorials in Chinese.


#17 Joe Weaks

Joe Weaks

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,257 posts
  • Gender:Male
  • Location:Odessa, TX
  • Interests:I like things that are Orange, and possibly Blue.
  • Accordance Version:11.x

Posted 25 October 2017 - 01:13 PM

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.


  • Paul Meiklejohn, Martin Zhang and Fabian like this
Joe Weaks
The Macintosh Biblioblog

Sometimes I'm so helpful even I can't stand it.

#18 Martin Zhang

Martin Zhang

    Gold

  • Active Members
  • PipPipPipPip
  • 386 posts
  • Gender:Male
  • Accordance Version:12.x
  • Platforms:Mac OS X, Windows, iOS

Posted 25 October 2017 - 11:07 PM

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?


Martin

Accordance v.12

MacOS High Sierra

iOS 11

Win10 Pro

Android? ??

Accordance tutorials in Chinese.


#19 Martin Zhang

Martin Zhang

    Gold

  • Active Members
  • PipPipPipPip
  • 386 posts
  • Gender:Male
  • Accordance Version:12.x
  • Platforms:Mac OS X, Windows, iOS

Posted 26 October 2017 - 12:10 AM

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.


Martin

Accordance v.12

MacOS High Sierra

iOS 11

Win10 Pro

Android? ??

Accordance tutorials in Chinese.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users