| … | |
… | |
| 16 | quite readable in source form, yet it can be readily |
16 | quite readable in source form, yet it can be readily |
| 17 | converted to html or xml for viewing with a browser. |
17 | converted to html or xml for viewing with a browser. |
| 18 | |
18 | |
| 19 | Converting ReST to html or xml requires the "docutils" python package |
19 | Converting ReST to html or xml requires the "docutils" python package |
| 20 | [#docutils]_:: |
20 | [#docutils]_:: |
| 21 | |
21 | |
| 22 | # USE=glep emerge docutils |
22 | # USE=glep emerge docutils |
| 23 | |
23 | |
| 24 | You will also need to have the ``docutils.conf`` file and the ``tools`` |
|
|
| 25 | subdirectory (with ``glep.css`` and ``glep-html-template``, all found in the |
|
|
| 26 | same place as this README.txt file) in the directory where you intend to |
|
|
| 27 | process GLEPs. |
|
|
| 28 | |
|
|
| 29 | The Gentoo Linux docutils package includes the *docutils-glep.py* program |
24 | The Gentoo Linux docutils package includes the *glep.py* program |
| 30 | which transforms a GLEP in text form to the equivalent html version:: |
25 | which transforms a GLEP in text form to the equivalent html version:: |
| 31 | |
26 | |
| 32 | # docutils-glep.py glep-0001.txt glep-0001.html |
27 | # glep.py glep-0001.txt glep-0001.html |
| 33 | |
28 | |
|
|
29 | The above usage embeds the CSS stylesheet in the html file. For pages |
|
|
30 | on glep.gentoo.org, it is better to use a link instead:: |
|
|
31 | |
|
|
32 | # glep.py --link-stylesheet --stylesheet-path=tools/glep.css \ |
|
|
33 | > glep-0001.txt glep-0001.html |
|
|
34 | |
| 34 | (Incidentally, *docutils-glep.py* contains special code to verify that |
35 | (Incidentally, *glep.py* contains special code to verify that |
| 35 | the GLEP header is reasonable. This README lacks that header, |
36 | the GLEP header is reasonable. This README lacks that header, |
| 36 | so to convert this file to html using docutils you need to |
37 | so to convert this file to html using docutils you need to |
| 37 | use the more generic transformation program:: |
38 | use the more generic transformation program:: |
| 38 | |
39 | |
| 39 | # docutils-html.py --stylesheet-path=tools/glep.css README.txt README.html |
40 | # rst2html.py --stylesheet-path=tools/glep.css README.txt README.html |
| 40 | |
41 | |
| 41 | to convert README.txt to README.html.) |
42 | to convert README.txt to README.html.) |
| 42 | |
43 | |
| 43 | Files |
44 | Files |
| 44 | ===== |
45 | ===== |
| 45 | |
46 | |
| 46 | ======================== ====================================== |
47 | ======================== ====================================== |
| 47 | File Purpose |
48 | File Purpose |
| 48 | ======================== ====================================== |
49 | ======================== ====================================== |
| 49 | README.txt This file (duh!) |
50 | README.txt This file (duh!) |
| 50 | docutils.conf Configuration file for GLEP conversion |
51 | docutils.conf Configuration file for GLEP conversion |
| 51 | from txt to html |
52 | from txt to html |
| 52 | glep-xxxx.txt GLEPs in text (ReST) form |
53 | glep-xxxx.txt GLEPs in text (ReST) form |
| 53 | tools/glep.css GLEP html stylesheet |
54 | tools/glep.css GLEP html stylesheet |
| 54 | tools/glep-html-template GLEP boilerplate template |
55 | tools/glep-html-template GLEP boilerplate template |
| 55 | ======================== ====================================== |
56 | ======================== ====================================== |
| 56 | |
57 | |
| 57 | |
58 | |
| 58 | References |
59 | References |
| 59 | ========== |
60 | ========== |
| 60 | |
61 | |