Jump to content

Print Library Contents


Greg Terry

Recommended Posts

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.

 

 

Link to comment
Share on other sites

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.

 

 

Edited by J. T.
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.
  • Like 1
Link to comment
Share on other sites

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

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!


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