| Line | |
|---|
| 1 | =========== |
|---|
| 2 | sitebuilder |
|---|
| 3 | =========== |
|---|
| 4 | |
|---|
| 5 | `sitebuilder` is the main script. It joins all pieces together to |
|---|
| 6 | generate the website:: |
|---|
| 7 | |
|---|
| 8 | >>> from sitebuilder import buildSite |
|---|
| 9 | >>> buildSite('tests/pycommunity.conf') |
|---|
| 10 | |
|---|
| 11 | Checking the structure:: |
|---|
| 12 | |
|---|
| 13 | >>> import os |
|---|
| 14 | >>> os.path.exists('tests/www/glossary.html') |
|---|
| 15 | True |
|---|
| 16 | >>> os.path.exists('tests/www/recipes') |
|---|
| 17 | True |
|---|
| 18 | >>> os.path.exists('tests/www/recipes.html') |
|---|
| 19 | True |
|---|
| 20 | >>> os.listdir('tests/www/recipes') |
|---|
| 21 | ['glossary_recipe.html', 'main_readme_recipe.html'] |
|---|
| 22 | >>> os.path.exists('tests/www/tutorials') |
|---|
| 23 | True |
|---|
| 24 | >>> os.path.exists('tests/www/tutorials.html') |
|---|
| 25 | True |
|---|
| 26 | >>> os.listdir('tests/www/tutorials') |
|---|
| 27 | ['how_to_use.html'] |
|---|