[pmwiki-users] pagelists link= with pages generated externally
Patrick R. Michaud
pmichaud at pobox.com
Tue May 22 14:05:10 CDT 2007
On Tue, May 22, 2007 at 06:09:17PM +0200, Christophe David wrote:
> >One way that we could improve things here would be to provide
> >an avenue whereby an external application could create a plain
> >text file somewhere, and then issue a command to PmWiki telling
> >it to update the page with the contents of the text file.
> >[...]
> >Of course, the tricky part in this is managing the files in the
> >directory.
>
> This would be extremely useful.
>
> At first glance, I would suggest
>
> - to define an "import" directory
> - to create a file .lastimport (like .lastmod)
Oh, .lastimport is an excellent idea. I should've thought of that.
> - to let Pmwiki check every time it runs if .lastimport is
> older than n minutes
It could also check the timestamp of the import directory itself,
to perhaps detect the import more quickly. So then we'd have both,
a check every n minutes, and a check whenever the import/ directory
obviously changed somehow.
We'd probably need to do the actual conversion as a background
task after handing the visitor's request, otherwise some unlucky
visitor could have a long wait as PmWiki performs the import
(especially if there are a lot of files, or if any of them
are particularly long).
> - to take all files in the import directory that have a name that
> meets the PmWiki naming conventions and to use their content as if a
> user had typed it in the PmWiki edit form
What authorship should it use in this case? I guess this would
need to be set as a configuration variable.
> - then the imported file could be renamed (,imported012345678 for example).
If we remove the restriction of renaming the file, then the
import/ directory doesn't need to be writable at all. Or
perhaps we leave renaming of import files as a configuration
option.
Thanks!
Pm
More information about the pmwiki-users
mailing list