views:

177

answers:

3

I use cvs to maintain all my python snippets, notes, c, c++ code. As the hosting provider provides a public web- server also, I was thinking that I should convert the cvs automatically to a programming snippets website.

  1. cvsweb is not what I mean.
  2. doxygen is for a complete project and to browse the self-referencing codes online.I think doxygen is more like web based ctags.

I tried with rest2web, it is requires that I write /restweb headers and files to be .txt files and it will interfere with the programming language syntax.

An approach I have thought is: 1) run source-hightlight and create .html pages for all the scripts. 2) now write a script to index those script .htmls and create webpage. 3) Create the website of those pages.

before proceeding, I thought I shall discuss here, if the members have any suggestion. What do do, when you want to maintain your snippets and notes in cvs and also auto generate it into a good website. I like rest2web for converting notes to html.

+3  A: 

Run Trac on the server linked to the (svn) repository. The Trac wiki can conveniently refer to files and changesets. You get TODO tickets, too.

Doug Currie
Hi Doug, Might be good idea if I have access to the server. But in my case, I am using sarovar.org a hosting provider for Free Software projects. Thanks!
Senthil Kumaran
+1  A: 

enscript or pygmentize (part of pygments) can be used to convert code to HTML. You can use a custom header or footer to link to the actual code for download.

Ignacio Vazquez-Abrams
A: 

I finally settled for rest2web. I had to do the following.

  1. Use a separate python script to recursively copy the files in the CVS to a separate directory.
  2. Added extra files index.txt and template.txt to all the directories which I wanted to be in the webpage.
  3. The best thing about rest2web is that it supports python scripting within the template.txt, so I just ran a loop of the contents and indexed them in the page.
  4. There is still lot more to go to automate the entire process. For eg. Inline viewing of programs and colorization, which I think can be done with some more trials.

I have the completed website here, It is called uthcode.

Senthil Kumaran