[pmwiki-users] pagelists link= with pages generated externally
Patrick R. Michaud
pmichaud at pobox.com
Sun May 27 09:34:13 CDT 2007
On Sun, May 27, 2007 at 08:28:32AM +0200, Christophe David wrote:
> >> By the way, there is one more action that would ideally complement the
> >> "import"... ;-) Guess what ? action=export. This would take the
> >> content of the page and copy it as text in an "export" directory.
> >If you consider using action=source for that, the feature is already
> >available... ;)
>
> That's true, except it does not save to a file.
>
> action=export could thus execute the same code as action=source + save
> to the export directory with the same name as the original page.
This assumes a webserver-writable directory somewhere. Plus, do
you want ?action=export to export all pages on a site to the
directory, or just the current page?
In many ways this sounds more like something that ought to be
done with (:pagelist:), so that it's easy to select the pages
to export:
(:pagelist list=normal export=yes :)
This is also one of those cases where it might simply be better
to provide a command-line utility to extract the text directly
from the page files (which isn't at all hard to do).
> One more application to this: text configuration files for
> applications (.ini , xml, etc.) could be stored in wiki pages to allow
> easy maintenance, versioning, roll-back, etc., and simply exported to
> a flat file for their respective applicaton...
?action=source would seem to work pretty well for this.
A simple answer might be to simply extend ?action=source so that
it not only returns a copy of the source to the browser, but
optionally exports a copy of the text to an export directory
somewhere.
Pm
More information about the pmwiki-users
mailing list