utility to convert wiki-style links to Scrivener links

I posted on this thread that I would really like wiki-style linking. I also said that I was thinking of writing a utility to convert wiki-style links over to Scrivener ones.

It’s done.

The utility, called Scritch, is available here. You can use it as you like. It seemed to do a good job with material I imported from wikidPad. It may handle material imported from other wikis as well. You could also use it to add a bunch of links by typing, then close Scrivener, run Scritch, and go back to Scrivener with the links now added. Obviously, it will be best when Scrivener offers this feature itself, but whether Scrivener will help convert imported material is an open question, and Scritch handles that reasonably now.

Scritch reads the project file, the RTF files, and the links files. I determined that the links files reference a character offset in the RTF text (after you remove formatting, that is), and so with some RTF parsing and mangling, I was able to identify where a wiki link is, look it up in the Binder items, and turn it into a Scrivener link.

Both the Document text and the Notes text are handled this way.

Running it on my own material, it converted nearly 700 links across over 200 files. Lots of time saved.

Scritch is written in C# and if anyone wants to leverage the code for your own purposes, feel free.

If you have problems with Scritch, reply here or via the link on my web page. I hope folks find it useful.

Thanks!

I’ve updated Scritch to version 1.0.1 (same URL above) to fix some issues where links were only half-created and could appear in incorrect places in the document. The new version is also more tolerant of errors.

thanks!