migrating a usemod Wiki from CamelCase to [[spaced links]]

B

Bil Kleb

We have an internal usemod Wiki that prodominately uses
CamelCase-style links. However, it's topic is visual
literacy and CamelCase is not easy for laypeople to visually
digest.

Does anyone have a script for migrating from CamelCase to
[[spaced links]]?

Of course, what I'd really like is a Ruby-powered Wiki. Is
there a migration path for that leap?

Thanks,
 
A

Austin Ziegler

We have an internal usemod Wiki that prodominately uses
CamelCase-style links. However, it's topic is visual
literacy and CamelCase is not easy for laypeople to visually
digest.

Does anyone have a script for migrating from CamelCase to
[[spaced links]]?

Of course, what I'd really like is a Ruby-powered Wiki. Is
there a migration path for that leap?

Not yet. Soon, I hope, but not until after the new year unless I get a
lot of time to work on it in the next few days (I'm doing an update
release of Ruwiki to fix a single bug -- and if I have a conversion
script, that too).

Ruwiki supports [[spaced links]] or even Spaced_Links, but does not
have a script that will automagically convert the references from one
form to the other. The page format, however, is open, and could be
changed easily.

-austin
 
B

Brian Schröder

We have an internal usemod Wiki that prodominately uses
CamelCase-style links. However, it's topic is visual
literacy and CamelCase is not easy for laypeople to visually
digest.

Does anyone have a script for migrating from CamelCase to
[[spaced links]]?

Of course, what I'd really like is a Ruby-powered Wiki. Is
there a migration path for that leap?

I don't now nothing about usemod wikis, but if you can pipe the pages through
this script it converts it along your proposed lines:


$ cat camel_to_space
#!/usr/bin/ruby

print ARGF.read.gsub(/(([A-Z]\w*){2,})/) {
'[[' + $1.gsub(/(\w)([A-Z])/, '\\1 \\2').downcase + ']]' }



$ echo "This text contains CamelCase DoubleDromedarCase and even rareCased
text." | ./camel_to_space
This text contains [[camel case]] [[double dromedar case]] and even rareCased
text.


Regards,

Brian
 
C

Cameron McBride

Of course, what I'd really like is a Ruby-powered Wiki. Is
there a migration path for that leap?

I thought Dave's rublog could grok usemod data. I'm just reciting
from memory, so I could be wrong. (and I lazily didn't check the
facts ;)

Cameron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top