I used calibredb list -f *genre > "genre_list.txt". The files have a line for each book showing id+buffer+genre. The (id+buffer) was 5 spaces for me but would vary per library.
I ended up writing a python script to strip the id+buffer and and print a comma-separated list of all genres plus an additional comma-separated list with each genre in quotes for use in Calibre template code (might as well).
ex.
List 1: Adventure, Fantasy, Mystery, Romance, Science Fiction
List 2: "Adventure", "Fantasy", "Mystery", "Romance", "Science Fiction"
Happy to share it, although my coding is clunky.
Last edited by meghane_e; 03-15-2019 at 04:07 PM.
Reason: verb tense
|