Instruction to build Apache CloudStack docs with Sphinx
-
Upload
go-chiba -
Category
Technology
-
view
225 -
download
2
description
Transcript of Instruction to build Apache CloudStack docs with Sphinx
![Page 1: Instruction to build Apache CloudStack docs with Sphinx](https://reader036.fdocuments.us/reader036/viewer/2022082805/54c2092c4a79598f198b458a/html5/thumbnails/1.jpg)
Apache CloudStackInstruction to build a docs
with SphinxJapan CloudStack User Group, Go Chiba
@go_chiba
![Page 2: Instruction to build Apache CloudStack docs with Sphinx](https://reader036.fdocuments.us/reader036/viewer/2022082805/54c2092c4a79598f198b458a/html5/thumbnails/2.jpg)
Who am I? Go Chiba
– Working as Japanese system integratorDesign cloud servers/networks/storages . . .etc
– Contributing as Translator of Apache CloudStack docsTranslating docs or GUI on my private and share my expriences.
– Contactmailto: [email protected]: @go_chiba
![Page 3: Instruction to build Apache CloudStack docs with Sphinx](https://reader036.fdocuments.us/reader036/viewer/2022082805/54c2092c4a79598f198b458a/html5/thumbnails/3.jpg)
CHANGE_LOG po manage system has migrated from publican to sphinx
– It is more easy to build a docs on your laptop– Provide graphical UI(Below image are using default theme of sphinx)
![Page 4: Instruction to build Apache CloudStack docs with Sphinx](https://reader036.fdocuments.us/reader036/viewer/2022082805/54c2092c4a79598f198b458a/html5/thumbnails/4.jpg)
Requirements At first, you require install related packages to build a docs This slide only expect OSX environment, but it’s easy to
find installation docs for each package from web– Sphinx
if you using any Linux distribution or windows, please check original instruction.http://sphinx-doc.org/latest/install.html
– gettext
or
# pip install sphinx
# brew install gettext
# port install gettext
![Page 5: Instruction to build Apache CloudStack docs with Sphinx](https://reader036.fdocuments.us/reader036/viewer/2022082805/54c2092c4a79598f198b458a/html5/thumbnails/5.jpg)
Instruction
1. Clone docs repository– Release Notes: https://
git-wip-us.apache.org/repos/asf?p=cloudstack-docs-rn.git
– Admin Guide: https://git-wip-us.apache.org/repos/asf?p=cloudstack-docs-admin.git
– Install Guide: https://git-wip-us.apache.org/repos/asf?p=cloudstack-docs-install.git# git clone https://git-wip-us.apache.org/repos/asf?p=cloudstack-docs-admin.git
![Page 6: Instruction to build Apache CloudStack docs with Sphinx](https://reader036.fdocuments.us/reader036/viewer/2022082805/54c2092c4a79598f198b458a/html5/thumbnails/6.jpg)
Instruction
2. Add language option to conf.py
3. Create a locale directory under source/
4. Generate pot files
5. Generate po files(require for each pot files)
+locale_dirs = ['locale/']+language = 'ja’ # choose your prefferred language
# mkdir –p source/locale/ja/LC_MESSAGES
# make gettext
# msginit --locale=ja --input=build/locale/index.pot --output=source/locale/ja/LC_MESSAGES/index.po
![Page 7: Instruction to build Apache CloudStack docs with Sphinx](https://reader036.fdocuments.us/reader036/viewer/2022082805/54c2092c4a79598f198b458a/html5/thumbnails/7.jpg)
Instruction
6. Modify generated po files in your language7. Change format of files
8. Make document
# msgfmt source/locale/ja/LC_MESSAGES/index.po -o source/locale/ja/LC_MESSAGES/index.mo
# make singlehtml # if you’d like to check make target, please type ‘make help’.
Notes: ‘msginit’ command on STEP5 will be overwirte exisit po files, so if you’d like to merge diffs, please use ‘msgmerge’ as below.
# msgmerge -U source/locale/ja/LC_MESSAGES/index.po build/locale/index.pot
![Page 8: Instruction to build Apache CloudStack docs with Sphinx](https://reader036.fdocuments.us/reader036/viewer/2022082805/54c2092c4a79598f198b458a/html5/thumbnails/8.jpg)
Instruction
10.Check your document!!
If you generate html files, running http service by python script and access to localhost and check your generated docs.http://localhost/build/singlehtml/
# python –m SimpleHTTPServer 80