Jump to content

Display Scripture with Launchbar


ChristianB

Recommended Posts

Here is an applescript which together with LaunchBar helps to look up scriptures very quick. It is an adaption of the applescripts by Joe Weaks made for Quicksilver.

 

-- Accordance Quicksilver Plugin

-- Version 0.2

-- QS plugin that handles text and interacts with Accordance engine

-- CC Joseph Weaks, 2006

-- Creative Commons Attribution-NonCommercial-ShareAlike 2.5 license (http://creativecommons.org/licenses/by-nc-sa/2.5/)

 

-- adapted to make it work with Launchbar by Christian Bender, 2008

-- additional scripting to fix large type issues by :kelko: kelko < at > anakrino <.> de http://kelko.anakrino.de

 

---------------------------------------

-- Begin User Settings --

---------------------------------------

-- You have three properties to set. Where to send the output, which module to use, and how to format the results if not displaying it in Accordance.

 

-- Indicate what to do with the resulting text.

property sendOutputTo : "LBDisplay"

-- "pasteInFrontApp" = pastes scripture text in front app

-- "LBDisplay" = displays scripture text in Quicksilver display

-- "LBReturn" = returns scripture text to Quicksilver ready for another action

-- "Accordance" = displays the result in a new Accordance window of type specified in theModule

 

 

-- Set theModule, specifying which text to pull out of Accordance (3, "NRSV", etc.) or which type of window to display in Accordance ("Map", "English Tool", etc.). Read below for all options.

property theModule : "ELBER"

-- These first 2 options only good for passing results to another app (ie. can't show in Accordance)

-- 1 -- setting to an integer will pull the corresponding scripture from the text list in Accordance

-- "NRSV" -- setting to a scripture module short name will use that module

 

-- (These remaining options for theModule only work for sending result to Accordance)

-- "Verses" -- displays verses in a new Accordance text window

-- "Words" -- displays words in a new Accordance text window

-- "Current Window" -- displays text in the current window open in Accordance ("Recycles" the front window)

-- "Map" -- displays text in a new Accordance Map window

-- "Timeline" -- displays text in a new Accordance Timeline window

-- "General Tool" -- displays text in a new Accordance General Tool window

-- "English Tool" -- displays text in a new Accordance English Tool window

-- "Reference Tool" -- displays text in a new Accordance Reference tool window

-- "Parallel" -- displays text in a new Accordance Parallel window

-- "User Notes" -- displays text in a new Accordance User Notes window

-- "User Tool" -- displays text in a new Accordance User Tool window

-- "Search All" -- displays text in a new Accordance Search All window

 

 

--Note: Displaying the results in Accordance allows access to the first module of that type only, using the default settings for that type of module. You may need to adjust the default search for "Field" if possible, such as for Parallel windows. Be savvy about sending a scripture reference to a Reference Tool, and a place name to a Map window, etc.

 

 

-- If not displaying in Accordance itself, determine how to format the results.

property quoteAs : "Citation"

-- "Citation"

-- "Paragraph" -- Doesn't handle citations in Hebrew well

-- "Verses"

 

---------------------------------------

-- End User Settings --

---------------------------------------

 

 

---------------------------------------

-- The remainder of the script should only be tweaked if you know what you're doing.

---------------------------------------

 

on handle_string(theString)

actionSorter(theString, theModule, quoteAs, sendOutputTo)

end handle_string

 

on actionSorter(theString, thisModule, thisFormat, outputDestination)

 

if outputDestination begins with "Accordance" then

showInAccordance(theString, thisModule)

else

-- Remove any non-alphanumeric characters from end of reference

-- mostly for the purpose of removing a final carriage return

set theString to removeExtraTrailingCharacters(theString)

 

 

-- Looks up the module to use if a number is designated

try

set thisModule to thisModule as integer

set thisModule to getModuleFromList(thisModule)

end try

 

if thisFormat begins with "Citation" then

set quoteAsCitation to true

else

set quoteAsCitation to false

end if

 

-- Get the text from Accordance

tell application "Accordance" to set theResult to

Link to comment
Share on other sites

I added some Code to the Display Script which Joseph Weaks send me. (Thanks!)

The additional code changes German booknames into English so that Accordance understands them.

 

-- Accordance Quicksilver Plugin

-- Version 0.2

-- QS plugin that handles text and interacts with Accordance engine

-- CC Joseph Weaks, 2006

-- Creative Commons Attribution-NonCommercial-ShareAlike 2.5 license (http://creativecommons.org/licenses/by-nc-sa/2.5/)

 

-- adapted to make it work with Launchbar by Christian Bender, 2008

-- additional scripting to fix large type issues by :kelko: kelko < at > anakrino <.> de http://kelko.anakrino.de

-- additional scripting to fix issues with German Booknames by Joseph Weaks, 2009

 

---------------------------------------

-- Begin User Settings --

---------------------------------------

-- You have three properties to set. Where to send the output, which module to use, and how to format the results if not displaying it in Accordance.

 

-- Indicate what to do with the resulting text.

property sendOutputTo : "LBDisplay"

-- "pasteInFrontApp" = pastes scripture text in front app

-- "LBDisplay" = displays scripture text in Quicksilver display

-- "LBReturn" = returns scripture text to Quicksilver ready for another action

-- "Accordance" = displays the result in a new Accordance window of type specified in theModule

 

 

-- Set theModule, specifying which text to pull out of Accordance (3, "NRSV", etc.) or which type of window to display in Accordance ("Map", "English Tool", etc.). Read below for all options.

property theModule : "ELBER"

-- These first 2 options only good for passing results to another app (ie. can't show in Accordance)

-- 1 -- setting to an integer will pull the corresponding scripture from the text list in Accordance

-- "NRSV" -- setting to a scripture module short name will use that module

 

-- (These remaining options for theModule only work for sending result to Accordance)

-- "Verses" -- displays verses in a new Accordance text window

-- "Words" -- displays words in a new Accordance text window

-- "Current Window" -- displays text in the current window open in Accordance ("Recycles" the front window)

-- "Map" -- displays text in a new Accordance Map window

-- "Timeline" -- displays text in a new Accordance Timeline window

-- "General Tool" -- displays text in a new Accordance General Tool window

-- "English Tool" -- displays text in a new Accordance English Tool window

-- "Reference Tool" -- displays text in a new Accordance Reference tool window

-- "Parallel" -- displays text in a new Accordance Parallel window

-- "User Notes" -- displays text in a new Accordance User Notes window

-- "User Tool" -- displays text in a new Accordance User Tool window

-- "Search All" -- displays text in a new Accordance Search All window

 

 

--Note: Displaying the results in Accordance allows access to the first module of that type only, using the default settings for that type of module. You may need to adjust the default search for "Field" if possible, such as for Parallel windows. Be savvy about sending a scripture reference to a Reference Tool, and a place name to a Map window, etc.

 

 

-- If not displaying in Accordance itself, determine how to format the results.

property quoteAs : "Citation"

-- "Citation"

-- "Paragraph" -- Doesn't handle citations in Hebrew well

-- "Verses"

 

---------------------------------------

-- End User Settings --

---------------------------------------

 

-- Code to replace any German book title containing the book string with the corresponding English title in the same place.

 

property GermanBookString : "Genesis | Exodus | Levitikus | Numeri | Deuternomium | Josua | Richter | Rut | 1K

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...