Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Git Based Knowledge Management System
Branch: master




This is RestructuredText document, and it can be viewed by using package restview (Command to use: restview --css=default.css *.rst, to install: sudo easy_install restview).

Development Note

Use python develop to install instead of usual python install.

git+openid based wiki/blog/photo-album

git file structure:

/blocked-authors.txt contains openid of each blocked commenter/rater whatever.

/editors.txt: these ppl can do anything. [openids]

versioned-document, type:

these pages are maintained in git. each page is identified as a folder: /document/some-name/ [somename is unique] index: index.html/index.rst summary: summary.html/summary.rst meta.json?

  1. tags: tag1, tag2 [this is the master list]
  2. title:
  3. title-slug:
  4. container: blog@/some/date/ or wiki@label or album or photo@albumname
  5. is_private
/document/some-name/file.gif etc
/document/some-name/comment/1.rst, 1.meta. comments are threaded: /1.comment, /1/1.comment, 1/2.comment, 1/1/1.comment, comments are rated. x.meta: author, timestamp, ratings: [(rater, rating), ], flagged etc.
blog, link-blog:
/blog/year/month/date.list: containing document names timestamp and document name pairs. /blog/label/python.txt: containing document names. [this file is auto generated].
/wiki/some-name.txt. containing: /document/some-name/ /wiki/mysql/insert/: containing: /document/mysql@insert/
all photos belong to albums. album and photos are both documents, in album, index.html is generated manually, and it contains a file: photos.txt containing /document/photo-name/
/notes/name.txt /notes/name/something.txt /notes/name/something-else.txt


  • gitology init
  • gitology start document_name. creates a new document.
  • gitology grep, ls, cd, find [coz documents may be organized in subdirs]
  • gitology blog document_name: blogs the given document.
  • gitology link url tag1, tag2: takes description on stdin. # utility function
  • gitology sync: updated blog labels file, and other files as needed.
  • gitology wiki document_name: creates wiki link for a document.
  • gitology create-album: creates a new album.
  • gitology add-photo photo, album: adds the photo to the specified album. [photo can be either photo.gif or a document name].

implementation details:

gitology shud be a easy_install-able app, and will provide: * command line tools * django apps: gitology_blog, gitology_wiki, gitology_album and so on.

gitology can be installed system wide and users can configure it as per their preferences. preferences are stored in ~/.gitologyrc.

on preferences:

ideally a user shud be able to work with more than on gitology instances, selectable based on env variable, if more than one instances exist.

export GITOLOGY_CONFIG_FILE=".filenamerc"

.gitologyrc config file.


  • repo-path: where git repo is located
  • remote: remote where git shud push after commits if required.

there is a lib. import gitology. it handles config parsing. it handles reading and writing documents. it handles blog, comments, wiki, etc. and it handles versioning.

gitology.document.Document is the document abstraction.

Basic info:
Document.index, Document.index_name, Document.format, Document.raw_index, Document.summary_content, Document.summary_name, Document.summary_raw, Document.meta.title, Document.meta.title_slug, Document.meta.tags, Document.meta.container, Document.meta.is_private.
dependency handling:
Document.deps: key==filename, content==content of file, url, mime_type
Document.replies: list of Comment. Comment.title, Comment.content, Comment.content_raw, Comment.openid, Comment.poster_name, Comment.poster_email, Comment.poster_url, Comment.posted_on Comment.ratings: array of (openid, rating). Comment.score, Comment.replies. Comment.versions [CommentRevision(ts, content, title)]
Document.versions: [DocumentRevision(ts, title, content)]
  • Document.update_title(title)
  • Document.update_content(content, type=rst) => changing type raises exception.
  • Document.add_comment(author, content, title=None, in_reply_to=None, timestamp=None)
Post.document, Post.title, Post.posted_on, Post.slug, Post.content Post.make_private(), Post.make_public()
  • blog_document(Document, published_on=None)
  • get_post_by_slug(slug)
  • get_posts(year=None, month=None, day=None, count=10, start=0)
  • get_post_count(year=None, month=None, day=None)
Page.document,, Page.content
  • wiki_this_document(Document, published_on=None)
  • get_page_by_name(name)
  • page_exists(name)
  • Note.children[ordereddict], Note.title, Note.content.
  • get_note_by_path("/mysql/insert/")
  • get_children("path", span_tree=False) :: path can be "" or "/" to indicate root.

sample filestructure:

Something went wrong with that request. Please try again.