At this point, I'm wondering why don't you use CreoleParser ???
Things like
[[Title]]
works there …
There is a number of reasons, I will try to list them here:
- I think that allowing links inside titles is not a good thing in the kind of wiki that Hatta aims to be – simple documentation. It also complicates a number of features I want to add, like a table of contents.
- I'm not particularly fond of how that module is written. It may be just me, but it seems over-engineered. It also requires genshi, so it would force a templating engine on me. (Sure, I could use two templating engines at the same time, but that doesn't seem too wise.)
- It's an additional dependency. Although I already require werkzeug and mercurial, they are pretty popular and well-known packages. As well as pretty thoroughly debugged and tested. The module you mention is maintained by a single developer, and I'm not even sure if it's still being supported.
- I don't use exact Creole markup, mainly because I think that some parts of it are not good for the kind of wiki I want Hatta to be.
But don't worry, I'm writing Hatta in such a way, as to make it very easy to add new file types with custom display code – so it should be relatively easy to add a file type that is displayed using the parser you mentioned, or any other (restructured text is planned as some point). – Radomir Dopieralski
As far as I know (Only used it on the Bitbucket pages), they also support natively table of content, and numbered list. This would remove an overhead for hatta, i.e. maintaining its own formatting library, delegating the formatting to another library, freeing development cycle for the core functionalities.
As a side note, I'm not sure it's up to the Markup to dictate the way to use the wiki.
The reason I use links in title is to delegate the content to another page. That's not going against the idea of simple documentation I think.
– Ben
It's not my intention to dictate to users the way they should be using wiki (they are free to use whatever software and to use it however they like), however I do have a very specific vision of what kind of tool I want Hatta to be. I'm also interested in exploring a number of features and improvements that require me to have a custom parser: aggressive HTTP caching, outputting the pages on the fly as they are generated (for good responsiveness), keeping track of line numbers in the generated HTML (so that I can use them to scroll the editor to the right place on double click), etc. Some of these features are very hard with unmodified Creole, and simply impossible with the library you are advertising. I'm not particularly interested in developing much additional core functionalities that you mention, so freed development time would probably be devoted to different projects anyways.
As for removing the maintenance cost, it's not that simple. That library is being maintained by a single developer. The last commit was 8 months ago. Instead of delegating maintenance of part of my codebase, it seems that I would have to maintain two codebases, and one of them unfamiliar. I'm not ready for such commitment. – Radomir Dopieralski
You will find in my development branch Three patches to add a parser option to hatta and support two different external libraries. Backward compatibility is completely preserved, without any drawback.
- First one just add a config option and use it to choose a parser.
- Second one just make the WikiParser object more generic by exporting a text2html generator.
- And third one just show how easy it becomes to add support for different Creole engines.
In any case, the old good internal parser is used to extract links from the pages. So support for any other language is not ready yet until those language export a function that extract the links from a text.
Hope you can make something from it.
– Ben
To be honest, I rather planned to subclass the WikiPageWiki, and changing the default by changing the mapping in Wiki.mime_map. This way you can change not only the parser, but also the way the preview is generated, the way the editor behaves, the diff mechanism, etc. For example, if you use textile parser you might want to use the live previes available with javascript for it… At least this is how I prepared Hatta for it – sorry for not documenting it properly. I'm still thinking on how to make the parser more easily subclassable… – Radomir Dopieralski
![[Home]](/+download/logo.png)