Jump to content


Photo

Print Library Contents


  • Please log in to reply
6 replies to this topic

#1 Greg Terry

Greg Terry

    Gold

  • Active Members
  • PipPipPipPip
  • 431 posts
  • Gender:Male
  • Location:Paris, IL
  • Interests:Bible Study & Accordance!, Puritans and John Calvin, Old Testament study - especially Leviticus, Model Railroading, Apple Computers, & Fountain Pens
  • Accordance Version:11.x

Posted 14 July 2013 - 11:34 PM

Is there any way to generate a listing of all the modules in my library?

 

I know that I can print the library tab, but that is a graphical representation of the tab. I am looking for something like a text file or word processing file.

 

 


Peace!

Greg


"I was but a Pen in God's hand, and what praise is due to a Pen?"

–Richard Baxter–

#2 James Tucker

James Tucker

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 644 posts
  • Gender:Not Telling
  • Accordance Version:10.x

Posted 15 July 2013 - 12:38 AM

Greg:

 

This is fairly simple, but you'll need to capitalize on the some components of Mac OS.

 

Here's what you do:

 

  1. Open Automator.app (~/Applications/Utilities/Automator.app)
  2. Create A New Service (with Service receives selected 'Files or Folders' in 'Finder'
  3. Drag into the Workspace 'Get Folder Contents' (make your adjustments as you please)
  4. Save as a service (which makes it available as a contextual click with Finder item selected

 

Navigate to ~/Library/Application Support/Accordance/Modules/Tools

Select the Tools Folder > right click > Services 

Then, you will have a list of all your modules wherever you specified the Automator to save the output. 

 

 

Here is the example automator service I created for you to use as an example.  N.B.: If you don't select replace existing file, you'll get an error on the second run. Watch your naming conventions.

 

One more thing: if you don't want the entire POSIX path, you can open the file in an editor with Perl Compatible Regular Expressions and search: ".*/" and replace "", effectively removing the superfluous POSIX path string.

N.B.: You'll want to make sure dot isn't matching newline, otherwise the the expression will be too greedy.

 

[attachment=3453:Get Folder Contents.workflow.zip]


Edited by J. T., 15 July 2013 - 12:43 AM.


#3 Greg Terry

Greg Terry

    Gold

  • Active Members
  • PipPipPipPip
  • 431 posts
  • Gender:Male
  • Location:Paris, IL
  • Interests:Bible Study & Accordance!, Puritans and John Calvin, Old Testament study - especially Leviticus, Model Railroading, Apple Computers, & Fountain Pens
  • Accordance Version:11.x

Posted 15 July 2013 - 07:08 AM

Greetings, J. T.

 

Thanks for the info. I hadn't thought of using Automator to do that. I'll give it a try this evening when I return home.

 

Thanks!

 

Greg


Peace!

Greg


"I was but a Pen in God's hand, and what praise is due to a Pen?"

–Richard Baxter–

#4 James Tucker

James Tucker

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 644 posts
  • Gender:Not Telling
  • Accordance Version:10.x

Posted 15 July 2013 - 10:26 AM

You'll also need to repeat the process for ~/Library/Application Support/Accordance/Modules/Texts, or you could run the service on just the Module folder to get your personal tools and bibles as well as tools and texts.


Edited by J. T., 15 July 2013 - 10:26 AM.

  • Greg Terry likes this

#5 Ken Han

Ken Han

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 607 posts
  • Gender:Male
  • Location:San Diego, CA
  • Accordance Version:11.x

Posted 15 July 2013 - 10:58 AM

Or, you can just copy this into your terminal, and it will save a list of your modules / texts on your desktop

 

tools:

 

ls ~/Library/Application\ Support/Accordance/Modules/Tools/ > ~/Desktop/tools.txt

 

texts:

 

ls ~/Library/Application\ Support/Accordance/Modules/Texts/ > ~/Desktop/texts.txt


Edited by Ken Han, 15 July 2013 - 11:01 AM.

  • Julie Falling, JonathanHuber and Abram K-J like this

#6 Abram K-J

Abram K-J

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 1,908 posts
  • Gender:Male
  • Location:Greater Boston, MA
  • Accordance Version:11.x

Posted 15 July 2013 - 12:48 PM

Nice, Ken!


Abram K-J
Pastor, Writer, Editor, Blogger
Web: Words on the Word

 

Accordance 11 on Yosemite: early 2008 iMac / late 2008 MacBook

Latest iAccord on latest iOS on iPad mini


#7 Greg Terry

Greg Terry

    Gold

  • Active Members
  • PipPipPipPip
  • 431 posts
  • Gender:Male
  • Location:Paris, IL
  • Interests:Bible Study & Accordance!, Puritans and John Calvin, Old Testament study - especially Leviticus, Model Railroading, Apple Computers, & Fountain Pens
  • Accordance Version:11.x

Posted 15 July 2013 - 06:31 PM

Thanks to both of you. I got both of them to work!

 

One can automate (!) the process a bit using Ken's suggestions and put them in a shell script file. Something like:

 

#! /bin/sh
clear
####  tools
ls ~/Library/Application\ Support/Accordance/Modules/Tools/ > ~/Desktop/tools.txt

####  texts
ls ~/Library/Application\ Support/Accordance/Modules/Texts/ > ~/Desktop/texts.txt

echo "Process is complete!  Check your Desktop for the files."

exit

 

Paste the red text in a text editor such as BBEdit, TextWrangler, TextEdit (make sure it is saving as plain text), etc.

 

I would name the fiile with a    .sh    extension so it is obvious it is a shell script - something like AccMods.sh

 

Two additional steps to make sure the script is executable by double-clicking the shell file:

 

chmod 755 filename.sh (in the terminal program - make sure you are in the same directory in which the Script resides).

 

Also, I would 'Get Info' on the Script and set the terminal as the defualt application. You'll have to select OTHER and search for the terminal (don't forget it is in with the Utilities and not in the Applications Folder).

 

If you run the Script and files named tools.txt and texts.txt are located on the Desktop, they will be overwritten by this Script.

 

Just one example, it could be made more complex but no real need to do so - at least for my needs.

 

Thanks guys!


 


  • Ken Han likes this
Peace!

Greg


"I was but a Pen in God's hand, and what praise is due to a Pen?"

–Richard Baxter–




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users