Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 04-17-2013, 11:13 PM   #1
cptnemo
Enthusiast
cptnemo began at the beginning.
 
Posts: 35
Karma: 10
Join Date: Oct 2011
Device: Kindle 3
Customized recipes from command line

Hello,

I am experimenting running calibre (0.8.51) on a Raspberry Pi (with Debian "Wheezy"). This particular calibre package doesn't support any GUI. I can download/convert news with the command "ebook-convert" from source recipes. But is there any way to use command line to download customised recipes? What when you need to add user/password to the recipe?
cptnemo is offline   Reply With Quote
Old 04-18-2013, 10:03 AM   #2
nickredding
onlinenewsreader.net
nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'
 
Posts: 324
Karma: 10143
Join Date: Dec 2009
Location: Phoenix, AZ & Victoria, BC
Device: Kindle 3, Kindle Fire, IPad3, iPhone4, Playbook, HTC Inspire
Sure, just provide the path to the customized recipe on the command line.
nickredding is offline   Reply With Quote
Advert
Old 04-18-2013, 05:16 PM   #3
cptnemo
Enthusiast
cptnemo began at the beginning.
 
Posts: 35
Karma: 10
Join Date: Oct 2011
Device: Kindle 3
Quote:
Originally Posted by nickredding View Post
Sure, just provide the path to the customized recipe on the command line.
Thanks. But How calibre tell that is a local recipe? If I say
Code:
"BBC News"
it goes for the depository, then should I say "/home/bbc.recipe" to have calibre using my local version?

Thank you.
cptnemo is offline   Reply With Quote
Old 04-18-2013, 06:25 PM   #4
nickredding
onlinenewsreader.net
nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'
 
Posts: 324
Karma: 10143
Join Date: Dec 2009
Location: Phoenix, AZ & Victoria, BC
Device: Kindle 3, Kindle Fire, IPad3, iPhone4, Playbook, HTC Inspire
Calibre uses the recipe path you provide, unless it cannot be found in which case it falls back to the built-in recipe.
nickredding is offline   Reply With Quote
Old 04-18-2013, 09:46 PM   #5
cptnemo
Enthusiast
cptnemo began at the beginning.
 
Posts: 35
Karma: 10
Join Date: Oct 2011
Device: Kindle 3
Great!

Another think I don't understand, after downloading and converting the ebook to add it to the library AND to database I need to provide two different commands?

Or the command add will automatically taking care of adding the ebook to the library?
cptnemo is offline   Reply With Quote
Advert
Old 04-19-2013, 12:42 AM   #6
nickredding
onlinenewsreader.net
nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'
 
Posts: 324
Karma: 10143
Join Date: Dec 2009
Location: Phoenix, AZ & Victoria, BC
Device: Kindle 3, Kindle Fire, IPad3, iPhone4, Playbook, HTC Inspire
Aren't these questions you could answer yourself by trying it? Alternatively, why not read the documentation?
nickredding is offline   Reply With Quote
Old 04-19-2013, 02:38 AM   #7
cptnemo
Enthusiast
cptnemo began at the beginning.
 
Posts: 35
Karma: 10
Join Date: Oct 2011
Device: Kindle 3
Quote:
Originally Posted by nickredding View Post
Aren't these questions you could answer yourself by trying it? Alternatively, why not read the documentation?
I read the documentation of calibredb add and it doesn't mention adding books to the library. It says "Add the specified files as books to the database".

I spent 3 hours on the Raspberry Pi to restore my database so I am not up to experimenting and mess it again. If you don't want to answer my questions just don't do it. What's the point in asking me not to ask?
cptnemo is offline   Reply With Quote
Old 04-19-2013, 10:10 AM   #8
nickredding
onlinenewsreader.net
nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'nickredding knows the difference between 'who' and 'whom'
 
Posts: 324
Karma: 10143
Join Date: Dec 2009
Location: Phoenix, AZ & Victoria, BC
Device: Kindle 3, Kindle Fire, IPad3, iPhone4, Playbook, HTC Inspire
Quote:
Originally Posted by cptnemo View Post
I read the documentation of calibredb add and it doesn't mention adding books to the library. It says "Add the specified files as books to the database".
As far as I know, library = database with the book source files stored in the same directory.
Quote:
Originally Posted by cptnemo View Post
I spent 3 hours on the Raspberry Pi to restore my database so I am not up to experimenting and mess it again. If you don't want to answer my questions just don't do it. What's the point in asking me not to ask?
No need to get snippy. Your questions seem very elementary and easily answered by typing a couple of lines on the command line interface. Experimenting with the command line tools is not likely to mess up your database. Since that is what you are going to be using, you'll have to do a bit of experimentation because the command line interface is not a GUI, and hence not as obvious (or thoroughly documented). Good luck, I won't be back in this thread.
nickredding is offline   Reply With Quote
Old 04-19-2013, 11:23 PM   #9
cptnemo
Enthusiast
cptnemo began at the beginning.
 
Posts: 35
Karma: 10
Join Date: Oct 2011
Device: Kindle 3
Quote:
Originally Posted by nickredding View Post
As far as I know, library = database with the book source files stored in the same directory.
Yes, you are right the command add takes care of also adding the file to the library directory. It also take care of the cover. It seams that the only option missing is -publisher but I can live without.

Quote:
Originally Posted by nickredding View Post
No need to get snippy. Your questions seem very elementary and easily answered by typing a couple of lines on the command line interface. Experimenting with the command line tools is not likely to mess up your database. Since that is what you are going to be using, you'll have to do a bit of experimentation because the command line interface is not a GUI, and hence not as obvious (or thoroughly documented). Good luck, I won't be back in this thread.
Thanks. Coming back to the original question of the thread, anyhow I couldn't manage to get the command for local recipes working. I prepared my recipe, tested on Calibre GUI, uploaded to the server /home folder. But still when I give the command

Code:
ebook-convert /home/calibre-library/Foreign_Affairs_Custom.recipe /home/foreignaffairs.mobi --output-profile kindle
I get this outoput

Code:
1% Converting input to HTML...
InputFormatPlugin: Recipe Input running
Failed to compile downloaded recipe. Falling back to builtin one
Traceback (most recent call last):
  File "/usr/bin/ebook-convert", line 19, in <module>
    sys.exit(main())
  File "/usr/lib/calibre/calibre/ebooks/conversion/cli.py", line 323, in main
    plumber.run()
  File "/usr/lib/calibre/calibre/ebooks/conversion/plumber.py", line 972, in run
    accelerators, tdir)
  File "/usr/lib/calibre/calibre/customize/conversion.py", line 208, in __call__
    log, accelerators)
  File "/usr/lib/calibre/calibre/ebooks/conversion/plugins/recipe_input.py", line 93, in convert
    raise ValueError('Failed to find builtin recipe: '+title)
ValueError: Failed to find builtin recipe: Foreign_Affairs_Custom
Why doesn't catch my recipe?

Last edited by cptnemo; 04-19-2013 at 11:32 PM.
cptnemo is offline   Reply With Quote
Reply

Tags
calibre-server, command-line, recipe


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Command line - HOW? bookfanmd Calibre 19 01-12-2013 09:17 AM
Help with command line shotsky Conversion 6 07-23-2012 09:40 AM
Updating built-in recipes from command line on headless server? khromov Related Tools 1 07-03-2012 01:47 PM
Need help using command line tsger Recipes 2 07-16-2011 03:23 AM
Why use the command line? slantybard Calibre 6 07-22-2009 12:17 PM


All times are GMT -4. The time now is 03:43 PM.


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