Not logged in. · Lost password · Register
Forum: General Help and Support General Stuff RSS
Reconstructing attic meta pages
Wiki migration necessitates reconstructing history--how to do?
Avatar
castillar #1
Member since Mar 2019 · 3 posts · Location: Research Triangle Park, NC
Group memberships: Members
Show profile · Link to this post
Subject: Reconstructing attic meta pages
We're in the process of migrating a large, long-lived wiki from MoinMoin to Dokuwiki. After some massaging, I got a publicly available converter script to convert the pages from one to the other, and it faithfully rendered the historical page copies into the attic, along with constructing a [page].meta file for each one. Everything is loaded into Dokuwiki and looks good, except for the 'Old Revisions' link for each page, which only shows the current version.

The problem is that in order for the 'revisions' link for a page to show the list of historical pages, it needs a [page].changes file created under meta/. Is there a way to reconstruct those .changes pages based on the .meta file and the pages in the attic?
Avatar
turnermm (Moderator) #2
Member since Oct 2009 · 4711 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
You would need a script which uses the addLogEntry function, which is where the changes files are made and updated.  The attic filenames start with the timestamp dating the attic version of the page.  That would be the timestamp required for addLogEntry.  So, it would be possible to go through the attic and recreate at least the stub of a change.log for each wiki page that would probably work for retrieving revisions.  Look at the header to addLogEntry for more details. You will find it in inc/changelog.php.

Attached is a sample extracted from a change.log
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
The author has attached one file to this post:
change-log.txt 656 Bytes
You have no permission to open this file.
This post was edited 2 times, last on 2019-03-28, 22:41 by turnermm.
Avatar
castillar #3
Member since Mar 2019 · 3 posts · Location: Research Triangle Park, NC
Group memberships: Members
Show profile · Link to this post
Awesome, thanks! That's a great starting point. I'll take a look at those functions and see if I can cobble something together.
Avatar
andi (Administrator) #4
User title: splitbrain
Member since May 2006 · 3485 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
The syntax of the change files is trivial. One line per change, fields separated by tabs. Important is the timestamp column which has to match the timestamp of the old revision files in the attic folder. More info here: https://www.dokuwiki.org/devel:changelog
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
Avatar
turnermm (Moderator) #5
Member since Oct 2009 · 4711 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
So, to recapitulate?

 1. create the individual .changes files
 2. run one of the two scripts in https://www.dokuwiki.org/devel:changelog
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
castillar #6
Member since Mar 2019 · 3 posts · Location: Research Triangle Park, NC
Group memberships: Members
Show profile · Link to this post
Perfect! Thanks to both of you. The team confirmed to me today that since we have the old wiki archive, they're less concerned with establishing *who* made a change, so I can quick-script reconstructing the .changes files from the attic files I have, and just use a placeholder for the change author field.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-10-17, 10:54:47 (UTC +02:00)