splitbrain / dokuwiki-plugin-sync

Sync DokuWiki namespaces with a remote wiki on request
http://www.dokuwiki.org/plugin:sync
17 stars 17 forks source link

Allow different remote and local namespaces #12

Open dotdotlar opened 12 years ago

dotdotlar commented 12 years ago

Presently, my group is managing a set of pages that will be released as a single LibreOffice document. The set of pages goes through initial development, rough draft, releasable draft and final release. We are managing this process by keeping the names of the page the same and varying the namespaces (workingcopy,roughdraft,releaseable,final).

I've found "sync" extremely useful for managing this process, since it easily allows me to review changes and promote changes as they are approved. Not exactly what sync was meant for, but so be it.

In order to make this work, I needed to add a "Local Namespace" field to the profile so that the remote namespace and the local namespaces could be different. I've updated admin.php to allow this and am turning this over for consideration in inclusion in the normal sync baseline. Will attempt to attach the modified admin.php to this ticket.

dotdotlar commented 12 years ago

Am not a github'ber, so not sure best how to provide modified source code (if wanted). Feel free to ping me and I'll provide updated code as requested.

splitbrain commented 12 years ago

The problem with different namespaces on both side is that links and image references might break. But I'd like to see you code. Please fork my repository, apply your changes to the fork and send a pull request.

dotdotlar commented 12 years ago

Excellent point! For my needs it's not a major concern because I'm mostly using the sync to pull in edits that reviewers are making. The namespace:page references in the document start out correct and stay correct (and we aren't using page inclusion or anything like that). But I had not considered internal references in my solution.

I will fork and provide the code. I won't say it's pretty, but it does do the job. My github-fu is weak, so it may take me a little time to get the code out there.

dotdotlar commented 12 years ago

Another possibility would be to have a plugin that strictly does merging between local namespaces and uses a similar interface to sync. That would work too.