View Single Post
Old 02-02-2012, 12:05 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,079
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by BookJunkieLI View Post
I'm working on creating an epub catalog of my books and fanfiction that is sorted by the *location* of the book/fanfic on my Nook as I use the MyFiles directory structure rather than bothering with the Shelves. I use the following two templates to send documents to my Nook based on if it's an official book or a fanficition.
Official books:
{#library}/{#type}/{#genre}/{#subgenre}/{series}/{series_index:>2} {title} - {author}
Fanfiction:
{#library}/{#type}/{#fandom1}/{#fandom2}/{#fandom3}/{#pairings}/{series}/{series_index:>2} {title} - {author}

I'm very pleased with the results I get from these templates. Now for creating the epub catalog I figured out that what I need to do is create a tag for each "location". I decided that the easiest thing to do would be to create a custom column built from the data of the pertinent custom columns. I'll export the results of that column to Excel then use the bulk edit function to add the correct tag to the correct books. If someone knows of an easier way, please let me know.

Using a fanfic as an example this is the result I want in the column:
Fanfic/Gen/HarryPotter/General/Harry_Hermione
(Library)(Type)(Fandom1)(Fandom2)(Pairing) - fandom3 is rarely used but it is used occasionally so I need to include it.
Originally I used this template:
{#library}/{#type}/{#fandom1}/{#fandom2}/{#fandom3}/{#pairings}
The result I got was:
Fanfic/Gen/HarryPotter/General//Harry_Hermione/
I understood where the double // came from but I can't figure out why it added the one at the end. Many tries later this is the template I ended up creating:
{#library}{#type:|/|}{#fandom1:|/|}{#fandom2:|/|}{#fandom3:|/|}{#pairings:|/|}{#empty:|/|}
I had to add an empty custom column to calibre and then include it in the template in order to prevent that / at the end. Is this just the way it has to be or am I missing something due to my lack of programming knowledge? I read thru the Template Language Tutorial, that's how I figured out how to do this in the first place, and I tried to look at the Template Function Reference but just confused myself even more with that.

I also have a quick question about the Template Editor in Preferences/Save To Disk(Send To Device). How do you get it to give you actual results while in the editor? The default is {author_sort}/{title} - {authors} which gives you the result of Unknown/Unknown - Unknown. Which, okay, that's fine I guess but how do I get it to display an actual book from my database? ie Lackey, Mercedes/Intrigues - Mercedes Lackey I tried having a book selected before I clicked on Preferences but that didn't do anything. Plus if I start trying to work with custom columns in there it gives me EXCEPTION: Value: unknown field #library. I'm guessing because it doesn't actually know what to reference at this point because if I go ahead and use the template in Save To Disk it references the #library field properly.

Thanks,

Beth
do you have a custom column: library (the # is used to reference custom names)
theducks is offline   Reply With Quote