internationalization tool for GitHub wikis
Converts a GitHub wiki into an HTML or PDF, optionally translated into multiple languages, to support rapid iteration of GitHub Wiki content while maintaining broad internationalization support and document generation for distribution.
pandoc and the xelatex PDF engine
- Google: set
GOOGLE_API_KEYin environment.
To delete all example files and start over with newly built binary, run:
$ ./test.sh {local|remote} {mock|google} [comma-separated-languages]Build the binary.
$ go build -o illuminated ./cmdGenerate a single, joined HTML and PDF for 5 languages using Google translate.
$ ./illuminated generate --verbose \
--source https://github.com/getlantern/guide.wiki.git \
--base "en" \
--languages "en,zh,ru,fa,ar" \
--translator "google" \
--overrides "../overrides.yml" \
--title "User Guide" \
--html \
--pdf \
--join \
--forceUse the help command for details.
$ ./illuminated --helpIf a specific phrase is needed for a particular language, define that in an overrides.yml file in the directory where the command is run (or specify a different path with the --overrides flag).
Example overrides.yml:
- title: Lantern
language: zh
original: 灯笼
replacement: 蓝灯
- title: Block
language: en
original: blacklist
replacement: block list
- title: Allow
language: en
original: whitelist
replacement: allow list