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 12-19-2009, 02:08 PM   #1
davotibarna
Member
davotibarna began at the beginning.
 
davotibarna's Avatar
 
Posts: 17
Karma: 10
Join Date: Dec 2009
Location: Oslo, Norway
Device: Nook
Fetch news into a specific format?

My preferred output format is EPUB. I read English news like BBC... on a Sony PRS-505 reader and since this is big a file (~7MB) if I used LRF, my reader crashed and reseted.

However I read Hungarian news also. I customized the device using the PRSCustomizer which uploaded a unicode system font, but it did not change the EPUB font. Meaning I have to use the LRF format for the Hungarian news if I want to get proper characters.

So, I need Calibre to fetch the English (& Norwegian) news as EPUB, but for the Hungarian news I need LRF. I know it's possible to convert manually after the news was fetched, but it's a bit laborious to do it each morning.

I checked the *API Documentation for recipes* but haven't found anything which could help me. I'd appreciate any good hint.
davotibarna is offline   Reply With Quote
Old 12-19-2009, 03:45 PM   #2
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: 25,360
Karma: 4961459
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can using the GUI you have to use the command line for that.

ebook-convert Newsweek.recipe .epub

ebook-convert Newsweek.recipe .lrf
kovidgoyal is online now   Reply With Quote
Old 12-20-2009, 04:34 PM   #3
davotibarna
Member
davotibarna began at the beginning.
 
davotibarna's Avatar
 
Posts: 17
Karma: 10
Join Date: Dec 2009
Location: Oslo, Norway
Device: Nook
True, I can use the command line interface, write a small shell script and schedule it via the crontab.

So:
ebook-convert Newsweek.recipe .lrf
calibredb add Newsweek.lrf

... looks good, but it does not have any tag and despite of the book appears in calibre, it does not upload to the the device when it's connected. It uploaded 5 ebooks, except the one I made and added via CLI. Maybe because it has no tags at all?

I cannot specify the tag in the recipe, but I can do that via the CLI again:
calibredb set_metadata [options] id /path/to/metadata.opf

But how can I know the ID from my shell script?
davotibarna is offline   Reply With Quote
Old 12-20-2009, 04:57 PM   #4
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: 25,360
Karma: 4961459
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use calibredb list to get the id
kovidgoyal is online now   Reply With Quote
Old 12-21-2009, 04:21 AM   #5
davotibarna
Member
davotibarna began at the beginning.
 
davotibarna's Avatar
 
Posts: 17
Karma: 10
Join Date: Dec 2009
Location: Oslo, Norway
Device: Nook
I was aware of the calibredb list command, but then I have to parse its output. The whole workaround becomes lot more complex. Doable of course, but it'd be much easier if the add command could set metadata also.

Question 1:
-----------
How to use the set_metadata command is not clear to me.
calibredb set_metadata [options] id /path/to/metadata.opf

I don't have .opf file a metadata.db file.
There should be a metadata value argument also, right? I don't know where to define the metadata value. Post me an example please.

Question 2:
-----------
There is a setting in the preferences:
"Automatically send downloaded news to ebook reader"

... which works fine for the ebooks downloaded by the GUI, but not when I add an ebook via the CLI, even I set the metadata (via the GUI) to "News". Do you have a flag somewhere which indicates this is a news?
davotibarna is offline   Reply With Quote
Old 01-09-2010, 12:42 PM   #6
davotibarna
Member
davotibarna began at the beginning.
 
davotibarna's Avatar
 
Posts: 17
Karma: 10
Join Date: Dec 2009
Location: Oslo, Norway
Device: Nook
Could you please answer me?
davotibarna is offline   Reply With Quote
Old 01-09-2010, 02:04 PM   #7
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by davotibarna View Post
How to use the set_metadata command is not clear to me.
calibredb set_metadata [options] id /path/to/metadata.opf

I don't have .opf file a metadata.db file.
I had to use scripting.
LIST will give you the ID.
SHOW_METADATA will give you the opf file for that ID.
modify the opf file with your script/SED/etc.
SET_METADATA will then set the metadata for that ID to your modifications.
Starson17 is offline   Reply With Quote
Old 01-09-2010, 02:34 PM   #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: 25,360
Karma: 4961459
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can get the opf file using the show_metadata command

You can't have calibre auto synce news added via the command line
kovidgoyal is online now   Reply With Quote
Old 01-10-2010, 03:52 PM   #9
davotibarna
Member
davotibarna began at the beginning.
 
davotibarna's Avatar
 
Posts: 17
Karma: 10
Join Date: Dec 2009
Location: Oslo, Norway
Device: Nook
This way is easier:

Code:
ebook-convert sghu.recipe .lrf
ebook-meta sghu.lrf --tags "SG.hu,News"
calibredb add sghu.lrf
... so now only the "auto synce news added via the command line" feature is missing. That might come with a newer version.

Thanks for your help!
davotibarna 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
Scheduled news download to specific Calibre library? Nadrek Calibre 10 10-13-2010 12:34 PM
how do I set specific tags when fetching news MichaelMSeattle Calibre 6 04-06-2010 01:09 PM
Looking for a specific book in a format that doesn't suck Viper187 Which one should I buy? 2 03-07-2010 09:50 PM
Deleting specific format only mfaine Calibre 2 10-30-2009 09:54 AM
dlete a specific format gandor62 Calibre 0 03-03-2009 08:18 PM


All times are GMT -4. The time now is 05:23 AM.


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