![]() |
#1 |
Zealot
![]() Posts: 106
Karma: 10
Join Date: Sep 2020
Device: kindle paperwhite3/Oasis2
|
New element of list returned by parse_index()
Hello,
About the list returned by parse_index(): 1. Besides title, url, date, description and content, do we have chance to add extra new elements for the list? 2. Can we customize the style of each element? Thanks, Fei. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No you can add anything, and no they are all plain text, except for description which can have html markup
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Zealot
![]() Posts: 106
Karma: 10
Join Date: Sep 2020
Device: kindle paperwhite3/Oasis2
|
I tried to insert <hr> like this:
desc += '<hr>' However, looks like ebook-convert removed it. Thanks, Fei. |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
removed it from where??
|
![]() |
![]() |
![]() |
#5 |
Zealot
![]() Posts: 106
Karma: 10
Join Date: Sep 2020
Device: kindle paperwhite3/Oasis2
|
With code below, there is no line break between 'first line' and 'second line'.
------------------------------ .... desc = 'first line' desc += '<br>' desc += 'second line' articles.append({'title': title, 'url': url, 'description': desc} .... |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Yes, but no page break where? Where are you seeing this description? If it is in the kindle's special periodical toc then no, you cant use formatting there.
|
![]() |
![]() |
![]() |
#7 |
Zealot
![]() Posts: 106
Karma: 10
Join Date: Sep 2020
Device: kindle paperwhite3/Oasis2
|
As I'm a newbie to Calibre and recipe, I might not fully understand you. So I clarified what I had done:
-------- Actually, I wanted to append author to the description so I added this code to parse_index() in foreign_policy.recipe: desc += '<br>' desc += author then, run: ebook-convert calibre/recipe/foreign_policy.recipe ./ebook.epub -d ./log --output-profile kindle_oasis -vv then opened ebook.pub and jumped to a section menu. The line break was not output as I expected. I checked log/processed/feed_0/index.html. The line break was not output as well. |
![]() |
![]() |
![]() |
#8 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Remove the output_profile and see if that helps. And dont create epubs if ou intend to use them on the kindle, create mobi directly.
|
![]() |
![]() |
![]() |
#9 |
Zealot
![]() Posts: 106
Karma: 10
Join Date: Sep 2020
Device: kindle paperwhite3/Oasis2
|
I removed output_profile option, but did not work.
|
![]() |
![]() |
![]() |
#10 | |
Zealot
![]() Posts: 106
Karma: 10
Join Date: Sep 2020
Device: kindle paperwhite3/Oasis2
|
Quote:
One more question: Do we have chance to generate both epub and mobi by running ebook-convert just once? I did not find a way how to do it from the manual of ebook-convert. |
|
![]() |
![]() |
![]() |
#11 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
![]() |
![]() |
![]() |
#12 |
Zealot
![]() Posts: 106
Karma: 10
Join Date: Sep 2020
Device: kindle paperwhite3/Oasis2
|
|
![]() |
![]() |
![]() |
#13 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No, amazon prevents you from sending preiodicals by email, reformatting them as plain books, you have to use usb
|
![]() |
![]() |
![]() |
#14 |
Zealot
![]() Posts: 106
Karma: 10
Join Date: Sep 2020
Device: kindle paperwhite3/Oasis2
|
|
![]() |
![]() |
![]() |
#15 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No, and why would you want to do that? If you do, just do a MOBI to MOBI conversion after generating your initial periodical MOBI.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Need help in parse_index with irregular css | skyland_rw | Recipes | 0 | 01-07-2014 10:07 AM |
parse_index() question | mr.w0lf | Recipes | 2 | 10-11-2013 05:30 AM |
No declaration found for element 'list-holder' | kakkalla | Sigil | 4 | 05-18-2013 05:24 AM |
Use parse_index to parse XML? | surf | Recipes | 0 | 02-10-2013 04:36 AM |
Article Dates with parse_index | EnergyLens | Calibre | 6 | 04-21-2010 10:13 PM |