root / pycommunity / etc / README.txt

Revision 74:c54d9c90e732, 4.8 kB (checked in by Tarek Ziad?? <tarek@…>, 18 months ago)

fixed setup

Line 
1===========
2PyCommunity
3===========
4
5`PyCommunity` is a script that generates a static html website by browsing
6a subversion repository, looking for reSTructuredText documents.
7
8The idea is to provide a way to automate a project website update everytime
9developers change the documents founded throughout the subversion tree.
10
11Subversion Layout
12=================
13
14To work, `PyCommunity` browses :
15
16- a list of packages and extract their documents.
17
18- a directory that holds recipes, to build a cookbook
19
20- a directory that holds tutorials
21
22- a file that contains a glossary
23
24- a file, that is the main README
25
26- a file that is used as the content of the package list page
27
28A typical layout would be::
29
30    project
31      |
32      |
33      |-- src
34      |    |
35      |    |-- package1
36      |           |
37      |           |
38      |         module1.py     
39      |         
40      |-- doc
41      |    |
42      |    |--- packages.txt
43      |    |
44      |    |--  README.txt
45      |    | 
46      |    |--- glossary.txt
47      |    |
48      |    |--- recipes
49      |    |       |
50      |    |       |-- recipe1.txt
51      |    |       
52      |    |--- tutorials
53      |    |      |
54      |    |      |-- tutorial1.txt
55
56packages.txt
57------------
58
59This file is used as a introduction text in the packages index page.
60
61README.txt
62----------
63
64Used in the main page
65
66The glossary file
67-----------------
68
69The glossary file contains all project common words. The idea
70is to collect all words and unify terms, in order to avoid
71speaking about the same thing, using two different words.
72
73The glossary is a text file. Each line is composed of a word
74a `:` character, and a short definition::
75
76    glossary: A file that contains definitions
77    doctest: A document with runnable examples
78
79The recipe folder
80-----------------
81
82The recipe folder contains reSTructuredText files. They can
83use an extended tag to mark words that are in the glossary::
84
85    My super restfile
86    -----------------
87
88    is about {{doctest}}
89
90This allows PyCommunity to generate links and hints in the tutorials
91when it founds such tags.
92
93The filename without it suffix, is the id of the recipe.
94
95
96The Tutorial folder
97-------------------
98
99The tutorial folder contains reSTructuredText files. They can
100use an extended tag to mark words that are in the glossary, like
101recipes.
102
103It can also link to a recipe, by using a recipe prefix and a tag
104like glossary::
105
106    look at {{recipe:recipe_1}} for details
107
108`PyCommunity` will replace it with the recipe title and a link to the
109recipe.   
110 
111The filename without it suffix, is the id of the tutorial.
112
113The code packages
114-----------------
115
116`PyCommunity` lists all packages, and scans each one of them, to look
117for all files with the `.txt` extension. `README.txt` is mandatory.
118The files can also use glossary, recipe and tutorial tags::
119
120    look at {{tutorial:tutorial_1}} for details
121
122Website Layout
123==============
124
125`PyCommunity` generates a web structure that looks like this::
126
127    index.html == main README
128    glossary.html       
129    packages
130        index.html (packages list + package.txt content)
131        package1
132            index.html (==README.txt)
133            epydoc (epydoc)
134            module1.html
135    tutorials.html (tutorials list)
136    tutorials
137        tutorial1.html
138    cookbook.html (recipe lists)
139    cookbook
140        recipe1.html
141       
142Configuration
143=============
144
145`PyCommunity` uses `pycommunity.conf` file to know where to get
146its data. Each type of document described in the previous section
147can be located in several places. Target is the folder
148where the website will be generated.
149
150Example::
151
152    [packages]
153    Package1 = /home/repository/project/src/package1
154    Package2 = /home/repository/project/src/package2
155   
156    [templates]
157    index=templates/index.pt
158    tutorial=templates/tutorial.pt
159    recipe=templates/recipe.pt
160    glossary=templates/glossary.pt
161    recipelist=templates/recipelist.pt
162    tutoriallist=templates/tutoriallist.pt
163    packageindex=templates/packageindex.pt
164    packagedoc=templates/packagedoc.pt
165    packagestats=templates/packagestats.pt
166    packagesindex=templates/packagesindex.pt
167    css=templates/pycommunity.css
168
169    [options]
170    projectname=PyCommunity
171    media=templates/media
172    glossary=/home/repository/project/doc/glossary.txt
173    index=/home/repository/project/doc/README.txt
174    packages=/home/repository/project/doc/packages.txt
175
176    [recipes]
177    recipes = /home/repository/project/doc/recipes
178    more_recipes = /home/repository/project/doc/recipes2
179 
180    [tutorials]
181    tutos = /home/repository/project/doc/tutorials
182
183    [target]
184    target1=/home/www
185 
186Usage
187=====
188
189`PyCommunity` is launched directly, with an optional parameter
190that points to the configuration file. It tries to find it in the
191current directory if none is provided. A log file is aslo filled,
192describing all tasks ran by the tool.
193
194     
195
196 
Note: See TracBrowser for help on using the browser.