12-03-2023, 04:09 AM | #1 |
Connoisseur
Posts: 65
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> But I've tried and tried and I've not found a way to create a basic recipe.<p><a href="https://www.example.org/article2">Article 2</a> <p><a href="https://www.example.org/article3">Article 3</a> Thank you for giving me a tip to progress Villard |
12-04-2023, 12:33 AM | #2 |
Fanatic
Posts: 539
Karma: 82944
Join Date: May 2021
Device: kindle
|
Code:
[ ('Articles', [ {'title': '1', 'url': 'https://www.example.org/article1'}, {'title': '2', 'url': 'link2' }, ] ), ] |
Advert | |
|
12-04-2023, 06:06 PM | #3 |
Connoisseur
Posts: 65
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 ! |
12-04-2023, 11:09 PM | #4 |
Fanatic
Posts: 539
Karma: 82944
Join Date: May 2021
Device: kindle
|
add return soup at the end in that parse
|
12-05-2023, 02:11 PM | #5 |
Connoisseur
Posts: 65
Karma: 10
Join Date: May 2016
Device: Koreader running on Kobo Libra 2
|
|
Advert | |
|
12-07-2023, 03:07 AM | #6 |
Connoisseur
Posts: 61
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 |
|
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 |