Hi folks,
I'm using a wiki for writing (preparing) articles and several similar stuff. To make it easier, I'm currently writing an wiki-syntax parser for my Website-Kit, so it can directly read wiki articles (otherwise I would have to rewrite it to some XML schema).
But my article schema supports a little bit more than just text and headlines, i.e. outline, title, ext.linklists, etc.
So I'm planning to extend the common wiki syntax by some additional elements, i.e. some block/section tags (as used by some template engines). An extendet wiki article could probably look like:
{--ATTR--} Language: de Translation-en: foo
{--TITLE--} Article Title
{--OUTLINE--} This is the article outline
{--TEXT--} ...
The traditional wiki syntax would in fact be a subset of the new (extendet) syntax. We could now store also some metadata, i.e. changelog, editor-flags (i.e. for non-public areas), etc.
Any comments ?
Enrico Weigelt wrote:
I'm using a wiki for writing (preparing) articles and several similar stuff. To make it easier, I'm currently writing an wiki-syntax parser for my Website-Kit, so it can directly read wiki articles (otherwise I would have to rewrite it to some XML schema).
This already exists: perl http://search.cpan.org/~diberri/HTML-WikiConverter-0.16/
php http://phpwiki.sourceforge.net/phpwiki/HtmlParser (for the phpwiki dialect, for parsing the mediawiki dialect just apply the perl rules)
--- Reini Urban rurban@x-ray.at wrote:
Enrico Weigelt wrote:
I'm using a wiki for writing (preparing) articles and several similar stuff. To make it easier, I'm currently writing an wiki-syntax parser for my Website-Kit, so it can directly read wiki articles (otherwise I would have to rewrite it to some XML schema).
This already exists: perl http://search.cpan.org/~diberri/HTML-WikiConverter-0.16/
HTML::WikiConverter doesn't fit the bill. It's an html->wiki converter, i.e. it parses the HTML source into a tree, then outputs its in equivalent wiki markup. It doesn't do wiki syntax parsing.
-- David Iberri (the module's author)
David Iberri wrote:
--- Reini Urban rurban@x-ray.at wrote:
Enrico Weigelt wrote:
I'm using a wiki for writing (preparing) articles and several similar stuff. To make it easier, I'm currently writing an wiki-syntax parser for my Website-Kit, so it can directly read wiki articles (otherwise I would have to rewrite it to some XML schema).
This already exists: perl http://search.cpan.org/~diberri/HTML-WikiConverter-0.16/
HTML::WikiConverter doesn't fit the bill. It's an html->wiki converter, i.e. it parses the HTML source into a tree, then outputs its in equivalent wiki markup. It doesn't do wiki syntax parsing.
-- David Iberri (the module's author)
oops, read it too quick. sorry.
At least some dozen wiki syntax parsers exist. But I didn't see a real wiki-syntax parser yet. Just a loop with some kind of magic order of special regex. Please lets call this transformation, not parsing.
Enrico Weigelt wrote:
So I'm planning to extend the common wiki syntax by some additional elements, i.e. some block/section tags (as used by some template engines).
It's worth noting that there isn't really such a thing as "the common wiki syntax" - the variant used by the MediaWiki software has some things in common with the original WikiWiki (via its ancestry as a modified UseMod script), but has gradually evolved to more closely fit the needs of the project(s): magic language links, 'built-in' LaTeX, tables, images, etc. Other wiki engines have similarly evolved to suit their own circumstances - I came upon one wiki devoted to the game of Go, which unsurprisingly has quite elegant syntax for describing Go boards and games, which are then rendered graphically. And some have chosen a completely different "style" for their syntax - using *bold* instead of '''bold''' for instance.
You might want to read around on some of the existing ideas related to this; some of the pages on MeatBall might be a good starting point, such as: http://www.usemod.com/cgi-bin/mb.pl?WikiSyntax http://www.usemod.com/cgi-bin/mb.pl?WikiMarkupStandard
The traditional wiki syntax would in fact be a subset of the new (extendet) syntax. We could now store also some metadata, i.e. changelog, editor-flags (i.e. for non-public areas), etc.
I think it's probably better to think of this not so much as an "extension" to the "traditional" syntax (which essentially doesn't exist), but rather as another syntax that shares similarities with that of MediaWiki (if that is the software you choose to integrate it with / base it on). In other words, go forward and implement a solution to your own needs, and if as a result you produce something that can be 'transparently' included in MediaWiki (without need to drastically reformat existing content, for instance) then all the better.
Happy hacking!
Hi Enrico,
On Tue, Jul 06, 2004 at 01:45:17PM +0000, Enrico Weigelt wrote:
But my article schema supports a little bit more than just text and headlines, i.e. outline, title, ext.linklists, etc.
So I'm planning to extend the common wiki syntax by some additional elements, i.e. some block/section tags (as used by some template engines). An extendet wiki article could probably look like:
{--ATTR--} Language: de Translation-en: foo
{--TITLE--} Article Title
{--OUTLINE--} This is the article outline
{--TEXT--}
A couple of years ago I extended the UseMod wiki syntax and wrote a perl script that will convert wiki pages into LaTeX, DocBook and XHTML. We even used it to create the proceedings of the Hispalinux 2002 conference.
You can find it in Debian (package parsewiki) and in: http://villate.org/parsewiki/
(sorry for the name Reini. You're right this is a converter and not a parser)
The solution I used at that time was:
{title: Some Title} {author: Authors list} {date: Publication date} {organization:...} {address:...} {abstract: any of these meta-fields\ can take several lines.} etc.
Later on, I went on to extend the system using Python, and I borrowed the PostScript convention of placing the meta-information inside special comments that start with two %% instead of just one. I used something such as: ##author:... ##date:...
I just could not continue to developed a more complete system on my own, and I did not succeed in attracting other Python developers, so I have decided to join some strong wiki project to try to implement the features that I miss in a wiki.
That's how I ended up in this list. I just discovered and install Media Wiki today and I'm anxious to help with anything. Any suggestions? Perhaps I can start by adapting my old perl conversion script. I had to do some improvements to the UseMod perl code which might also find some use here.
Cheers, Jaime
wikitech-l@lists.wikimedia.org