-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scripts: build and deploy PDF pages for translations (#10846)
* scrips: build and deploy PDF pages for all languages * cleanup/render.py: reformat code Signed-off-by: K.B.Dharun Krishna <[email protected]> * Apply suggestions from code review Co-authored-by: Matthew Peveler <[email protected]> * scrpts/pdf: update README, refactor code Signed-off-by: K.B.Dharun Krishna <[email protected]> * test/ci: building PDF was wildcard Signed-off-by: K.B.Dharun Krishna <[email protected]> * test/ci: building translations as wildcard 2 * test/ci: fix flag in PDF building Signed-off-by: K.B.Dharun Krishna <[email protected]> * test/ci: update build pdf action Signed-off-by: K.B.Dharun Krishna <[email protected]> * test/ci: extend PDF exclusion list Signed-off-by: K.B.Dharun Krishna <[email protected]> * cleanup/ci: update PDF translation build Signed-off-by: K.B.Dharun Krishna <[email protected]> * scripts/pdf: add website and repo link Signed-off-by: K.B.Dharun Krishna <[email protected]> * test/ci: move PDF build to seperate script file Signed-off-by: K.B.Dharun Krishna <[email protected]> * test/ci: minor fixes to build pdf script Signed-off-by: K.B.Dharun Krishna <[email protected]> * cleanup/ci: update build PDF Signed-off-by: K.B.Dharun Krishna <[email protected]> * scripts: update font family, minor fix Signed-off-by: K.B.Dharun Krishna <[email protected]> * fix/deploy: sha256sum command Signed-off-by: K.B.Dharun Krishna <[email protected]> --------- Signed-off-by: K.B.Dharun Krishna <[email protected]> Co-authored-by: Matthew Peveler <[email protected]>
- Loading branch information
1 parent
7856124
commit a2ab577
Showing
8 changed files
with
66 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env bash | ||
# SPDX-License-Identifier: MIT | ||
|
||
# This script is executed by GitHub Actions when a PR is merged (i.e. in the `Build PDF` step). | ||
set -ex | ||
|
||
function process_page { | ||
pageDir="$1" | ||
folder=$(basename "${pageDir}") | ||
language="${folder##*.}" | ||
case $folder in | ||
pages.bn | pages.ja | pages.ko | pages.ml | pages.ta | pages.th | pages.zh | pages.zh_TW) | ||
;; | ||
pages) | ||
python3 render.py "${pageDir}" -c solarized-light | ||
;; | ||
*) | ||
python3 render.py "${pageDir}" -c basic -o "tldr-book-${language}.pdf" | ||
;; | ||
esac | ||
} | ||
|
||
function main { | ||
for pageDir in ../../pages*; do | ||
process_page "${pageDir}" | ||
done | ||
} | ||
|
||
################################### | ||
# MAIN | ||
################################### | ||
|
||
main |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters