[opensuse-wiki] wiki -> README.SuSE?
Hi, Is there a way to convert a wiki page into a format suitable for offline reading or further processing (such as plain text or e.g. asciidoc)? Background of that question is that I think it would make sense for some packages to have the content of e.g. README.SuSE in the wiki. I'd still want to package an offline version that actually matches the package at that point in time though. cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.de/ SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-wiki+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-wiki+help@opensuse.org
Hello, on Donnerstag, 27. März 2008, Ludwig Nussel wrote:
Is there a way to convert a wiki page into a format suitable for offline reading or further processing (such as plain text or e.g. asciidoc)? Background of that question is that I think it would make sense for some packages to have the content of e.g. README.SuSE in the wiki. I'd still want to package an offline version that actually matches the package at that point in time though.
What about wget'ing the raw version of the page? http://en.opensuse.org/index.php?title=Project_Overview&action=raw Be warned that the raw version does not contain the page title ("Project Overview" in my example). For a more general solution and more complex pages, lynx -dump (or w3m -dump, please check what looks better) with some sed magic to cut the menu etc. off would also be an idea. lynx -dump -nolist http://en.opensuse.org/Project_Overview | sed ' 1,/^ *\* History$/d ; /^ *The content on this and other wiki/,/| Feedback$/d ; $d ; ' w3m -dump http://en.opensuse.org/Project_Overview | sed ' 1,/^ *\* History$/d ; /^ *The content on this and other wiki/,/| Feedback$/d ; $d ; ' You might want to do more finetuning on the sed expressions (and publish the script afterwards ;-) ), but you should get the point. Please keep the URL and the modification date in the generated file in case someone wants to see the latest version. Regards, Christian Boltz -- Sorry, mit java kenne ich mich gar nicht aus, das ist mir einfach zu unportabel. [Thorsten Kukuk in suse-linux] --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-wiki+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-wiki+help@opensuse.org
Christian Boltz wrote:
on Donnerstag, 27. März 2008, Ludwig Nussel wrote:
Is there a way to convert a wiki page into a format suitable for offline reading or further processing (such as plain text or e.g. asciidoc)? Background of that question is that I think it would make sense for some packages to have the content of e.g. README.SuSE in the wiki. I'd still want to package an offline version that actually matches the package at that point in time though.
What about wget'ing the raw version of the page?
http://en.opensuse.org/index.php?title=Project_Overview&action=raw
Ah, nice. I didn't even know that there was such an easy way to retrieve the page source. If the page is kept sufficiently simple it could easily be converted to html by perl-Text-MediawikiFormat. Thanks for the hint!
For a more general solution and more complex pages, lynx -dump (or w3m -dump, please check what looks better) with some sed magic to cut the menu etc. off would also be an idea.
I thought of that already but TBH that's a pretty retarded way :-) cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.de/ SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-wiki+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-wiki+help@opensuse.org
participants (2)
-
Christian Boltz
-
Ludwig Nussel