Sycamore has a command-line export function. It's in Sycamore/. Just run python export.py.
This is a per-wiki XML dump. This is different from a database backup. The wiki export should contain all material needed to reconstruct the wiki in its entirety.
Initial format
Here's the initial export format (Sycamore 0.1d)
Export a wiki. Note that some sections will appear in the export only if you have permission. The security section, for instance, will appear only if you are an administrator of the wiki in question. Export format looks something like: <sycamore version="0.1d"> <wiki name="shortname" id="wiki_id" domain="domain name" is_disabled="True / False" sitename="long site name"> <settings key="value" ../> <pages> <page name="page name" propercased_name="Page Name"> <text>current page text</text> <version propercased_name="Page Name!" edit_time="unix tm" user_edited="username" edit_type="an enum edit type str" comment="edit comment" user_ip="ip of edit"> <text>this version page text</text> </version> </page> </pages> <files> <file name="filename" attached_to_pagename="page name"> uploaded_time="unix tm" uploaded_by="username" uploaded_by_ip="ip addr" attached_to_pagename_propercased="Page Name" deleted="False">base64 encoded file content</file> <file name="filename" attached_to_pagename="page name"> uploaded_time="unix tm" uploaded_by="username" uploaded_by_ip="ip addr" deleted_time="unix tm" deleted_by="username" deleted_by_ip="ip addr" attached_to_pagename_propercased="Page Name" deleted="True">base 64 encoded file content</file> ... </files> <events> <event event_time="unix tm" posted_by="username" location="text here" name="name of event" posted_by_ip="ip addr" posted_time="unix tm">event text</event> </events> <security> <acls> <acl pagename="page name" groupname="group name" may_read="True / False" may_edit="True / False" may_delete="True / False" may_admin="True / False" /> ... </acls> <groups> <group name="group name"> <defaults may_read="True / False" may_edit="True / False" may_delete="True / False" may_admin="True / False" /> <user="user name"/> <user="user name2"/> <user="ip addr" type="IP"> .. </group> </groups> </security> <map> <current> <point pagename="page name" x="x loc" y="y loc" created_time="unix tm" created_by="user name" created_by_ip="ip addr" pagename_propercased="page Name" address="address string" /> ... </current> <old> <point pagename="page name" x="x loc" y="y loc" created_time="unix tm" created_by="user name" created_by_ip="ip addr" deleted_time="unix tm" deleted_by="username" deleted_by_ip="ip addr" pagename_propercased="page Name" address="address string" /> ... </old> </map> </wiki> </sycamore>
Future
-
Limit to current versions of pages and files only
-
Speed up utility (!!) and make it web-based
Wiki Spot implementation brain dump
-
takes into account page security: user1, user2.
-
user1 and user2 => set of groups they belong to
-
set of groups you're in determines what you can do.
-
where should the dump go? into the DB?
-
dump to file then insert the file into the db..how do we do this without eating gigs of ram? — can't even store objects that large...ok, so no db
-
store something in the db — unique_id, generated_time, file_url
-
general get_file_url()..
-
pulls from a config option for where big files are stored.
-
new config option: machine domain name. can differ from wiki domain. each machine generating exports must have unique domain.
-
we serve up by just sucking from that file on disk — we assume it is locally accessible
-
expire_exports() — rm them.
f(u) = (g1, g2, ..)
but what if i'm in g2 that differs only in editability but not readability? - we can only tell at global level..say for a page:
g1 edit, read g2 read g3 nada => i can edit, read
if i am in a special group, say Events, then my dump is generated special-like...ok, let's just do that.
dumps unique based on groups you're a member