From: Yuri T. <qar...@gm...> - 2006-08-25 22:46:09
|
Waylan, Thanks. There is actually already a link on the python markdown site (see on the left under "Extensions"), though it points to your earlier page. I will change the link the next time I am updating the page. I wonder, however, whether it is a good idea to hard-code WIKI_URL to '/...' inside a function, where it will be hard to access. This way, if you are using a single script to manage several wikis (example.com/wiki1/, example.com/wikie2) you are out of luck, right? Also, I really want to move to a "centralized" for managing extensions, so that someone who say runs a website that allows users to create their own wikis could give the users an option to enable certain extensions and to set certain parameters for them. To enable that, all extensions must be configurable from outside. The best, perhaps, would be to have suggest that all extensions use a dictionary stored in self.config to store configurations. E.g., in your case you would have self.config = {'LINK_URL_TEMPLATE' = '/%s/'). Those parameters can then be accessed from outside Markdown: md.extensions['wikilinks'].config['LINK_URL_TEMPLATE'] = "/~%s/wiki/" % username This would allow, for instance, to control set though parameters through a web interface or potentially through the command line interface with something like: markdown.py -xwikilinks/LINK_URL_TEMPLATE="/~yuri/wiki/" input.txt > output.txt - yuri On 8/23/06, Waylan Limberg <wa...@gm...> wrote: > For those interested, I have released an improved version of my > WikiLink extention that makes using additional extentions with it much > easier. I haven't adapted it to Yuri's latest work in that regard yet, > but its much better than the first time around. > > Annoucement: > http://achinghead.com/archives/72/markdown-wikilinks-release-02/ > > Code: > http://code.limberg.name/svn/projects/py-markdown-ext/wikilinks/trunk/wikimarkdown.py > > Project Page: > http://achinghead.com/markdown-wikilinks/ > > Yuri, you may want to link to my project page rather than my initial > blog post on your site. Although, if you do, I may no longer have > Google's *third* result for "WikiLink" :-D It was fun while it lasted! > > -- > ---- > Waylan Limberg > wa...@gm... > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Python-markdown-discuss mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss > -- http://www.freewisdom.org/ |