Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There's no instruction to download custom fonts from CSS #300

Open
0Ky opened this issue Nov 15, 2021 · 3 comments
Open

There's no instruction to download custom fonts from CSS #300

0Ky opened this issue Nov 15, 2021 · 3 comments

Comments

@0Ky
Copy link

0Ky commented Nov 15, 2021

The stylesheet file https://learning.oreilly.com/api/v2/epubs/urn:orm:book:9781482252316/files/styles1.css has many font-face rules that's trying to load custom fonts stored locally, since there's no instructions in the python script to download the custom fonts, they will not be loaded at all. The following book contains all the .otf files that can be downloaded https://learning.oreilly.com/api/v2/epubs/urn:orm:book:9781482252316/files/?limit=10000 although, they are not fetched by the script.

@Korred
Copy link

Korred commented Jan 22, 2022

Hey @lorenzodifuccia,

I am currently looking into adding the download procedure based on the information provided by @0Ky.
While checking the /files/ endpoint I noticed that the toc.ncx / content.opf are also part of the file list.

Can you tell me the reason why you have created your own methods ( create_content_opf and create_toc / parse_toc) instead of using those files?

Example .ncx and .opf for the book above:

https://learning.oreilly.com/api/v2/epubs/urn:orm:book:9781482252316/files/toc.ncx
https://learning.oreilly.com/api/v2/epubs/urn:orm:book:9781482252316/files/content.opf

@Korred
Copy link

Korred commented Jan 30, 2022

@0Ky - It took a while but I have the changes ready.
Below are two examples on how the book (9781482252316) looks like with and without the custom fonts:

grafik
grafik

I will prepare the pull request, with a thorough description on all the changes done, in the upcoming days.

@lorenzodifuccia
Copy link
Owner

Can you tell me the reason why you have created your own methods ( create_content_opf and create_toc / parse_toc) instead of using those files?

Honestly, don't know, maybe because they completely changed the API. Add also this on the PR or on the milestone, please 🙏🏻
I really want to give another life to this project, with the help of the community!! 💪🏻💪🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants