Python programs (or other script language) on wiki?
Minh Ha Duong
haduong at centre-cired.fr
Fri Sep 19 14:03:56 CEST 2008
Le vendredi 19 septembre 2008, Wolfgang Spraul a écrit :
> Minh,
> not sure we are talking about the same thing.
> I was not talking about an offline version of the wiki, all or partial.
> I was talking about putting Python scripts onto a wiki page. The
> _ACTUAL_ program. Not the documentation or so. The _LIVE_ script code.
> Then tag the page with a special tag or put it in a special category.
> Then, a server process would pick up all those pages and create .opk
> files for each that would show up in the repository.
> You could then install those Python programs through the installer.
> Like using the wiki for programming.
First, sorry for misunderstanding. I was prejudiced.
What you say looks more like having a Template:Python
used like this:
{{Python|scriptname|version=0.1|
#!/usr/bin/python
...
... The script goes there
...
}}
With Template:Python that
prints the script nicely (ie wraps it up in a <source lang=python></source> )
and
automatically adds a message saying how to install it at the bottom of the
box.
Then your spider browses the all pages that use this template,
extract the scripts and package them.
Comments:
1/ Worth trying at least because I never seen anything like this. Litterate
programming + collaborative development all in one.
2/ Python is good, bash is good too.
3/ There are syntax highlighting extensions for wikimedia. Not worth
installing yet I think
4/ Surely one could hack a PHP extension to push the script into the
repository when modified instead of pulling it from a server process.
Probable overkill, better to keep the wiki and the repository interface only
through the HTML.
5/ Dependencies: packages are meant to install them. Keep that for version
2.0, maybe it's not a problem at all.
6/ I am not sure all that installing a package is simpler than cut-and-paste
in a newly created .py file.
7/ Do you have concrete examples pages where that would be useful ? Do you
want to move lots of components there ? Would you move Tichy, for example ?
And what happens when the script goes into svn / git /
projects.openmoko.org ?
Minh
--
Minh HA DUONG, Chargé de Recherche, CNRS
CIRED, Centre International de Recherches sur l'Environnement et le
Développement
http://minh.haduong.com
More information about the documentation
mailing list