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!
|