[pmwiki-users] Strip markup to generate plain text
Jan Erik Moström
lists at mostrom.pp.se
Wed Feb 13 04:10:26 CST 2008
Peter & Melodye Bowers <pbowers at pobox.com> 08-02-13 10.43
>>Perhaps a stupid question but is there some way to generate
>>plain text from pmwiki content source?
>
>I wasn't sure what you meant by "markdown" -- do you mean "plain text"
>*after* markup has been applied? Or are you looking for the source text
>with the markup still visible? Or (as your subject might indicate) are you
>looking for the text with the markup simply stripped out?
Sorry for being so unclear. Markdown in this case is text
formatting system that is quite popular <http://daringfireball.net/projects/markdown/syntax>.
But what I'm looking for is something that will allow me to
strip PmWiki syntax from the stuff I've written and generate
plain text. Even better would be a something that generated
slightly formatted text.
Example:
--------------------------------------------------------
This is just [[http://www.example.com/|example]] just
to show you ''what'' I want @@to do@@. Now for a list:
* This is short list just to
show you how different things
* looks like. It's probably
easier to show with an example
like this
And now for a citation
-> Something interesting
more text
-------------------------------------------------------
If it was possible for PmWiki to generate this, I would
be satisfied
-------------------------------------------------------
This is just example just
to show you what I want to do. Now for a list:
* This is short list just to
show you how different things
* looks like. It's probably
easier to show with an example
like this
And now for a citation
Something interesting
more text
-------------------------------------------------------
I would be very pleased if PmWiki could generate formatted
plain text like this
-------------------------------------------------------
This is just example(1) just to show you
what I want to do. Now for a list:
* This is short list just to show
you how different things
* looks like. It's probably easier
to show with an example like this
And now for a citation
Something interesting
more text
(1) <http://www.example.com>
-------------------------------------------------------
>If you are looking for plain text with markup stripped out then you may want
>to look into Hans's ExtractText with the markup=snip option. You could
>"search" for "." (i.e., return every line) and specify markup=snip so that
>you got markup simply deleted.
Thanks, I'll take a look at this and the other recipes you mention.
I could of course write a short python/perl script to do the
translation but it would be so much nicer if I could do if from
PmWiki directly.
jem
--
Jan Erik Moström, www.mostrom.pp.se
More information about the pmwiki-users
mailing list