Re: Simple markup language?

2008-01-21 Thread Derek Anderson
Jeff Anderson wrote: > And you just need minimal functionality, > You could probable write up a small hack to do it with some regular > expressions. You can find things that strip html, and then you could to > the simple markup fairly easily after that. It shouldn't take too long > to write

Re: Simple markup language?

2008-01-21 Thread Derek Anderson
i use beautifulsoup [http://www.crummy.com/software/BeautifulSoup/]. run it on your input, iterate through all tags, calling extract if they're not in your allowed set. then print it back out as a string. derek Rob Hudson wrote: > Hi, > > I'm looking for something along the lines of

Simple markup language?

2008-01-21 Thread Rob Hudson
Hi, I'm looking for something along the lines of Textile or Markdown, but with very minimal features. Does anyone know of other projects that might fit these requirements? * Strip all HTML * Only allow for simple markup (bold, italics, headers, lists, URLs or auto-linking URLs) * Do not allow

Re: Simple markup language?

2008-01-21 Thread Oscar Carlsson
Another alternative could be using BeautifulSoup to find all tags in the data and replace all non-approved tags with nothing. Oscar On Mon, Jan 21, 2008 at 04:03:54PM -0700, Jeff Anderson wrote: > If you've already looked at the regular bunch: textile, markdown, rst, > etc... > And you just

Re: Simple markup language?

2008-01-21 Thread Rob Hudson
Thanks for the reply... I have considered rolling my own along the lines of {{ mytext| striptags|simple_markup }} but thought I'd ask before I went through the effort. In Python there's usually a library for everything. :) I've also looked at the optional arguments to Markdown and Textile and

Re: Simple markup language?

2008-01-21 Thread Jeff Anderson
If you've already looked at the regular bunch: textile, markdown, rst, etc... And you just need minimal functionality, You could probable write up a small hack to do it with some regular expressions. You can find things that strip html, and then you could to the simple markup fairly easily