socialplanning/opencore — Issue #4: Wiki import
Author: ejucovy
Created: 2012-02-11 16:01:14+00:00
State: open
Labels: Import/Export

We need to support reimport of wikis from a project export.

The structure of the project export means that data will be in two places.

The primary data will all live in the `wiki_history/` subdirectory of the export. This is a BZR repository with full wiki history, preserving original commit dates, messages and authors. File contents are preserved in their "unbaked" wiki formats.

Meanwhile, file attachments will live in subdirectories of the `pages/` subdirectory of the export. Historical revisions of file attachments are not preserved (by design). Current versions of attachments are organized by the pages that they are attached to. So attachments on the "project-home" page live in the `pages/project-home/` subdirectory of the export.

Import can therefore be done in two phases:

1. Complete content import from BZR history from first revision to last
1. File attachment import from `pages` subdirectory, in any order

The `pages/` subdirectory also contains current wiki page contents, transformed into "baked" HTML with headers and necessary CSS links, so that the export's `pages/` subdirectory is suitable for standalone drop-in publication to a web server. These should be discarded during import: they are lossy, and redundant with the lossless BZR history.