UseModWiki | WikiSuggestions | RecentChanges | Preferences

Reconciling off-line changes

I guess I could find out myself thru experimentation, but probably more experienced users can answer this right away: What needs to be done to merge/reconcile changes to Wiki pages made off-line on a copy (in my case running on a laptop with Indigoperl/Apache?) when returning to the main system? Is it just copying the changed *.db files (provided there have been no parallel changes in the main copy in the mean time) or does this break the "recent changes" and "diff" mechanisms? --DanielHernandez

Copying the .db files will update the current revision of pages, and it includes a cached copy of the most recent minor, major, and author diffs. The "recent changes" data is taken from the "rclog" file. Other old revisions are taken from the "keep" files.

If no changes are made to the main system, you could just copy the .db files, the rclog file, and (optionally) any keep files. If you don't copy the keep files then later diffs might not be accurate (since the older revisions needed for the diffs are stored in the keep files). --CliffordAdams

What about the case where some pages have changed in the off-line copy and other (different) pages have changed in the main system? Will a textual "merge" of the rclog files do it? --DanielHernandez

Merging two versions of the rclog files might not be easy. They need to be in timestamp-order. Fortunately, the timestamp is at the beginning of each line. If you're on a Unix box, the command "cat log1 log2 | sort | uniq > newlog" would probably work to merge the log1 and log2 files into newlog. I don't know an equivalent for Windows, however. --CliffordAdams

As AndyGlew wrote on AdminFeatures I find myself running wiki on servers without root access as well... And often I'd like to merge them with the version on my notebook. And of course as user I am not allowed to overwrite files owned by the web-server. Thus it would be really helpful having a cgi-script on the server doing that job. --DavidAndel

Now I'm moving my wikis on my own server where I am root :-) But nevertheless such s script would be very helpful for those situations. --DavidAndel

Wiki on the Palm of your hand

As I'm increasingly using Wiki for all sorts of information, I've found it quite necessary to have that information on my Palm as well. I've been successful in using [sitescooper] to "scoop" the whole Wiki to an iSilo file which contains also all links and occupies very little space on my Palm. Just for the records here are the command-line and site-file I use to avoid having redundant information when following administrative links:

perl sitescooper.pl -refresh -site sites\utweb_wiki.site -misilo


URL: http://machine/cgi-bin/wiki.pl?UtWeb
Name: UT-Web Wiki
Description: Project Repository
Levels: 3
StoryURL: http://machine/cgi-bin/wiki\.pl\?.*
StorySkipURL: http://machine/cgi-bin/wiki\.pl\?(action=.*|search=.*|HomePage)
ContentsURL: http://machine/cgi-bin/wiki\.pl\?.*
ContentsSkipURL: http://machine/cgi-bin/wiki\.pl\?(action=.*|search=.*|HomePage)
IssueURL: http://machine/cgi-bin/wiki\.pl\?.*
IssueSkipURL: http://machine/cgi-bin/wiki\.pl\?(action=.*|search=.*|HomePage)


I'm really interested in developing a Palm App that would allow me to sync my UseMod wiki (which runs off-line) on my laptop with a version on my Palm Tungsten C. I have been thinking about using the GPL'ed code from the Hypernote app for the palm, which already supports basic wiki features, and seeing if I could find a way to sync data between the two.

I see 2 ways of doing this. Either I keep the data-files on my SD Card, and sync with rsync to and from my card-reader. Or I figure out some way to sync versions of pages on-line based on Recent Changes or something like that. Perhaps just submitting any changed page as a new revision would be good enough, and just ignores the fact that there may be revisions on both sides. --TomasKrag?

Offline editing

How about the ability to write/edit a wiki site on my laptop while not connected to the network? I could install a web server and UseModWiki on my laptop, and write lots of stuff. Then, when I get to work, I hit the "synchronize wiki" button, which uploads my changes to the main wiki and downloads anything added/changed since I last synchronized.

Just an idea: mailto:grantt@nortelnetworks.com

I like this a lot. Another option, if full sychronization is not feasible, would be an import feature that reads a text file, picks up page title markers, creates (or revises) the page by inserting following text into the wiki page. -- JerryMuelver

This is pretty much what I'm wondering right now, too. Last summer, I went to the [World Future Society] annual conference and exposed people to the concept of Wiki, but so far haven't been that successful in getting them to play with it. However, I've been asked this year to teach a small workshop and to show people how to use it (like, 5 minutes of editing rules, I figure) then actually use it during the day's discussions rather than writing lots of notes on whiteboards and papers, then typing them all in later.

Rather than trying to secure web access on unknown networks at the conference, I figured I could bring a Linux laptop running Apache and UseModWiki, and even set up DHCP so others could access the wiki on my server with their notebooks. Bringing along a copy of [my own wiki] would make sense, and being able to merge the changes from the conference back into the online wiki would be the end goal. So I'm wondering if I can use something simple like 'rsync' to synchronize my offline copy with the live one (probably, since my wiki isn't the most active in the world, and if I'm not typing into it, it's 90% likely that no one is. ;^) ), or if I have to resort to something more robust, like having the entire wiki tree checked into CVS so I can reliably merge the diffs in the case of concurrent edits in both places.

Ideas or opinions on this one? Is rsync up to the task? Anyone familiar with rsync's 'remote-update protocol'? I use rsync daily in scripts, but it's usually one-way, making backup copies of directories that change. I'm not sure how (if!) it would handle concurrent changes made in two places to the same file, such as the rclog or existing pages.

The conference is in a little less than 3 weeks, so I've got a bit of time to figure this out, but not loads of it. -- PatrickSalsbury (July-01-02)

I've written an offline, standalone wiki useable as a PIM, textbase manager, project prototyper, help system, documentation tool, ebook writer -- you name it. Just a couiple more features (I added a search function last night), and it'll be ready to release. Self-produced docs (written in wiki-mode, exported by the system to a set of HTML pages) are at http://hytext.com/iwiki/ with beta dowload at http://hytext.com/cgi-bin/htm.pl?IWiki_Site_Writer (which is a UseMod wiki in dual mode, view only). -- JerryMuelver

I'd love to see UseModWiki to gain the ability to syndicate itself, and to receive syndications. I'm thinking, for example, that if UseModWiki implemented the IceProtocol, which is pretty simple, then there would be a reliable, controlled distribution mechanism that could be used to synch a Wiki up with a version on a PDA, a laptop, or a site.

One tricky aspect when exchanging data is in resolving collisions. The simple solution is "the last publish wins". As long as synchronization is fairly frequent, this works well in practice in most document management. That is, since individual Wiki pages are edited relatively infrequently, there wouldn't often be collisions.

The nice thing is that this would solve not only the 'offline' problem, but also replication between Wiki's, which has other cool uses.

I am looking at implementing ICE syndication/subscription for UseModWiki. Since it's one simple Perl script, I think it'll be pretty simple. Knock on wood.

- Laird Popkin

That's one place where a code management system like CVS excels. It checks for data collisions down to a granularity of a line or two of code, rather than an entire document. So when you get someone editing the top of a file/page/doc, and someone else editing the middle, and a third editing the bottom, all three are merged seamlessly and without conflict. Only when people edit overlapping or the same lines does it squawk and require the last person to manually check their work.

I've checked my wiki into CVS and am going to experiment with making changes to the offline copy. I think I'm going to have to jockey the permissions a bit when I'm checking in/out, as Wiki seems to want to be owned/run by 'nobody' for user and group, and I suspect that 'nobody' might not be able to access the CVS server. We'll see... I'll try to post my findings in a few weeks when I return from the east coast. --PatrickSalsbury

UseModWiki | WikiSuggestions | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited May 22, 2009 4:28 pm by GunnarH (diff)