Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 02-02-2012, 11:52 AM   #1
BookJunkieLI
Addict
BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.
 
Posts: 206
Karma: 3136
Join Date: Jan 2010
Location: Long Island
Device: Nook, REB 1100, Ebookwise 1500, Jb-Lite, PRS-650, PB302, Asus T-90MT
Template language question

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
BookJunkieLI is online now   Reply With Quote
Old 02-02-2012, 12:05 PM   #2
theducks
Grand Sorcerer
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: 14,129
Karma: 5468860
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
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
 
Enthusiast
Old 02-02-2012, 12:10 PM   #3
BookJunkieLI
Addict
BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.
 
Posts: 206
Karma: 3136
Join Date: Jan 2010
Location: Long Island
Device: Nook, REB 1100, Ebookwise 1500, Jb-Lite, PRS-650, PB302, Asus T-90MT
Quote:
Originally Posted by theducks View Post
do you have a custom column: library (the # is used to reference custom names)
Yes, I have a custom column called library.
BookJunkieLI is online now   Reply With Quote
Old 02-02-2012, 01:00 PM   #4
theducks
Grand Sorcerer
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: 14,129
Karma: 5468860
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by BookJunkieLI View Post
Yes, I have a custom column called library.
The Template has what you told it to show about that book
You need a {title} in there and maybe an {authors}

Unknown is the typical default when a Blank of certain fields is found.
theducks is offline   Reply With Quote
Old 02-02-2012, 03:13 PM   #5
BookJunkieLI
Addict
BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.
 
Posts: 206
Karma: 3136
Join Date: Jan 2010
Location: Long Island
Device: Nook, REB 1100, Ebookwise 1500, Jb-Lite, PRS-650, PB302, Asus T-90MT
Quote:
Originally Posted by theducks View Post
The Template has what you told it to show about that book
You need a {title} in there and maybe an {authors}

Unknown is the typical default when a Blank of certain fields is found.
Okay, I get that, but how do I tell it to look at a book? I selected a book before I clicked Preferences/Save To Disk/Template Editor but the default template still just returns Unknown and I get the exception error when I start playing with the custom columns. Is there someplace in the Template Editor itself that I'm supposed to be telling it what book to look at? When I use my custom template with the actual Save To Disk or Send To Device feature it references my custom columns with no problem.
BookJunkieLI is online now   Reply With Quote
Old 02-02-2012, 03:22 PM   #6
theducks
Grand Sorcerer
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: 14,129
Karma: 5468860
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by BookJunkieLI View Post
Okay, I get that, but how do I tell it to look at a book? I selected a book before I clicked Preferences/Save To Disk/Template Editor but the default template still just returns Unknown and I get the exception error when I start playing with the custom columns. Is there someplace in the Template Editor itself that I'm supposed to be telling it what book to look at? When I use my custom template with the actual Save To Disk or Send To Device feature it references my custom columns with no problem.
Nope.

Save to disk/Send to device templates (they are separate) are invoked when you select a book and click Send/Save
theducks is offline   Reply With Quote
Old 02-02-2012, 03:38 PM   #7
BookJunkieLI
Addict
BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.
 
Posts: 206
Karma: 3136
Join Date: Jan 2010
Location: Long Island
Device: Nook, REB 1100, Ebookwise 1500, Jb-Lite, PRS-650, PB302, Asus T-90MT
Quote:
Originally Posted by theducks View Post
Nope.

Save to disk/Send to device templates (they are separate) are invoked when you select a book and click Send/Save
So what's the point of the Template Editor other than to frustrate you by giving you error messages when you're trying to sort out your template coding? Because to me an editor implies that this is a place to test my coding before it goes out into the real world, so to speak.
BookJunkieLI is online now   Reply With Quote
Old 02-02-2012, 06:55 PM   #8
theducks
Grand Sorcerer
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: 14,129
Karma: 5468860
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by BookJunkieLI View Post
So what's the point of the Template Editor other than to frustrate you by giving you error messages when you're trying to sort out your template coding? Because to me an editor implies that this is a place to test my coding before it goes out into the real world, so to speak.
Editors don't do test cases.
Calibre has provided syntax checking, similar to a spell check function in a Word Processor.

All you need to do is invoke the Save file to a Test directory to see if you have created Syntactically correct Garbage
theducks is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Stupid question about calibre language template Cammagno Calibre 1 01-08-2011 08:00 AM
Question for those who read in their non-native language ficbot General Discussions 13 04-18-2010 07:47 PM
Hi there and question about multiple language ebooks rebl Introduce Yourself 10 03-30-2010 02:45 PM
some question about iliad :language and isilo file foxql iRex 2 03-04-2009 10:02 AM
Language and Encoding Question llhots Calibre 1 02-11-2009 10:01 PM


All times are GMT -4. The time now is 10:17 AM.


MobileRead.com is a privately owned, operated and funded community.