12-19-2009, 02:08 PM | #1 |
Member
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. |
12-19-2009, 03:45 PM | #2 |
creator of calibre
Posts: 44,327
Karma: 23661992
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 |
Advert | |
|
12-20-2009, 04:34 PM | #3 |
Member
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? |
12-20-2009, 04:57 PM | #4 |
creator of calibre
Posts: 44,327
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Use calibredb list to get the id
|
12-21-2009, 04:21 AM | #5 |
Member
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? |
Advert | |
|
01-09-2010, 12:42 PM | #6 |
Member
Posts: 17
Karma: 10
Join Date: Dec 2009
Location: Oslo, Norway
Device: Nook
|
Could you please answer me?
|
01-09-2010, 02:04 PM | #7 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
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. |
|
01-09-2010, 02:34 PM | #8 |
creator of calibre
Posts: 44,327
Karma: 23661992
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 |
01-10-2010, 03:52 PM | #9 |
Member
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 Thanks for your help! |
|
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 |