Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 10-03-2022, 05:43 AM   #1
Villard
Junior Member
Villard began at the beginning.
 
Posts: 5
Karma: 10
Join Date: May 2016
Device: None
Create an epub from JSON data

Hello
I want to create an ebook filled by JSON data
The source is an json api URL, one per day
https://api.aelf.org/v1/messes/AAAA-MM-DD/france
It contains the french biblical lectures of the day.
I want to get an epub containing the lectures for the next 3 months, a page per day and some formatting to highlight the titles and so on.
I don't think there is a quick way to extract and transform this 90 jsondata files. I want the operation to be redone easily eevry 3 months.

I am considering writing scripts to get the data and reformatting them.
either by using MSWord or OOWriter and creating an unique docx file I will then convert to epub with Calibre.
either by using notepad++ and creating a unique or 90 html files to be converted in epub;
I am not very familiar with scripts or macros, but genererally I can find advice and solutions.
Wich way will you advice or perhaps a better other way ?
Thanks per advance
Villard
Villard is offline   Reply With Quote
Old 10-03-2022, 10:26 AM   #2
pierre71
Member
pierre71 has not lost his or her sense of wonder.pierre71 has not lost his or her sense of wonder.pierre71 has not lost his or her sense of wonder.pierre71 has not lost his or her sense of wonder.pierre71 has not lost his or her sense of wonder.pierre71 has not lost his or her sense of wonder.pierre71 has not lost his or her sense of wonder.pierre71 has not lost his or her sense of wonder.pierre71 has not lost his or her sense of wonder.pierre71 has not lost his or her sense of wonder.pierre71 has not lost his or her sense of wonder.
 
Posts: 12
Karma: 86818
Join Date: May 2022
Device: kobo libra 2
Salut !

If I was planning to do this, I would use python to get the json data and generate the html files and the table of content.
Then I would use sigil to wrap all this into an epub.

That would be way more easy to maintain (and probably to use) than having do deal with graphical editor (notepad/libreoffice) macros.
pierre71 is offline   Reply With Quote
Old 10-03-2022, 01:20 PM   #3
Villard
Junior Member
Villard began at the beginning.
 
Posts: 5
Karma: 10
Join Date: May 2016
Device: None
Quote:
Originally Posted by pierre71 View Post
Salut !

If I was planning to do this, I would use python to get the json data and generate the html files and the table of content.
Then I would use sigil to wrap all this into an epub.

That would be way more easy to maintain (and probably to use) than having do deal with graphical editor (notepad/libreoffice) macros.
Merci Pierre pour le conseil
Thank you for the advice, I'll try this method

Villard
Villard is offline   Reply With Quote
Old 10-24-2022, 09:01 AM   #4
Villard
Junior Member
Villard began at the beginning.
 
Posts: 5
Karma: 10
Join Date: May 2016
Device: None
Thanks to Pierre, I've succeeded to do it with Python only : I get the json data, construct one html file containing all the pages, integrate to Calibre and make Calibre convert the html into epub.
Villard is offline   Reply With Quote
Reply

Tags
json, macros, script

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
adding mass metadata to epub files from json? jcd1013 ePub 5 08-26-2020 05:14 PM
Create epub zkab Conversion 13 04-20-2016 06:39 AM
Best workflow for data->database->epub? clemens14 ePub 7 12-20-2014 07:55 AM
Using Templates with ePub data? slothful Library Management 7 09-03-2012 04:08 AM
ePub meta data brudigia ePub 4 07-26-2010 01:58 PM


All times are GMT -4. The time now is 12:19 PM.


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