← Back to team overview

zim-wiki team mailing list archive

Re: Automatic update of content provided by a running web server

 

On Tue, Dec 4, 2012 at 5:35 PM, NorfCran <norfcran@xxxxxxxxx> wrote:

> Dear ZIM developers,
> does anybody know, what is required to reflect actual state of notebook
> (including changed pages and files) provided by a web server? I am
> considering to improve and utilize this feature. Thank you for any
> directions, best regards JK
>

Well, out-of-the-box would be to run zim's stand-alone server with "zim
--server". This way the server generates html pages on demand. But depends
on your purpose, may be not robust enough for extended use.

If you want to run within an existing web server you can run the server
component as a cgi or fastcgi script. The server component in zim uses
python wsgi framework, and there are standard cgi and fastcgi frontends for
that module. There is in fact an example cgi-bin script in the source
folder, but I haven;t tested that one in a long time, may need some fixes.

For more heavy use you would probably want to add page caching to the
script and only generate pages when they actually changed.

Hope this helps,

Jaap

References