[pmwiki-users] Exporting PmWiki page history

Ryan Varick rvarick at gmail.com
Tue Jan 19 23:10:58 CST 2016


Hello,

Sad day! After a decade of using PmWiki, I've mostly migrated my workflow
to Markdown and Git. I wanted to keep my PmWiki repo history, so I created
a cookbook recipe to help me do that:

http://www.pmwiki.org/wiki/Cookbook/PmWikiExport

The recipe itself does two things: 1) Returns the list of pages as a JSON
object by reading the panelist file and 2) returns an individual page's
commit history as a JSON object. A client-side Node script uses these two
calls to capture the history, store it in a SQLite database, and then
"replay" the history in a new Git repository.

There are probably much better ways to do this, but it works for my repo
(about 1,000 pages and 10k commits).

The reason I am writing is because *I could not get $HandleAuth to work
with my recipe*. Since the recipe uses ReadPage and RestorePage directly,
it does not respect security settings.

Is $HandleAuth['export'] = 'admin' not the appropriate way to set a safe
default for my recipe? Am I missing something?

Thanks!

Ryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20160119/65ffe5b3/attachment.html>


More information about the pmwiki-users mailing list