[pmwiki-users] Converting PmWiki pages to static html

Pico pmwiki at ben-amotz.com
Tue Sep 5 12:13:43 CDT 2006


Patrick R. Michaud <pmichaud <at> pobox.com> writes:
> On Tue, Sep 05, 2006 at 03:04:32PM +0000, Pico wrote:
[snip]
> > Is there a recipe for converting PmWiki page to static html?  (We are not
> > looking at pdf, at least not now).  
> 
> First, add the HtmlUrls recipe.  In local/config.php:
> 
>     $EnablePathInfo = 1;
>     $FmtP['!\\$ScriptUrl/[^?#\'"\\s<>/]+/[^?#\'"\\s<>]+!'] = '$0.html';
>     $FmtPV['$PageUrl'] = 'PUE("$ScriptUrl/$group/$name.html")';
> 
> This causes all of your pages to automatically receive a '.html' extension.
> 
> Then, use a tool such as wget to download all of the pages for that
> group and fix up the links.  For example:
> 
>     wget -r -k -np -p -l 0 http://example.org/wiki/SomeGroup
[snip]

Thank you, Pm, that was very helpful (and fast!).

FWIW, I just noticed an existing request PITS/00778 for an option to have PmWiki
generate such html files (in the upload directory).  I'll add my vote.

Pico





More information about the pmwiki-users mailing list