Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 07-22-2012, 09:48 PM   #1
shotsky
Enthusiast
shotsky began at the beginning.
 
Posts: 39
Karma: 10
Join Date: Jul 2012
Device: none
Help with command line

I use the command line in a program to convert ebooks. While I can get ONE option to work, I cannot seem to get any additional options to function, such as adding input and output profiles.

In the manual, these are described with double dashes followed by single dashes, with some commas thrown in for giggles. How about a complex command line that actually works. If I can SEE a working command line, I can program one like that, but I've spent HOURS trying variations, with few results.

I am able to convert ebooks and create a debug folder, but at this point, I can't seem to add ANY other commands. And, while I'm at it, how in the HELL can I get it to stop splitting the files into separate files, when all I want is one big html file in the debug folder? Sometimes, I get a debug-raw.html file, which is what I want, but more often, I don't get that, but do get a folder full of html files.
Thanks,
John
shotsky is offline   Reply With Quote
Old 07-22-2012, 10:17 PM   #2
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by shotsky View Post
In the manual, these are described with double dashes followed by single dashes, with some commas thrown in for giggles.
I understand your frustration, but no commas are thrown in for giggles.

Quote:
Originally Posted by shotsky View Post
How about a complex command line that actually works.
Here is one example I found in calibre's user manual.

Last edited by DoctorOhh; 07-22-2012 at 10:24 PM.
DoctorOhh is offline   Reply With Quote
Advert
Old 07-22-2012, 10:23 PM   #3
theducks
Well trained by Cats
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: 29,794
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Code:
--fields, -f

    The fields to display when listing books in the database. Should be a comma separated list of fields. Available fields: author_sort,authors,comments,cover,formats,identifiers,isbn,last_modified,pubdate,publisher,rating,series,series_index,size,tags,timestamp,title,uuid Default: title,authors. The special field “all” can be used to select all fields. Only has effect in the text output format.
The first line (the switch) is an either or choice Use the Red or use the Green.. Not both
Code:
calibredb list  -f author_sort,title,isbn,last_modified --sort-by series
theducks is online now   Reply With Quote
Old 07-22-2012, 11:29 PM   #4
shotsky
Enthusiast
shotsky began at the beginning.
 
Posts: 39
Karma: 10
Join Date: Jul 2012
Device: none
Quote:
Originally Posted by dwanthny View Post
I understand your frustration, but no commas are thrown in for giggles.



Here is one example I found in calibre's user manual.
Thank you. I spent a lot of time looking for such an example, but guess I missed the example in comic books. I really didn't expect that the double dash was really intended, and when I did try it, I must have had something else that was not perfect. Altogether, a very frustrating day, since sample working lines were simply not easily located, searching through the manual or this group. In fact, I used Google looking for sample working command lines, and never found more than one option used at a time.

I think the command line section should have several more examples, especially where all the default options are over-ridden by the command line.

Again, thanks, this is what I needed, I just coudn't find it.
John
shotsky is offline   Reply With Quote
Old 07-23-2012, 12:00 AM   #5
shotsky
Enthusiast
shotsky began at the beginning.
 
Posts: 39
Karma: 10
Join Date: Jul 2012
Device: none
Quote:
Originally Posted by theducks View Post
Code:
--fields, -f

    The fields to display when listing books in the database. Should be a comma separated list of fields. Available fields: author_sort,authors,comments,cover,formats,identifiers,isbn,last_modified,pubdate,publisher,rating,series,series_index,size,tags,timestamp,title,uuid Default: title,authors. The special field “all” can be used to select all fields. Only has effect in the text output format.
The first line (the switch) is an either or choice Use the Red or use the Green.. Not both
Code:
calibredb list  -f author_sort,title,isbn,last_modified --sort-by series
I take it then, that no spaces are used between options. The problem I have is that it is not clear how to separate options, what tags start new options. I can't believe how many things I tried that didn't work. Maybe the software could detect an attempt at something such as -'input-default' and either suggest the correct format, or just USE it and do the correct thing? Software that simply refuses to funtion, or tells you 'you are stupid, you did it wrong' without telling you what is right, is just a waste. I have spent many hours trying to figure out the secret to command lines, when it would have been so simple to document it in the first place, and even easier to recognize correct commands with incorrect leadins or separations and either do the right thing, or tell the user what the hell is wrong.
John
shotsky is offline   Reply With Quote
Advert
Old 07-23-2012, 02:39 AM   #6
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by shotsky View Post
Maybe the software could detect an attempt at something such as -'input-default' and either suggest the correct format, or just USE it and do the correct thing? Software that simply refuses to funtion, or tells you 'you are stupid, you did it wrong' without telling you what is right, is just a waste.
Having done quite a bit of user input parsing in the past few years, I can tell you that it's very nontrivial to find where syntax errors in user input are, let alone correct them. You have to keep in mind that there are at least as many ways to make an error in a given input as there are users of the software. As for correcting the error, the software would have to know the intention of the user. I believe it's better do do nothing and error out than have the software do something the user didn't want it to do and potentially break data in the process.
Manichean is offline   Reply With Quote
Old 07-23-2012, 09:40 AM   #7
theducks
Well trained by Cats
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: 29,794
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by shotsky View Post
I take it then, that no spaces are used between options. The problem I have is that it is not clear how to separate options, what tags start new options. I can't believe how many things I tried that didn't work. Maybe the software could detect an attempt at something such as -'input-default' and either suggest the correct format, or just USE it and do the correct thing? Software that simply refuses to funtion, or tells you 'you are stupid, you did it wrong' without telling you what is right, is just a waste. I have spent many hours trying to figure out the secret to command lines, when it would have been so simple to document it in the first place, and even easier to recognize correct commands with incorrect leadins or separations and either do the right thing, or tell the user what the hell is wrong.
John
1 space between each option (switch), 1 space to the first argument after the switch, commas with no space for additional values.
quote each argument value with spaces: "two words","three small words",word
pretty much common CLI (MSDOS uses a colon after the switch that has values
Code:
xcopy  /EXCLUDE:file1[+file2][+file3]
and chains them with a +)
theducks is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Command line - HOW? bookfanmd Calibre 19 01-12-2013 09:17 AM
Need help using command line tsger Recipes 2 07-16-2011 03:23 AM
Where are the command line tools? PaulChernoch Calibre 17 10-23-2009 12:08 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 02:46 PM.


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