11-10-2011, 07:14 PM | #1 |
Enthusiast
Posts: 45
Karma: 14
Join Date: May 2010
Location: WI
Device: Kobo Forma
|
Insert metadata as page at start of book (epub to epub)
I've added custom metadata columns such as #genre and #wordcount (among others) and now I'm wondering if it's possible to somehow include this extra metadata in the output when I convert my epub to epub and select the "insert metadata as page at start of book" under "Structure Detection." I'm presuming that I would need to modify a template (unless there's a plugin that will do this?), but where would I find it? I'm still learning my way around, so any direction would be appreciated.
|
11-10-2011, 07:52 PM | #2 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
\resources\jacket\ Now go to the calibre program directory, on my machine it is Calibre\resources\jacket Copy the two files found there stylesheet.css template.xhtml to the same folder you created under your calibre configuration directory. Now you can edit the files under your calibre configuration directory to suit your needs. Good Luck. |
|
Advert | |
|
11-10-2011, 08:17 PM | #3 |
Enthusiast
Posts: 45
Karma: 14
Join Date: May 2010
Location: WI
Device: Kobo Forma
|
That's very helpful! I've been able to modify the template, but now I'm running into an issue when I try to include my custom metadata. I'm using {#genre}, but only getting an error when I try to run the conversion. I must be missing a step somewhere.
|
11-10-2011, 08:31 PM | #4 |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
I'm afraid my knowledge here is limited. I believe GRiker added this feature, maybe he'll see this and add his two cents.
|
11-10-2011, 08:35 PM | #5 |
Enthusiast
Posts: 45
Karma: 14
Join Date: May 2010
Location: WI
Device: Kobo Forma
|
Good to know. In the meantime, I can at least customize the layout to my hearts content.
|
Advert | |
|
11-10-2011, 09:38 PM | #6 |
creator of calibre
Posts: 43,771
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
IIRC, you cannot add custom column metadata to the jacket.
|
08-02-2012, 11:31 AM | #7 |
Comparer of the Ephemeris
Posts: 1,496
Karma: 424697
Join Date: Mar 2009
Device: iPad
|
In looking at the template.xhtml file, there is a comment describing how to add the contents of a custom column to the generated jacket.
Follow @dwanthny's instructions in post #2 above, then edit template.xhtml to add the name of the custom column whose contents you want included. G |
08-08-2012, 05:47 PM | #8 | |
Evangelist
Posts: 435
Karma: 572984
Join Date: Jan 2010
Location: Long Island
Device: Kobo Libra 2, Kindle 4, Nook Gl4, Nook STR, REB 1100, Ebookwise 1500,
|
Quote:
<div><b>{_fandom1_label}:</b> {_fandom1}</div> Is there someplace else I'm supposed to put it? |
|
08-08-2012, 07:11 PM | #9 | |
Comparer of the Ephemeris
Posts: 1,496
Karma: 424697
Join Date: Mar 2009
Device: iPad
|
Quote:
What kind of column is fandom1? Type the following in the search box: Code:
#fandom1:True G Last edited by GRiker; 08-09-2012 at 06:09 AM. |
|
08-09-2012, 06:35 AM | #10 |
Comparer of the Ephemeris
Posts: 1,496
Karma: 424697
Join Date: Mar 2009
Device: iPad
|
I've reviewed the code (0.8.63). It works correctly, but the contents of the custom column are added only if there's a value in the custom column.
In other words, if you have a custom column whose lookup name is fandom1, and the column is empty, then nothing is added to the jacket template. To review the steps for adding the contents of a custom column to a book jacket:
G Last edited by GRiker; 08-09-2012 at 10:21 AM. |
08-09-2012, 09:56 AM | #11 |
Evangelist
Posts: 435
Karma: 572984
Join Date: Jan 2010
Location: Long Island
Device: Kobo Libra 2, Kindle 4, Nook Gl4, Nook STR, REB 1100, Ebookwise 1500,
|
Thanks for the help, GRiker. I think I figured out that even though I thought I was editing the copy of the file that was in the configuration directory under application data I think I was actually editing the version in the main Calibre program files directory. Which of course would mean that the configuration directory copy would override the file I was editing. <headdesk>
I am curious, are there any custom columns types that it won't work with? Or, so long as there's data in the field, it will work with any column type? |
08-09-2012, 10:18 AM | #12 | |
Comparer of the Ephemeris
Posts: 1,496
Karma: 424697
Join Date: Mar 2009
Device: iPad
|
Quote:
G |
|
08-09-2012, 11:25 AM | #13 |
Evangelist
Posts: 435
Karma: 572984
Join Date: Jan 2010
Location: Long Island
Device: Kobo Libra 2, Kindle 4, Nook Gl4, Nook STR, REB 1100, Ebookwise 1500,
|
Thanks. Those are pretty much the only columns I would want to use but if something comes up I'll let you know.
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Insert Metadata As Page At Start Of Book | JayLaFunk | Conversion | 8 | 02-05-2011 01:44 PM |
"Insert Metadata as Start Page" Error | Ticket #7238 | carlyman | Calibre | 2 | 10-20-2010 10:30 AM |
Bug? "Insert metadata as page at start of book" doesnt encode Comments field properly | rollercoaster | Calibre | 2 | 04-24-2010 10:40 PM |
Insert metadata as page at start of book | economix | Calibre | 2 | 04-17-2010 01:20 AM |
start a new page in an epub book ? | NASCARaddicted | ePub | 9 | 08-18-2009 07:11 PM |