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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 08-06-2009, 06:09 AM   #1
godel10
Connoisseur
godel10 doesn't littergodel10 doesn't littergodel10 doesn't litter
 
Posts: 80
Karma: 204
Join Date: Jun 2007
Device: Sony Librie, Irex DR1000S
Command Line Options for ebook-convert

I have just realized that html2lrf is no longer available, and that now we have to use the command line tool ebook-convert.

In the past I was using
Code:
 html2lrf --bottom-margin=10 file.html
in order to generate my e-books (because the Librie screen is smaller than the PRS). How can I use this option right now? I have tried
Code:
 ebook-convert file.html file.lrf --bottom-margin=10
but it is not working

By the way, is there some place where we can find the command line options for ebook-convert?
godel10 is offline   Reply With Quote
Old 08-06-2009, 06:51 AM   #2
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
Quote:
Originally Posted by godel10 View Post
By the way, is there some place where we can find the command line options for ebook-convert?
Code:
ebook-convert <existing_html_file_name> anything.lrf --help
I still think Calibre should print out at least a basic, not-format-specific help with ebook-convert --help
pepak is offline   Reply With Quote
Advert
Old 08-06-2009, 07:11 AM   #3
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,487
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
Quote:
Originally Posted by pepak View Post
Code:
ebook-convert <existing_html_file_name> anything.lrf --help
I still think Calibre should print out at least a basic, not-format-specific help with ebook-convert --help
That would be confusing because a format can disable general help options.
user_none is offline   Reply With Quote
Old 08-06-2009, 10:01 AM   #4
godel10
Connoisseur
godel10 doesn't littergodel10 doesn't littergodel10 doesn't litter
 
Posts: 80
Karma: 204
Join Date: Jun 2007
Device: Sony Librie, Irex DR1000S
Quote:
Originally Posted by pepak View Post
Code:
ebook-convert <existing_html_file_name> anything.lrf --help
I still think Calibre should print out at least a basic, not-format-specific help with ebook-convert --help
This was helpful. It seems that now the right option is --margin-bottom=10

By the way I suggest to the developers to modify "ebook-convert --help" in such a way that at least it tells you that you can get specific information about a particular format (lrf or any other) using
Code:
ebook-convert <existing_html_file_name> anything.format --help
godel10 is offline   Reply With Quote
Old 08-06-2009, 12:58 PM   #5
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
Quote:
Originally Posted by user_none View Post
That would be confusing because a format can disable general help options.
You mean, more confusing than the fact that unlike any other command line tool ebook-convert does not print help with either --help or -?

Not to mention that I find it strange (to say the least) that to get a command line help, I must not only specify the input and output formats, but the input file must actually exist! It's not as if anything was read from it - if I create a zero-byte HTML file, I will get my help, but if I use a nonexistent filename, I get an error message...
pepak is offline   Reply With Quote
Advert
Old 08-06-2009, 01:06 PM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,387
Karma: 23798586
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by pepak View Post
You mean, more confusing than the fact that unlike any other command line tool ebook-convert does not print help with either --help or -?

Not to mention that I find it strange (to say the least) that to get a command line help, I must not only specify the input and output formats, but the input file must actually exist! It's not as if anything was read from it - if I create a zero-byte HTML file, I will get my help, but if I use a nonexistent filename, I get an error message...
You've done a survey of all command line tools in existence, have you?
kovidgoyal is offline   Reply With Quote
Old 08-07-2009, 12:55 AM   #7
rogue_ronin
Banned
rogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-books
 
Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
Quote:
Originally Posted by kovidgoyal View Post
You've done a survey of all command line tools in existence, have you?
Debating 101: don't talk about the topic, talk about the words used to describe the topic.

Pepak is not out of line here -- even if there may exist tools that don't do help in the fashion he states. Kovid, have you ever seen the zenity help? It's pretty cool: you could do something similar, like --help-2lrf, --help-2epub, etc.

Nonetheless, I'm sure you're annoyed by the repeated requests to change the help system, something that you have decided is settled. And I've surely annoyed you further.

m a r
rogue_ronin is offline   Reply With Quote
Old 08-07-2009, 11:59 AM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,387
Karma: 23798586
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Sigh. Here are some command line tools that dont print a complete help with --help, just like ebook-convert

svn, bzr, mplayer, gnuplot, gcc

Basically any command line tool that does anything non-trivial.

Now if someone has some concrete suggestion as to how to improve the help interface of ebook-convert, keeping in mind the oft repeated constraint that the available options depend on the input and output formats, please say so, otherwise hold your peace.

And I should note that both the concrete suggestions in this thread have been implemented for the next release, in particular:

1) Adding a sentence about how to get more detailed help by specifying input and output formats
2) Not requiring that the input file exists when getting help
kovidgoyal is offline   Reply With Quote
Old 08-07-2009, 02:13 PM   #9
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Including a separate readme.txt for ebook-convert containing all available options/permutations would be much appreciated while you're still working on the online manual. Besides, I think I'd much rather view the help file in my favorite text viewer/editor rather than in shell.

It doesn't even have to be pretty. I'm not sure how ebook-convert limits the options (by input format? output format? both?), but a readme containing the following would probably work well enough for most people:
Code:

Syntax:
ebook-convert .....

General Options:
blah...             //output of ebook-convert --help

List of Supported Input Formats:

List of Supported Output Formats:


FORMAT-SPECIFIC OPTIONS

EPUB                //if options change based on output format
HTML to EPUB        //if options change based on both input and output formats
blah...             //output of ebook-convert file.html .epub --help

LRF                 //if options change based on output format
HTML to LRF         //if options change based on both input and output formats
blah...             //output of ebook-convert file.html .lrf --help

etc...
I've made an MS-DOS batch file that creates something similar to the above for myself.
Code:

@echo off
ebook-convert --help>ebook-convert-readme.txt
echo  >>ebook-convert-readme.txt
echo **********************>>ebook-convert-readme.txt
echo *                    *>>ebook-convert-readme.txt
echo *  EPUB (html2epub)  *>>ebook-convert-readme.txt
echo *                    *>>ebook-convert-readme.txt
echo **********************>>ebook-convert-readme.txt
ebook-convert file.html .epub --help>>ebook-convert-readme.txt
echo  >>ebook-convert-readme.txt
echo *******************>>ebook-convert-readme.txt
echo *                 *>>ebook-convert-readme.txt
echo *  LIT (any2lit)  *>>ebook-convert-readme.txt
echo *                 *>>ebook-convert-readme.txt
echo *******************>>ebook-convert-readme.txt
ebook-convert file.html .lit --help>>ebook-convert-readme.txt
echo  >>ebook-convert-readme.txt
echo *********************>>ebook-convert-readme.txt
echo *                   *>>ebook-convert-readme.txt
echo *  MOBI (any2mobi)  *>>ebook-convert-readme.txt
echo *                   *>>ebook-convert-readme.txt
echo *********************>>ebook-convert-readme.txt
ebook-convert file.html .mobi --help>>ebook-convert-readme.txt
echo  >>ebook-convert-readme.txt
echo ************************>>ebook-convert-readme.txt
echo *                      *>>ebook-convert-readme.txt
echo *  OEBPS (html2oebps)  *>>ebook-convert-readme.txt
echo *                      *>>ebook-convert-readme.txt
echo ************************>>ebook-convert-readme.txt
ebook-convert file.html folder --help>>ebook-convert-readme.txt
My source files are primarily in HTML format and the ones in the batch file are the only formats I convert to. I also added the old names of the corresponding command-line utilities (at least the ones I used) for my convenience.
ilovejedd is offline   Reply With Quote
Old 08-07-2009, 08:21 PM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,387
Karma: 23798586
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You mean like this?

http://calibre.kovidgoyal.net/user_m...k-convert.html
kovidgoyal is offline   Reply With Quote
Old 08-07-2009, 08:31 PM   #11
Kostas
Still wondering why
Kostas has learned how to read e-booksKostas has learned how to read e-booksKostas has learned how to read e-booksKostas has learned how to read e-booksKostas has learned how to read e-booksKostas has learned how to read e-booksKostas has learned how to read e-books
 
Kostas's Avatar
 
Posts: 253
Karma: 800
Join Date: Jun 2009
Location: Athens, Greece
Device: PRS 505, (BlackBerry Bold ?)
Quote:
Originally Posted by kovidgoyal View Post


I really aprreciate Kovid's humor!!
Kostas is offline   Reply With Quote
Old 08-07-2009, 08:53 PM   #12
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Whoops. Guess I'm behind the times. Last time I went to that link, it was empty. Well, it wasn't but it only contained general help info. Granted, I think it was still back when I was beta testing 0.6.

Still, I think including a copy of that HTML file with the Calibre install would be a good idea, specially for people who occasionally need to work on ebooks when they don't have internet access. Then, just point people to that HTML file.

I also suggest switching the link in ebook-convert --help from:
http://calibre.kovidgoyal.net/user_m...onversion.html

to:
http://calibre.kovidgoyal.net/user_m...k-convert.html

At least, temporarily, while the first link is still empty.
ilovejedd is offline   Reply With Quote
Old 08-07-2009, 08:56 PM   #13
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,387
Karma: 23798586
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That HTML file is 2.2MB I don't think I want to distribute it. People that want to refer to it offline can just save it from their browsers.

I'll add a link to the main conversion documentation pointing to the ebook-convert docs until that is ready.
kovidgoyal is offline   Reply With Quote
Old 08-07-2009, 09:00 PM   #14
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Quote:
Originally Posted by kovidgoyal View Post
That HTML file is 2.2MB I don't think I want to distribute it. People that want to refer to it offline can just save it from their browsers.

I'll add a link to the main conversion documentation pointing to the ebook-convert docs until that is ready.
Oh, wow. 2.2MB? That's bigger than most my ebooks.
ilovejedd is offline   Reply With Quote
Old 08-08-2009, 08:28 AM   #15
rogue_ronin
Banned
rogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-books
 
Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
Quote:
Originally Posted by kovidgoyal View Post
Sigh.
Sorry, man. Didn't mean to pile on.

Believe me, when I want to pile on, I do. I think I just ate a guy's spleen in another thread.

So, don't change it -- change it; it's all okay.

You've done plenty of good,

m a r
rogue_ronin is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable Cover for Command Line ebook-convert bcolflesh Calibre 9 02-21-2013 11:02 AM
ABBYY Finereader - Possible to command line/auto convert? tessel Workshop 3 04-06-2011 11:08 AM
ebook-convert not recognized as a command p3aul Calibre 11 10-11-2009 03:19 PM
Why use the command line? slantybard Calibre 6 07-22-2009 12:17 PM
Errors on Command Line drnkusv Calibre 11 11-07-2008 02:59 PM


All times are GMT -4. The time now is 07:40 AM.


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