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

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 09-12-2011, 03:33 PM   #1
Wyndham
Connoisseur
Wyndham has a complete set of Star Wars action figures.Wyndham has a complete set of Star Wars action figures.Wyndham has a complete set of Star Wars action figures.
 
Wyndham's Avatar
 
Posts: 85
Karma: 250
Join Date: Mar 2011
Location: Cricklewood (London)
Device: iPad Air 2 (iOS 8), iPhone 5 (iOS 8)
Post 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:
  1. Edit in MS Word, Spell and Grammar check etc
  2. Open in LibreOffice and save as HTML
  3. Edit in Notepad++, apply 'template' as shown
  4. Edit 'template' to be correct for document and clean up (remove) redundant coding
  5. Open in LibreOffice to review previous editing in case of acidents, and final Spell and Grammar check.
  6. Import into Calibre

- - - - - - - - - -
Wyndham is offline   Reply With Quote
Old 09-12-2011, 08:35 PM   #2
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 2,877
Karma: 4200035
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"/AuraH2O
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>">
jackie_w is offline   Reply With Quote
Old 09-22-2011, 07:34 AM   #3
Wyndham
Connoisseur
Wyndham has a complete set of Star Wars action figures.Wyndham has a complete set of Star Wars action figures.Wyndham has a complete set of Star Wars action figures.
 
Wyndham's Avatar
 
Posts: 85
Karma: 250
Join Date: Mar 2011
Location: Cricklewood (London)
Device: iPad Air 2 (iOS 8), iPhone 5 (iOS 8)


Quote:
Originally Posted by jackie_w View Post
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>">
Thank you jackie_w

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.
Wyndham is offline   Reply With Quote
Old 10-04-2011, 02:56 PM   #4
citac
Fanatic
citac ought to be getting tired of karma fortunes by now.citac ought to be getting tired of karma fortunes by now.citac ought to be getting tired of karma fortunes by now.citac ought to be getting tired of karma fortunes by now.citac ought to be getting tired of karma fortunes by now.citac ought to be getting tired of karma fortunes by now.citac ought to be getting tired of karma fortunes by now.citac ought to be getting tired of karma fortunes by now.citac ought to be getting tired of karma fortunes by now.citac ought to be getting tired of karma fortunes by now.citac ought to be getting tired of karma fortunes by now.
 
Posts: 521
Karma: 1020204
Join Date: Sep 2008
Location: Bosnia and Herzegovina
Device: Prestigio Multipad PMP7100D 10.1", Prestigio MultiPhone 4040 DUO
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.
citac is offline   Reply With Quote
Old 10-07-2011, 07:04 AM   #5
Wyndham
Connoisseur
Wyndham has a complete set of Star Wars action figures.Wyndham has a complete set of Star Wars action figures.Wyndham has a complete set of Star Wars action figures.
 
Wyndham's Avatar
 
Posts: 85
Karma: 250
Join Date: Mar 2011
Location: Cricklewood (London)
Device: iPad Air 2 (iOS 8), iPhone 5 (iOS 8)
Quote:
Originally Posted by citac View Post
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.
Hi citac,

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
Wyndham is offline   Reply With Quote
Old 10-07-2011, 09:41 AM   #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: 15,084
Karma: 5939999
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by Wyndham View Post
Hi citac,

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
Template file or 'code snippet' would be what I would call that.

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.
theducks is offline   Reply With Quote
Old 10-07-2011, 12:02 PM   #7
citac
Fanatic
citac ought to be getting tired of karma fortunes by now.citac ought to be getting tired of karma fortunes by now.citac ought to be getting tired of karma fortunes by now.citac ought to be getting tired of karma fortunes by now.citac ought to be getting tired of karma fortunes by now.citac ought to be getting tired of karma fortunes by now.citac ought to be getting tired of karma fortunes by now.citac ought to be getting tired of karma fortunes by now.citac ought to be getting tired of karma fortunes by now.citac ought to be getting tired of karma fortunes by now.citac ought to be getting tired of karma fortunes by now.
 
Posts: 521
Karma: 1020204
Join Date: Sep 2008
Location: Bosnia and Herzegovina
Device: Prestigio Multipad PMP7100D 10.1", Prestigio MultiPhone 4040 DUO
Quote:
Originally Posted by Wyndham View Post
Hi citac,

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
That's fine, that's also useful, and since Notepad++ reopens the last file I edited in it, I will just make sure to keep this file in a set location, and copy/paste as necessary.

Thanks!
citac is offline   Reply With Quote
Old 10-14-2011, 08:51 AM   #8
Wyndham
Connoisseur
Wyndham has a complete set of Star Wars action figures.Wyndham has a complete set of Star Wars action figures.Wyndham has a complete set of Star Wars action figures.
 
Wyndham's Avatar
 
Posts: 85
Karma: 250
Join Date: Mar 2011
Location: Cricklewood (London)
Device: iPad Air 2 (iOS 8), iPhone 5 (iOS 8)
Quote:
Originally Posted by theducks View Post
Template file or 'code snippet' would be what I would call that.

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.
Thank you theducks, and you are of course quite correct. I know about lowercase in coding and can't think why I completely missed it

Best wishes.
Wyndham is offline   Reply With Quote
Reply

Tags
html input, meta, tags

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
html to epub - input issue jwalk Conversion 4 06-07-2011 04:10 PM
HTML input -<b> and <i> being converted to block elements? fluxcore Conversion 2 02-18-2011 10:36 PM
HTML column type in custom meta-data. mukoan Calibre 1 07-13-2010 09:59 AM
Add HTML with meta tags Pixelmagic Calibre 3 03-03-2010 08:54 PM
set meta data with ebook-meta and ebook-convert krischik Calibre 6 01-19-2010 12:40 PM


All times are GMT -4. The time now is 08:44 PM.


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