Eric,

I suppose a script like this would do the trick of converting:

swikiDir := FileDirectory on: 'swiki/myrefs'.
#('actions' 'addresses' 'templates') do: [:dirName |
  dir := swikiDir directoryNamed: dirName.
  i := 1.
  metaFile := dir fileNamed: 'meta.xml'.
  dir fileNames do: [:fileName |
    ((fileName endsWith: '.page') or: [(fileName endsWith: '.book')
      or: [fileName endsWith: '.shelf']])
      ifTrue: ["copy file fileName to file named i".
        metaFile nextPutAll: '<file id="', i asString, '" type="'.
        (fileName endsWith: '.page') ifTrue: [metaFile nextPutAll: 'page'].
        (fileName endsWith: '.book') ifTrue: [metaFile nextPutAll: 'book'].
        (fileName endsWith: '.shelf') ifTrue: [metaFile nextPutAll: 'shelf'].
        metaFile nextPutAll: '" name="', (fileName copyUpTo: $.), '" />';
          cr.
        i := i + 1]].

This is just an approximation, I didn't actually test it, but if you
want, it'll take just 10-15 minutes, I can do it.

In an essense, 'meta.xml' file contains the mapping from file name
(numeric id) to entity name (action/address/template). Note that
there's support for categories (which was previously accomplished
through subfolders in actions/addresses/templates directory).

I do agree that certain things are very concealed now. But if you use
SwikiBrowser (bring up menu on ComSwikiLauncher and 'open swiki
browser'), you'll get a painfully familiar browser. Almost like System
Browser, but for Swiki.

Let me know if this answers your question.

Bolot


Reply via email to