-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
scripts: build and deploy PDF pages for translations #10846
Conversation
Signed-off-by: K.B.Dharun Krishna <[email protected]>
Co-authored-by: Matthew Peveler <[email protected]>
This comment was marked as outdated.
This comment was marked as outdated.
Signed-off-by: K.B.Dharun Krishna <[email protected]>
Signed-off-by: K.B.Dharun Krishna <[email protected]>
Note: I am testing a wildcard method for CI. If you guys notice, some changes in CI it is for testing in a live environment. Once done I will rebase the changes. |
Signed-off-by: K.B.Dharun Krishna <[email protected]>
Signed-off-by: K.B.Dharun Krishna <[email protected]>
Great, now the actions succeed and the files are uploaded (https://github.com/tldr-pages/tldr/actions/runs/6420703581). There seems to be a small issue where some files (bn, ml, ta, th) aren't rendered will trigger a rerun to debug it. Artifact of the first run: pdf-artifacts.zip Edit: the issue still seems to persist for the above 4 languages (the typefaces are indeed part of Noto Sans and while testing locale in a venv offline the files are rendered properly, they don't seem to render when built in the CI), will add these to the exclusion list too. Edit 2. Done, cleaned up the additions that I used for testing in 0a73eb4 (It should be processed soon and will be reflected here). Artifact of the fixed run: pdf-artifacts (2).zip Performance Impact on Workflow timeFrom testing, I can conclude that we might notice 3-5 minutes of added time to our existing PR runs since PDFs are built individually for language files. |
Signed-off-by: K.B.Dharun Krishna <[email protected]>
Signed-off-by: K.B.Dharun Krishna <[email protected]>
Signed-off-by: K.B.Dharun Krishna <[email protected]>
Update: Migrated the building PDF part to a script that you can run inside the Edit. It's done https://github.com/tldr-pages/tldr/actions/runs/6427813298?pr=10846 🎉 , I noticed I forgot to rename it to Edit 2. Done, the artifact of the build can be found here. |
Signed-off-by: K.B.Dharun Krishna <[email protected]>
Signed-off-by: K.B.Dharun Krishna <[email protected]>
Signed-off-by: K.B.Dharun Krishna <[email protected]>
Signed-off-by: K.B.Dharun Krishna <[email protected]>
Merged the PR, there seems to be an issue with the deploy step.
Reverted the change, will debug this later today. |
Changes
Add support for PDFs in other languages
render.py
, by default the filename without output flag istldr-book.pdf
(output flag allows specifying custom names, which I have used in CI).Notes
I have tested all locales and verified rendering and edge cases.
The following locales
ja
,ko
,zh
, andzh_TW
don't have a working render (even though the typeface is present in Noto) due to some issue in theweasyprint
package. [Output of command:missing_locales.txt for debugging]
Edit. Excluded some additional languages see #10846 (comment) for more information.
I have used the
basic
theme instead of thesolarized-light
(used on the English page) theme as it made reading certain typefaces easier.Sample generated files in different themes
This was done during the PRs creation. Since then Tamil has been added to the exclusion list.
Tamil
tldr-pages-ta.pdf - Basic
tldr-pages-ta.pdf - Solarized light
tldr-pages-ta.pdf - Solarized dark
Related Issues
Closes #9432