View Single Post
Old 05-16-2010, 12:30 PM   #17
brainycat
PocketBook 302 FTW!
brainycat has a complete set of Star Wars action figures.brainycat has a complete set of Star Wars action figures.brainycat has a complete set of Star Wars action figures.brainycat has a complete set of Star Wars action figures.
 
brainycat's Avatar
 
Posts: 141
Karma: 398
Join Date: Oct 2009
Location: Seattle
Device: Pocketbook 302, upgraded from PRS-600
pbcategories - a script to automate category creation

I have written a script that takes calibre's 'Save to Disk' output and creates one directory for each unique tag. Then it iterates through the files and creates links for duplicate files to save space on the device. The final output is placed into a second directory for syncing with the device. This allows users to setup multiple tags for a book, and the PocketBook will show the book in each category.

It only works one category deep: for example, if you want Cat1/Cat2, Cat1/Cat3 on the device this script cannot handle it.

This script should work for all versions of bash with installations that include gnutils and rsync. It was written and tested in bash v3.1.17. It is release under terms of the GPL.

See the section 'VARIABLES' to setup defaults for your installation.

Enjoy!
Attached Files
File Type: gz pbcategories.tar.gz (2.3 KB, 271 views)
brainycat is offline   Reply With Quote