8 This is RestructuredText_ document, and it can be viewed by using package
9 restview_ (Command to use: ``restview --css=default.css *.rst``, to install:
10 `sudo easy_install restview`).
15 Use ``python setup.py develop`` to install instead of usual
16 ``python setup.py install``.
18 git+openid based wiki/blog/photo-album
19 ---------------------------------------
22 /blocked-authors.txt contains openid of each blocked
23 commenter/rater whatever.
25 /editors.txt: these ppl can do anything. [openids]
27 versioned-document, type:
28 these pages are maintained in git.
29 each page is identified as a folder:
30 /document/some-name/ [somename is unique]
31 index: index.html/index.rst
32 summary: summary.html/summary.rst
35 #. tags: tag1, tag2 [this is the master list]
38 #. container: blog@/some/date/ or wiki@label or
39 album or photo@albumname
43 /document/some-name/file.gif etc
46 /document/some-name/comment/1.rst, 1.meta. comments are
47 threaded: /1.comment, /1/1.comment, 1/2.comment,
48 1/1/1.comment, comments are rated.
49 x.meta: author, timestamp, ratings: [(rater, rating), ], flagged etc.
52 /blog/year/month/date.list: containing document names timestamp and document name pairs.
53 /blog/label/python.txt: containing document names. [this file is auto generated].
56 /wiki/some-name.txt. containing: /document/some-name/
57 /wiki/mysql/insert/: containing: /document/mysql@insert/
61 all photos belong to albums.
62 album and photos are both documents, in album, index.html is
63 generated manually, and it contains a file: photos.txt containing
68 /notes/name/something.txt
69 /notes/name/something-else.txt
74 * gitology start document_name. creates a new document.
75 * gitology grep, ls, cd, find [coz documents may be organized in subdirs]
76 * gitology blog document_name: blogs the given document.
77 * gitology link url tag1, tag2: takes description on stdin. # utility function
78 * gitology sync: updated blog labels file, and other files as needed.
79 * gitology wiki document_name: creates wiki link for a document.
80 * gitology create-album: creates a new album.
81 * gitology add-photo photo, album: adds the photo to the specified album.
82 [photo can be either photo.gif or a document name].
84 implementation details:
85 -----------------------
87 gitology shud be a easy_install-able app, and will provide:
89 * django apps: gitology_blog, gitology_wiki, gitology_album and so on.
91 gitology can be installed system wide and users can configure it as per
92 their preferences. preferences are stored in ~/.gitologyrc.
95 ideally a user shud be able to work with more than on gitology
96 instances, selectable based on env variable, if more than one
99 export GITOLOGY_CONFIG_FILE=".filenamerc"
101 .gitologyrc config file.
105 * repo-path: where git repo is located
106 * remote: remote where git shud push after commits if required.
108 there is a lib. import gitology. it handles config parsing. it handles
109 reading and writing documents. it handles blog, comments, wiki, etc. and
110 it handles versioning.
112 gitology.document.Document is the document abstraction.
115 Document.index, Document.index_name, Document.format, Document.raw_index,
116 Document.summary_content, Document.summary_name, Document.summary_raw,
117 Document.meta.title, Document.meta.title_slug, Document.meta.tags,
118 Document.meta.container, Document.meta.is_private.
121 Document.deps: key==filename, content==content of file, url, mime_type
124 Document.replies: list of Comment. Comment.title, Comment.content,
125 Comment.content_raw, Comment.openid, Comment.poster_name,
126 Comment.poster_email, Comment.poster_url, Comment.posted_on
127 Comment.ratings: array of (openid, rating). Comment.score,
128 Comment.replies. Comment.versions [CommentRevision(ts, content, title)]
131 Document.versions: [DocumentRevision(ts, title, content)]
134 * Document.update_title(title)
135 * Document.update_content(content, type=rst) => changing type raises exception.
136 * Document.add_comment(author, content, title=None, in_reply_to=None, timestamp=None)
139 Post.document, Post.title, Post.posted_on, Post.slug, Post.content
140 Post.make_private(), Post.make_public()
143 * blog_document(Document, published_on=None)
144 * get_post_by_slug(slug)
145 * get_posts(year=None, month=None, day=None, count=10, start=0)
146 * get_post_count(year=None, month=None, day=None)
149 Page.document, Page.name, Page.content
152 * wiki_this_document(Document, published_on=None)
153 * get_page_by_name(name)
157 * Note.children[ordereddict], Note.title, Note.content.
160 * get_note_by_path("/mysql/insert/")
161 * get_children("path", span_tree=False) :: path can be "" or "/" to indicate root.
163 sample filestructure:
164 ---------------------
170 ./blocked-authors.txt
175 ./documents/23/ee/python
176 ./documents/23/ee/python/index.rst
177 ./documents/23/ee/python/comments
178 ./documents/23/ee/python/comments/1.rst
179 ./documents/23/ee/python/comments/1.meta
180 ./documents/23/ee/python/meta.json
184 ./notebooks/personal/swideas.txt
185 ./notebooks/personal/swideas
187 ./albums/lonawala.txt
192 ./blogs/main/labels/python.lst
195 ./blogs/main/2008/07/08.lst
197 .. _RestructuredText:
198 http://docutils.sourceforge.net/docs/user/rst/quickref.html
199 .. _restview: http://mg.pov.lt/restview/