tinycm rev 3

Add TODO and tools
author Christophe Lincoln <pankso@slitaz.org>
date Wed Apr 11 15:57:29 2012 +0200 (2012-04-11)
parents 7f48a9784c47
children 7914154807bb
files TODO tools/hgweb.py tools/httpd.conf tools/serv.sh
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/TODO	Wed Apr 11 15:57:29 2012 +0200
     1.3 @@ -0,0 +1,7 @@
     1.4 +
     1.5 +
     1.6 +	* Upload interface with a config var to disable file upload
     1.7 +	* Mail integration in SHell or Python
     1.8 +	* PHP content viewer for hosting without CGI support
     1.9 +	* Use tazu to manage user ? Use in option system users in /etc ?
    1.10 +	
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/tools/hgweb.py	Wed Apr 11 15:57:29 2012 +0200
     2.3 @@ -0,0 +1,19 @@
     2.4 +#!/usr/bin/env python
     2.5 +#
     2.6 +# An example hgweb CGI script, edit as necessary
     2.7 +# See also http://mercurial.selenic.com/wiki/PublishingRepositories
     2.8 +
     2.9 +# Path to repo or hgweb config to serve (see 'hg help hgweb')
    2.10 +config = "/home/pankso/Public/cgi-bin/tinycm/content"
    2.11 +
    2.12 +# Uncomment and adjust if Mercurial is not installed system-wide
    2.13 +# (consult "installed modules" path from 'hg debuginstall'):
    2.14 +#import sys; sys.path.insert(0, "/path/to/python/lib")
    2.15 +
    2.16 +# Uncomment to send python tracebacks to the browser if an error occurs:
    2.17 +#import cgitb; cgitb.enable()
    2.18 +
    2.19 +from mercurial import demandimport; demandimport.enable()
    2.20 +from mercurial.hgweb import hgweb, wsgicgi
    2.21 +application = hgweb(config)
    2.22 +wsgicgi.launch(application)
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/tools/httpd.conf	Wed Apr 11 15:57:29 2012 +0200
     3.3 @@ -0,0 +1,10 @@
     3.4 +# Server root
     3.5 +H:../
     3.6 +# Allow address
     3.7 +A:0.0.0.0/0
     3.8 +# CGI interpreter path
     3.9 +*.cgi:/bin/sh
    3.10 +# File to open by default
    3.11 +I:index.cgi
    3.12 +# MIME type
    3.13 +.png:image/png
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/tools/serv.sh	Wed Apr 11 15:57:29 2012 +0200
     4.3 @@ -0,0 +1,12 @@
     4.4 +#!/bin/sh
     4.5 +#
     4.6 +# Serv TinyCM via Busybox HTTPd
     4.7 +#
     4.8 +
     4.9 +port=8084
    4.10 +
    4.11 +echo "Starting server on port: $port"
    4.12 +echo "URL: http://localhost:$port/"
    4.13 +httpd -f -u www:www -p $port -c httpd.conf
    4.14 +
    4.15 +exit 0