During the past days, I have been working on an extension to integrate my stl2png script in mediawiki. I found very little documentation and comments in their source code. It looks like the only documentation they have is how end-users should use it, but nothing for developers. Every function has about two lines of documentation on what it actually does. A little longer description would have been useful. Because of the lack of documentation, it was hard to use their classes and I had to find some workarounds and hacks to make my code work, as an extension is not allowed to change their files. I just made my script change the $_FILES and $_POST arrays. I know that's not smart to do, but its the only way I managed to tell the wiki it should use an other file as source, and not the uploaded zip.
The extension works, but is still in alpha version. The form for uploading the zip still needs work, and the newly uploaded files don't receive a description for some unknown reason. I have temporarily placed a demo of the extension on my pc at home. You can find it on http://tman.webhop.net:8765/wiki. This won't stay there forever and my pc isn't always online, so its very possible that it won't be accessible. Hopefully it will be used on the reprap-wiki by then. The source code can be found on http://www.reprap.org/wiki/File:Upload3D.zip
I'll stop working on this for a while now. With the demo online, it should give people a clear idea of what is possible with mediawiki. Even with the bad documentation, I still managed to make this in a few days. I hope they won't exchange the wiki for an other type of documentation-system. There is a reason that wikipedia is so big, so it would be stupid to change to an other system if you ask me.
No comments:
Post a Comment