Hi everybody!
I would like some help with a extension module to php. Since I'm not a c programing guy, I have basicly given up. However, I have a little hope that someone here on this mailling list can help me...!
You can get the (bad - you don't have to tell me that!) code at http://www.fredan.org/pecl_wiki2html.tar.gz
What the module do is to translate wiki syntax to html syntax. Sounds simple, eh? Well not for me! ;-)
The original source that I found somewhere on the net (can't remember where), is included in the archive.
There is also an readme file to read for you!
If there is anyone who's willing to release this as an real pecl package, please go ahead and do so.
This message was original posted by me on the pecl mailling list at this location http://news.php.net/php.pecl.dev/5103
What the module do is to translate wiki syntax to html syntax. Sounds simple, eh? Well not for me! ;-)
It's not simple for anyone. Take a look at Parser.php and related files - it's a very complicated thing to do. Why are you trying to, anyway? Just use the built in parser.
Hi everybody!
In the file that I've told you, there is allready an wiki2html parser in C source( the file wiki2html.tar.gz). Just compile it and run it! This is a standalone program, which is only takeing one file at the time. So my effort is to make this to an php module to run this parseing much much faster.
So far so good, right?
Since my knowledge of programming in C is more or less 0, I'm asking here if there is someone who can look at what I've allreday done and make it work! Right now it basicly just Segmentation Fault every now and then.
What I'm really using this for is a secret a the moment, but I will tell you when I have this module for php! :-) (And it is a benefit for the hole Wikipedia projects..)
What the module do is to translate wiki syntax to html syntax. Sounds simple, eh? Well not for me! ;-)
It's not simple for anyone. Take a look at Parser.php and related files - it's a very complicated thing to do. Why are you trying to, anyway? Just use the built in parser.
In the file that I've told you, there is allready an wiki2html parser in C source( the file wiki2html.tar.gz). Just compile it and run it! This is a standalone program, which is only takeing one file at the time. So my effort is to make this to an php module to run this parseing much much faster.
How accurately does it replicate the standard parser? The parser has some very odd behaviour in corner cases, much of which we want to keep for backwards compatibility. If it replicates it almost completely, then it would be really useful if you could remember where you found it...
fredrik danerklint wrote:
Hi everybody!
I would like some help with a extension module to php. Since I'm not a c programing guy, I have basicly given up. However, I have a little hope that someone here on this mailling list can help me...!
You can get the (bad - you don't have to tell me that!) code at http://www.fredan.org/pecl_wiki2html.tar.gz
What the module do is to translate wiki syntax to html syntax. Sounds simple, eh? Well not for me! ;-)
Not for us, either. There's no (easy) way to convert mediawiki's parser to C. It's too messy. The only way to do something similar would be doing by parsing a subset of wikitext. You may be interested in the discussions at wikitext-l to create a grammar for wikitext. It has also been discussed several times on this list.
On 04/02/2008, fredrik danerklint fredan-wiki@fredan.org wrote:
. . . The original source that I found somewhere on the net (can't remember where), is included in the archive.
Perhaps this was it? http://tools.wikimedia.de/~merphant/wiki2html/
On 04/02/2008, Martin Panter vadmium@gmail.com wrote:
On 04/02/2008, fredrik danerklint fredan-wiki@fredan.org wrote:
. . . The original source that I found somewhere on the net (can't remember where), is included in the archive.
Perhaps this was it? http://tools.wikimedia.de/~merphant/wiki2html/
In which case, there are significant parts of the syntax missing: tables and transclusion being the two that immediately jump out at me. I don't think that code was ever intended to replace the php parser .
The original source that I found somewhere on the net (can't remember where), is included in the archive.
Perhaps this was it? http://tools.wikimedia.de/~merphant/wiki2html/
Yes! This is the one!
wikitech-l@lists.wikimedia.org