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 12-03-2023, 04:09 AM   #1
Villard
Connoisseur
Villard began at the beginning.
 
Posts: 64
Karma: 10
Join Date: May 2016
Device: Koreader running on Kobo Libra 2
Create a recipe from a local index file

Hello
I've already edited or created some recipes. As I'm not an expert, I generally look builtin recipes to find solutions.
But this time, I've a basic request and I am stuck . Thank you for you help.

I just want to create an epub to collect some fixed internet pages likewiseThe page "https://www.example.org" does not exist or is not reachable.

(NB: using the recipe fonctiunality seems to me more familiar than using the ebook-convert fonctiunality. Maybe I'am wrong on that)

So, my idea is to create on my PC a local html file, which just lists these entries :
<p><a href="https://www.example.org/article1">Article 1</a>
<p><a href="https://www.example.org/article2">Article 2</a>
<p><a href="https://www.example.org/article3">Article 3</a>
But I've tried and tried and I've not found a way to create a basic recipe.
Thank you for giving me a tip to progress

Villard
Villard is offline   Reply With Quote
Old 12-04-2023, 12:33 AM   #2
unkn0wn
Evangelist
unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.
 
Posts: 462
Karma: 82692
Join Date: May 2021
Device: kindle
Code:
        [
            ('Articles',
                [
                    {'title': '1', 'url': 'https://www.example.org/article1'},
                    {'title': '2', 'url': 'link2' },
                ]
            ),
        ]
return something like this in parse index.
unkn0wn is offline   Reply With Quote
Advert
Old 12-04-2023, 06:06 PM   #3
Villard
Connoisseur
Villard began at the beginning.
 
Posts: 64
Karma: 10
Join Date: May 2016
Device: Koreader running on Kobo Libra 2
Thank you
what do you mean by "return something like this in parse index." ?
Do I have to write something like
def parse_index(self):
soup = [
('Articles',
[
{'title': '1', 'url': 'https://www.example.org/article1'},
{'title': '2', 'url': 'link2' },
]
),
]

Sorry for my basic question !
Villard is offline   Reply With Quote
Old 12-04-2023, 11:09 PM   #4
unkn0wn
Evangelist
unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.
 
Posts: 462
Karma: 82692
Join Date: May 2021
Device: kindle
add return soup at the end in that parse
unkn0wn is offline   Reply With Quote
Old 12-05-2023, 02:11 PM   #5
Villard
Connoisseur
Villard began at the beginning.
 
Posts: 64
Karma: 10
Join Date: May 2016
Device: Koreader running on Kobo Libra 2
Quote:
Originally Posted by unkn0wn View Post
add return soup at the end in that parse
It works !
Thank you very much for your help
Villard is offline   Reply With Quote
Advert
Old 12-07-2023, 03:07 AM   #6
DaySleeper
Connoisseur
DaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toys
 
Posts: 58
Karma: 5532
Join Date: Jul 2017
Device: MoonReader+ Android app on Samsung Galaxy S6 Lite and otherst
@Villard, you know more than I do about creating recipes. I would very much like to have something like this to use also, and have been flailing around with other solutions that don't work very well. Could you post your recipe?

Last edited by DaySleeper; 12-07-2023 at 10:30 PM. Reason: to @ op
DaySleeper is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
No Create Index button in Tools Toolbar? Banjo Sigil 18 05-11-2020 09:35 AM
Create Index brolny Sigil 22 08-09-2016 09:24 AM
Rapidly create an index? Iteria Sigil 9 04-18-2012 07:33 AM
Recipe using a local file? TheRevolutionist Recipes 1 01-10-2012 12:37 PM
Creator Tearing my hair out trying to create a simple index djb132 Kindle Formats 0 10-23-2011 10:14 PM


All times are GMT -4. The time now is 10:41 PM.


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