![]() |
#16 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
|
Very nice. Now I don't need to add Linux compatibility anymore :-)
|
![]() |
![]() |
![]() |
#17 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Jan 2009
Device: prs500, prs350, wexler flexone
|
A question. Do you use the @import feature that much? It'd be a rewrite of the main function to implement, but it wouldn't be too difficult, if it's something that'd be useful. It just seems that little enough global metadata would be used (maybe a single comment or something) that it'd be just as easy to type that in as an absolute path to a common.htm or similar file. What's an example of the sort of thing you'd keep in a common.htm?
|
![]() |
![]() |
Advert | |
|
![]() |
#18 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Jan 2009
Device: prs500, prs350, wexler flexone
|
Oh, and a quick note on sed, in my script. If you're using gsed (Linux) rather than BSD sed, you'll need to change the -E option to, I believe, -r. Whatever option it is that in GNU sed invokes extended regexp support . . .
|
![]() |
![]() |
![]() |
#19 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
|
I do - I have a whole tree of includes, e.g.:
common.inc - for all books pratchett.inc - for author, author-sort; includes common.inc discworld.inc - for customized chapter detection; includes pratchett.inc book.htm - title, title-sort; includes discworld.inc Quote:
Code:
<meta name="lrf:--header" content="" /> <meta name="lrf:--no-links-in-toc" content="" /> <meta name="lrf:--chapter-regex" content="@@@NONE@@@" /> <meta name="lrf:--chapter-attr" content="h2,id,^(chapter|part)" /> <meta name="lrf:--force-page-break-before-tag" content="h2" /> <meta name="lrf:--add-chapters-to-toc" content="" /> <meta name="lrf:--cover" content="%p%n.jpg" /> <link rel="stylesheet" href="common.css" type="text/css" /> |
|
![]() |
![]() |
![]() |
#20 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Jan 2009
Device: prs500, prs350, wexler flexone
|
Ahhh . . . that does sound a good deal more useful than I at first thought. Mayhap I'll get it implemented over the weekend in h2lwrap.
Also, I didn't know you implemented flags as having empty "content" . . . I should support that as well as the complete absence of a "content" attribute (which is how h2lwrap currently does flags). Thanks much! |
![]() |
![]() |
Advert | |
|
![]() |
#21 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
|
I am not sure if missing content is permissible under HTML/XHTML rules. That's why I prefer an empty one.
|
![]() |
![]() |
![]() |
#22 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
|
New version (still the same link) has several enhancements:
1) It should be far easier to port to Linux: All (hopefully) Windows-specific functions have been isolated into four places: - function Execute - calls an external program and returns result code - function GetLastErrorStr - returns message explaining why Execute failed - function SystemTempDir - returns location of temporary directory - function SystemTempFile - creates uniquely-named file in a given directory When these four functions are rewritten, the application should compile under Linux (using FreePascal compiler) 2) The utility now supports any format that Calibre supports: You just provide target on the command line (-t epub) and the utility uses information in its INI file to create a valid command for conversion. 3) Target-specific parameters are now supported. Instead of the old: Code:
<meta name="@include" content="common.inc"> <meta name="lrf:--title" content="Book title"> <meta name="lrf:--header" content=""> Code:
<meta name="@include" content="common.inc"> <meta name="lrf:@include" content="common-lrf.inc"> <meta name="*:--title" content="Book title"> <meta name="lrf:--header" content=""> |
![]() |
![]() |
![]() |
#23 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
|
Modified it a bit more. Now it should work under Linux. Could one of our Linux users try to compile it with FreePascal and see if it works? I don't have Linux myself.
|
![]() |
![]() |
![]() |
#24 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
|
Version 0.09 available - it is now compatible with Calibre 0.6 (and, presumably, any other utility no matter how it organizes its command line).
|
![]() |
![]() |
![]() |
#25 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
|
Version 0.10 adds one more compatibility fix (unfortunately, Calibre does not and will not support output paths beginning with a dot).
|
![]() |
![]() |
![]() |
#26 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
|
Even more fixes for Calibre 0.6.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
"Settings," then "311" - Int'l Kindle searches for wireless providers in the area | Dr. Drib | Amazon Kindle | 2 | 08-28-2011 10:27 AM |
Yep. It's official. Sony Reader has "ruined" books for me. A final "review." | WilliamG | Sony Reader | 48 | 01-14-2011 03:49 AM |
"Zeit-Odyssee"-Trilogie droht das "dunkle Turm"-Schicksal | ThR | E-Books | 4 | 02-10-2010 05:18 AM |
Question - Does iLiab have the "search" & "annotation, highlighting" features? | HiSoC8Y | iRex | 5 | 07-01-2009 04:37 PM |
How to encpode "top of page blurb" for html2lrf? | sahlberg | Calibre | 3 | 10-20-2008 03:58 AM |