09-12-2011, 02:33 PM | #1 |
Connoisseur
Posts: 96
Karma: 250
Join Date: Mar 2011
Location: Cricklewood (London)
Device: iPad Air 2 (iOS 9), iPhone 6 (iOS 9)
|
HTML META input query
I use HTML as the source for importing into Calibre for stories that I have either written or edited.
I clean the code generated and this all works fine, but I am not able to get all the META input right and would appreciate some assistance. The following is the 'template' I use for each new source document, and most of it works as expected. - - - - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252"> <TITLE>Story title here</TITLE> <META NAME="GENERATOR" CONTENT="LibreOffice 3.4 (Win32)"> <META NAME="AUTHOR" CONTENT="Author Name"> <META NAME="CREATED" CONTENT="0;0"> <META NAME="CHANGED" CONTENT="20110912;18475757"> <META NAME="PUBLISHER" CONTENT="Publisher name - usually me"> <META NAME="TAGS" CONTENT="Tags here such as, Espionage, Fiction, Suspense"> <META NAME="COVER" CONTENT="Address of image to be used for cover. Full path, or what?"> <META NAME="COMMENTS" CONTENT="<P>This document is used to set the coding to be used when creating or editing HTML source documents, prior to importing into Calibre.</P>"> <STYLE TYPE="text/css"> <!-- @page { margin: 2.54cm } P { margin-top: 0.3cm; margin-bottom: 0.3cm; color: #000000; font-family: "Calibri"; font-size: 12pt; line-height: 100% } H1 { margin-top: 0.3cm; color: #365f91; font-family: "Calibri"; font-size: 14pt; line-height: 100% } --> </STYLE> </HEAD> <BODY LANG="en-GB" TEXT="#000000" DIR="LTR"> <H1>Story title here</H1> - - - - - - - - - - The two META tags that don't work correctly are COVER and COMMENTS. Any ideas? Are there better ways of doing this? Many thanks in advance. - - - - - - - - - - For completeness sake, I follow the following process steps:
- - - - - - - - - - |
09-12-2011, 07:35 PM | #2 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Hi Wyndham,
I think if you remove the hard linebreak between the red words "creating" and "or editing" then Calibre will read the Comments OK. At least it worked for me. I'm afraid I can't help with the Cover question, but you could always resort to dragging the image onto the Calibre Edit Metadata screen. Code:
<META NAME="COMMENTS" CONTENT="<P>This document is used to set the coding to be used when creating
or editing HTML source documents, prior to importing into Calibre.</P>">
|
09-22-2011, 06:34 AM | #3 | |
Connoisseur
Posts: 96
Karma: 250
Join Date: Mar 2011
Location: Cricklewood (London)
Device: iPad Air 2 (iOS 9), iPhone 6 (iOS 9)
|
Quote:
You are quite right about the COMMENTS tag. Your suggestion worked. Can't think why I didn't try it. With regard to the COVER tag, I'm trying to avoid the 'drag and drop' option - I do this currently and am trying to get the whole process better automated. Thank you again for responding. |
|
10-04-2011, 01:56 PM | #4 |
Fanatic
Posts: 550
Karma: 1020204
Join Date: Sep 2008
Location: Bosnia and Herzegovina
Device: Lenovo Yoga Tab 2 (Android)
|
Wyndham, a bit off topic, but how do you apply a template to Notepad++? I recently started using the program more often, and didn't know about this option.
|
10-07-2011, 06:04 AM | #5 | |
Connoisseur
Posts: 96
Karma: 250
Join Date: Mar 2011
Location: Cricklewood (London)
Device: iPad Air 2 (iOS 9), iPhone 6 (iOS 9)
|
Quote:
I hope I didn't mislead you, but I used the term "apply template" very loosely and did not mean (for example) as used to apply a template (properly) in Dreamweaver. I have an HTML file which contains all the header information correctly set out and I then copy and paste this to the (new) file/document. I usually work on several documents at a time, as Notepadd++ can do this quite easily provided your PC has enough memory (etc). 1) Apply template to each file (copy and paste from example document) 2) Copy text to be removed if no longer needed e.g. <H1 CLASS="western"> <P CLASS="western" STYLE="margin-bottom: 0.35cm"> <P CLASS="western"> <FONT FACE="Calibri, sans-serif"> <FONT SIZE=3> etc 3) Select CTRL-H to bring up the Find/Replace dialog, enter text to find and choose replace in all open documents. Check out the drop down arrows on the replace box to quickly find text to replace with. e.g. <P CLASS="western" STYLE="margin-bottom: 0.35cm"> replaced by <P> ------ This is a slowish task, but can significantly reduce the size of some documents and does result in a clean(er) HTML file which imports nicely into Calibre. If there is a better way of doing this I'd love to hear about it. Hope this was helpful |
|
10-07-2011, 08:41 AM | #6 | |
Well trained by Cats
Posts: 30,172
Karma: 57532200
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
I also have NP++ and copy code from my (notes and) 'tips' file into working documents I did note your example above Used uppercase P tags ... I believe lower case tags (the opening and closing tag must MATCH case) are the xhtml standard now. |
|
10-07-2011, 11:02 AM | #7 | |
Fanatic
Posts: 550
Karma: 1020204
Join Date: Sep 2008
Location: Bosnia and Herzegovina
Device: Lenovo Yoga Tab 2 (Android)
|
Quote:
Thanks! |
|
10-14-2011, 07:51 AM | #8 | |
Connoisseur
Posts: 96
Karma: 250
Join Date: Mar 2011
Location: Cricklewood (London)
Device: iPad Air 2 (iOS 9), iPhone 6 (iOS 9)
|
Quote:
Best wishes. |
|
Tags |
html input, meta, tags |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Add HTML with meta tags | Pixelmagic | Calibre | 9 | 04-19-2020 05:47 PM |
html to epub - input issue | jwalk | Conversion | 4 | 06-07-2011 03:10 PM |
HTML input -<b> and <i> being converted to block elements? | fluxcore | Conversion | 2 | 02-18-2011 09:36 PM |
HTML column type in custom meta-data. | mukoan | Calibre | 1 | 07-13-2010 08:59 AM |
set meta data with ebook-meta and ebook-convert | krischik | Calibre | 6 | 01-19-2010 11:40 AM |