![]() |
#46 | |
curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,487
Karma: 5748190
Join Date: Jun 2006
Location: Redwood City, CA USA
Device: Kobo Aura HD, (ex)nook, (ex)PRS-700, (ex)PRS-500
|
Quote:
|
|
![]() |
![]() |
![]() |
#47 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,249
Karma: 145488788
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Perhaps they could be made part of the --bean switch. That would do.
|
![]() |
![]() |
Advert | |
|
![]() |
#48 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 767
Karma: 2347
Join Date: Jul 2007
Location: NYC
Device: Sony Reader, nook, Droid, nookColor, nookTablet
|
|
![]() |
![]() |
![]() |
#49 | |
Enthusiast
![]() Posts: 32
Karma: 10
Join Date: Sep 2007
Device: Android phone + PRS-505
|
Quote:
I wonder if this is the same problem you noticed? |
|
![]() |
![]() |
![]() |
#50 | |
curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,487
Karma: 5748190
Join Date: Jun 2006
Location: Redwood City, CA USA
Device: Kobo Aura HD, (ex)nook, (ex)PRS-700, (ex)PRS-500
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#51 | |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 131
Karma: 24870
Join Date: Oct 2006
Device: Sony PRS/505
|
Quote:
I use the LIT for conversions now, since it gives the best results from my extensive testing. I only have a few issues with it still: a) lit2lrf does not use the defined <spine> in the OPF, and I really hate having the TOC actually in the book. The TOC should only be used to define TOC entries, the book should only contain the files defined by <spine>, in the order that <spine> defines them. For now I'm living with the ugly TOC pages, but I'd really prefer for them to go away. b) Some files require individual settings, for instance "Wind Rider's Oath" by David Weber requires an embedded font (I use Times New Roman) because it has crazy characters (The second o in "Sothōii") that the default fonts don't support. I solved (b) in my case by allowing individual files to define extra settings, and the ability to create a defaults file for an entire directory tree. Here are the DOS scripts I use ![]() Main Converter script - It will convert all files in all subdirectories of your current directory, unless a LRF file already exists, so it works for updates too: Code:
@echo off REM Set Defaults for all books. set VARS=--disable-autorotation --header --left-margin=30 --right-margin=30 REM Set the Root for your book library set ROOT=c:\EBooks\NewSrc REM This variable can be changed in any directory with defaults.cmd set DEFAULTVARS= REM Add in any passed in options set VARS=%VARS% %* goto :main :getdefaults set curDir=%1 set curDir=%curDir:~1,-1% :rinse for %%j in ("%curDir%") DO set curDir=%%~dpj set curDir=%curDir:~0,-1% if exist "%curDir%\defaults.cmd" goto :found if /i "%curDir%"=="%ROOT%" goto :notfound goto :rinse :found call "%curDir%\defaults.cmd" :notfound goto :eof :convert set LIT=%1 set LRF=%LIT:~0,-4%lrf" if exist %LRF% goto :eof set OPTIONS=%LIT:~0,-4%cmd" set DEFAULTVARS= set EXTRAVARS= set USEVARS= call :getdefaults %LIT% if exist %OPTIONS% ( call %OPTIONS% ) set USEVARS=%VARS% %DEFAULTVARS% %EXTRAVARS% @echo Filename: %LIT% USEVARS : %USEVARS% lit2lrf %USEVARS% -o %LRF% %LIT% goto :eof :main for /R %%i in (*.lit) do ( call :convert "%%i" ) Code:
SET DEFAULTVARS=--baen --force-page-break-before-tag=h1 Code:
SET EXTRAVARS=--serif-family="c:\windows\fonts, Times New Roman" Last edited by bkilian; 10-09-2007 at 08:05 PM. |
|
![]() |
![]() |
![]() |
#52 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,219
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The --use-spine option is going to be implemented when I get a large enough block of time. Unfortunately it requires refactoring some of the internals of html2lrf, so it needs more time than the typical feature.
|
![]() |
![]() |
![]() |
#53 | |
Enthusiast
![]() Posts: 32
Karma: 10
Join Date: Sep 2007
Device: Android phone + PRS-505
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#54 | |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 131
Karma: 24870
Join Date: Oct 2006
Device: Sony PRS/505
|
Quote:
![]() Sorry if I sounded grumpy about it, I'm not really, it just offends my sense of aesthetics. I'd like the generated LRF to look as similar as possible to the original LIT, and the TOC being shoehorned in at the beginning of the book violates that. Your tool does an amazing job otherwise. |
|
![]() |
![]() |
![]() |
#55 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,219
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
If the spine doesn't specify the TOC file as an element of the book then no it wont be generated.
|
![]() |
![]() |
![]() |
#56 | |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 131
Karma: 24870
Join Date: Oct 2006
Device: Sony PRS/505
|
Quote:
<reference type="toc" title="Table of Contents" href="0671876422_top.htm" /> You could also use the <tour> section to generate a TOC. |
|
![]() |
![]() |
![]() |
#57 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,219
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Yeah then it wont be included.
|
![]() |
![]() |
![]() |
#58 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,249
Karma: 145488788
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
But will it create an external ToC with --use-spine? Also, for LIT files where I have no control over the paragraph indent, I would like a switch for that so I can control how the paragraph indents look. Also, I'd like to be able to control the size of the chapter headings since they do come out rather large. This ia ll because Baen books do some odd things.
|
![]() |
![]() |
![]() |
#59 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,219
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
yeah it will. open a ticket requesting merging of an external CSS file. That way you can override BAEN css.
|
![]() |
![]() |
![]() |
#60 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,249
Karma: 145488788
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Baen Free Library | VillageReader | Deals and Resources (No Self-Promotion or Affiliate Links) | 3 | 12-23-2008 10:57 PM |
Format of Baen books | radius | Workshop | 5 | 02-14-2008 02:08 AM |
Baen format upgrade in the works | Nate the great | Workshop | 11 | 12-09-2007 09:32 PM |
Converting Baen books to LRF | igorsk | Sony Reader | 0 | 12-21-2006 05:59 PM |
Baen Library | derekweb | Deals and Resources (No Self-Promotion or Affiliate Links) | 1 | 07-22-2004 07:29 PM |