Python programs (or other script language) on wiki?

Wolfgang Spraul wolfgang at openmoko.com
Fri Sep 19 14:21:06 CEST 2008


Minh,
ok now you understood me :-)
Your comments are excellent, that's exactly what I meant.

> 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 ?

No, nothing yet. First I wanted to see how people liked the idea. It  
seems you like it, and your pointers are excellent.
Tichy is a bit big. I am thinking about smaller applications. Say less  
then 500 lines of code, at most. Maybe less than 200.
This might go very well with Tichy plugins, or in general the more the  
framework evolves the more high-level calls we can make from a script,  
creating shorter yet still powerful scripts.
These scripts would not be in svn/git/projects at all anymore then,  
doesn't make sense. The wiki would provide revision control.

Thanks for your feedback, I will see whether I can get this started.  
If it's not used we can still shut it down again :-)
Best Regards,
Wolfgang

On Sep 19, 2008, at 8:03 PM, Minh Ha Duong wrote:

> 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