Selective conversion of TWiki links

Lis Riba October 16, 2011

I'm trying to convert a batch of TWiki pages into Confluence, while still retaining most older pages on TWiki (to become a read-only archive).

The pages in my selection contain many internal-TWiki links.

  • Some point to other pages in the selection, so need to be converted to Confluence links
  • Others point to pages I'm not converting, so must continue to point to TWiki.


UWC appears to convert all the TWiki links it can, meaning that my tests so far yield a lot of undefined links.

The TWiki is still in use, so I can't modify pages directly on the TWiki before conversion.

A) Is there any way to control which links UWC converts?

If not...

B) How can I do a 2-step conversion - first from TWiki to my HD (without sending pages to Confluence), and then from my HD to Confluence (thus allowing me to make manual modifications to the pages before uploading) - while still preserving the page hierarchy and attachments?

Thanks

1 answer

1 vote
Laura Kolker
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 16, 2011

A) Nope
B) The simplest path forward would be to write a custom LinkConverter to handle this problem. As I recall the TWiki link handling uses a lot of tokenization to process the links using properties. Probably what I would do is work out some kind of methodology for identifying which pages are to be linked where (maybe a seperate properties file? or maybe just add your own misc properties to the converter.twiki.properties file?), then write a custom link converter to use your properties to update the should-point-to-TWiki links first (possibly tokenizing the results to hide them from the normal link handling), and calling that class before the normal link handling which will then take care of your needs-to-point-to-Confluence links.

Noting: A 2 step conversion isnt impossible, but it's not going to be less complicated than the above suggestion.

Good luck!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events