[moin-user] Punctuation in titles
PETER BLEACKLEY
pete.bleackley at btinternet.com
Thu Aug 10 15:24:09 EDT 2017
I've renamed directories as to try to match the example you gave, but there are still three that aren't linking correctly. Their names are currently
Christophe(20)Grandsire(2d)Koevoets(2720)TEDx(20)talk
Hildegard(20)of(20)Bingen(27)s(20)Unknown(20)Language(3A20)An(20)Edition(2C20)Translation(20)and(20)Discussion
The(20)Dictionary(20)of(20)Made(2d)Up(20)Languages
----Original message----
>From : paul at boddie.org.uk
Date : 10/08/2017 - 17:00 (BST)
To : pete.bleackley at btinternet.com
Subject : Re: [moin-user] Punctuation in titles
On Thursday 10. August 2017 17.32.41 you wrote:
> I used a bash script that, for each file $NAME in sahriswiki's repository,
> created a directory in data/pages/$NAME, with a subdirectory
> data/pages/$NAME/revisions, copied the file to
> data/pages/$NAME/revisions/00000001, and then created
> data/pages/$NAME/current, containing the string 00000001.
OK. That will work to a reasonable extent, but as you've discovered, some
filenames needing encoding will need to be changed for Moin to be happy with
them.
I have no experience with this "SahrisWiki", so I don't have any insights
about better ways of doing this, but you could do one of the following
things...
The "Proper" But Harder Approach
--------------------------------
Extract each page's content from the original repository, convert it as
appropriate, store it in a directory dedicated to the purpose of migration
using an arbitrary filename (maybe the page name as it is). You'll have
something like this:
wikipages/Someone'sPage
wikipages/AnotherPage
...
Then, define a MOIN_PACKAGE manifest suitable for the page package installer
which lists each page and corresponding filename. Then you'll also have this:
wikipages/MOIN_PACKAGE
Inside it you'll have something like this:
MoinMoinPackage|1
AddRevision|Someone'sPage|Someone'sPage
AddRevision|AnotherPage|AnotherPage
...
As far as I remember, you don't need to encode the page names in the third
column nor the page filenames in the second column. Moin will take care of all
that.
See here for details:
https://moinmo.in/HelpOnPackageInstaller
Finally, zip up the directory and run the package installer on it.
The Easier But Less Thorough Approach
-------------------------------------
Alternatively, just make a script that renames your page directories to be
what Moin expects. You'll need to loop over the directories in the pages
directory, convert them using the quoteWikinameFS function if they are still
the original page names, and then issue a rename/move operation on each one
requiring adjustment.
This approach is arguably a lot easier if you're comfortable with filesystem-
related scripting, which I guess you are, but you will need to do things like
run any indexing manually afterwards. But maybe you're not at the point where
you've enabled indexing, anyway.
Paul
More information about the moin-user
mailing list