02-01-2010, 09:30 PM | #31 | ||
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
It is also worthy of note that you stepped up to help even though you knew she was using the free version of your software. Quote:
I'll have to save this post for future use. Karma to both of you. |
||
02-02-2010, 01:04 AM | #32 | |
Addict
Posts: 360
Karma: 407796
Join Date: Oct 2009
Location: Victoria, Australia
Device: Paperwhite 5
|
Quote:
Oh and I actually prefer using your bat command versus even Calibre because it annoys me that Calibre creates a new area to put my ebooks when I want them arranged a certain way and I can't do that with Calibre. Ever think about writing more command lines for converting other things? Like PDF and LIT files? |
|
Advert | |
|
02-02-2010, 01:28 AM | #33 |
Wizard
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
|
Thanks.
Yeah I pretty much do all my calibre conversions using scripts or the command line, partly to avoid Calibre's GUI messing with my file structure. Calibre is still doing the conversion, though, so let's give credit where it's due. Actually, the modifications you'd need to do batch converting with .PDF or .LIT should be pretty straightforward. If you want, e.g., to convert all the .pdf's in a folder to *.epub, using calibre alone, just use my second line above, but change (*.html) to (*.pdf). Or change it to (*.lit) to convert .lit files to .epub. If you want .lit files as output, just change the "%%~nI.epub" at the end to "%%~nI.lit" Similarly, if you want to use it for converting files that AbiWord handles but calibre doesn't (WordPerfect, or Works, or Word 2007), keep the first line, and change (*.doc) to (*.docx) or (*.wpd) or (*.wps), or whatever. Keep to=html at the end, and (*.html) in the second line. If you want to get serious about this, though, you should read up on calibre's ebook-convert command line program and the many options it offers, as well as a batch guide for Windows such as this one, or if you use another OS, try a bash script. Last edited by frabjous; 02-02-2010 at 01:32 AM. |
02-02-2010, 01:49 AM | #34 |
Addict
Posts: 360
Karma: 407796
Join Date: Oct 2009
Location: Victoria, Australia
Device: Paperwhite 5
|
Thanks frabjous, I doubt I'd get fully serious about it though as I'm not sure I would fully understand it all. Changing your first command line to use Calibre that way though seems pretty straight-forward so I think I'll try that.
|
02-02-2010, 04:11 AM | #35 |
Addict
Posts: 360
Karma: 407796
Join Date: Oct 2009
Location: Victoria, Australia
Device: Paperwhite 5
|
Hey frabjous, I tried changing the .html to a .lit as you said above to convert those to epubs but it didn't work for me. The file I saved just saved as a .dat and didn't change into a windows batch file like the other one did.
|
Advert | |
|
02-02-2010, 04:25 AM | #36 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
Code:
for %%I in (*.html) do "C:\Program Files\Calibre2\ebook-convert.exe" "%%I" "%%~nI.lit" Good Luck. Last edited by DoctorOhh; 02-02-2010 at 04:27 AM. |
|
02-02-2010, 04:34 AM | #37 |
Addict
Posts: 360
Karma: 407796
Join Date: Oct 2009
Location: Victoria, Australia
Device: Paperwhite 5
|
This is the change I'm trying to make:
for %%I in (*.lit) do "C:\Program Files\Calibre2\ebook-convert.exe" "%%I" "%%~nI.epub" I then saved the above as lit2epub.dat but it does not turn into a windows batch file as the other one did. It just stays the dat file. |
02-02-2010, 04:41 AM | #38 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
Save it as lit2epub.bat Last edited by DoctorOhh; 02-02-2010 at 04:44 AM. |
|
02-02-2010, 05:17 AM | #39 |
Addict
Posts: 360
Karma: 407796
Join Date: Oct 2009
Location: Victoria, Australia
Device: Paperwhite 5
|
|
02-02-2010, 05:20 AM | #40 |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
ABCD is the extent of my knowledge, glad I could help.
Last edited by DoctorOhh; 02-02-2010 at 05:24 AM. |
02-02-2010, 06:03 AM | #41 |
Addict
Posts: 360
Karma: 407796
Join Date: Oct 2009
Location: Victoria, Australia
Device: Paperwhite 5
|
Well I tried it and while it did create the batch file properly it didn't work. Not sure why. I pasted it in the folder with the lit files but the black command screen just flashed up really quickly and then closed again.
|
02-02-2010, 06:38 AM | #42 | |
Wizard
Posts: 1,434
Karma: 1525776
Join Date: Aug 2009
Location: TAS, Australia
Device: Astak Pocket Pro (Black), 2 x Kindle WiFi (Graphite), iPod Touch 4G
|
Quote:
sleep 30 This will keep the window open for 30 seconds (replace 30 with the number of preferred seconds). Will allow you to see any error messages. |
|
02-02-2010, 08:19 AM | #43 | |
Addict
Posts: 360
Karma: 407796
Join Date: Oct 2009
Location: Victoria, Australia
Device: Paperwhite 5
|
Quote:
EDIT: I worked out what I was doing wrong with the code... using the 32bit line instead of the 64bit. Another smack upside my head needed. All working perfectly now. Last edited by Laura81; 02-02-2010 at 10:51 AM. |
|
02-02-2010, 03:16 PM | #44 |
Wizard
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
|
Glad to hear it!
|
03-02-2010, 01:16 PM | #45 |
Addict
Posts: 221
Karma: 801624
Join Date: Aug 2009
Location: US Pacific Northwest
Device: LePan II, Kobo Aura
|
Thank you, frabjous, for the script you supplied. I came here looking for a solution to convert an html file to epub. I used only the one html2epub line and it worked perfectly.
Needless to say, I'm going to save the bat file and bookmark this thread. |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Hebrew Doc file to epub | logie072 | ePub | 3 | 08-27-2010 11:31 AM |
need advice doc/html to epub | ebooker | Workshop | 2 | 08-14-2010 10:06 PM |
Converting .doc to epub . . . | michael180 | General Discussions | 2 | 06-08-2010 08:54 PM |
Doc to Epub convertion problems | johnbajer | Calibre | 5 | 06-04-2010 05:30 PM |
Problem converting doc to epub | Laura81 | Calibre | 3 | 01-26-2010 06:03 PM |