As when I concentrated on This Wreckage I got a craving for sci-fi, so the focus on Project Y4 has caused stirrings of heroic fantasy. (And let’s not dive into the whole This Wreckage-is-actually-a-science-fantasy-anyway kettle o’ fish.)
Ever since I left This Wreckage behind I’ve been using bLADE Personal Wiki to organise my thoughts as I strip out anything too copyright-infringing and generally make it more cohesive and coherent, in preparation for… the future. Races, factions, places, characters, items… I don’t dedicate a lot of time to it, but now and then I think of things to add or refine.
Then I realised that bLADE Wiki doesn’t quite have all features I need anymore. And with it out of active development, the chances of getting those features are zero.
Since it isn’t open source… I realised I had to make my own personal wiki.
I spent some time looking around at personal wiki options before I settled on bLADE.
My requirements have always been slim: “Notepad with hyperlinks”, as Jack put it so succinctly one night at the pub, pretty much says it all. I also enjoy super-lite wiki mark-ups that are extremely quick and painless to use, so I can embolden and italicise easily. There is no need for portability or cross-platform support — I have a single Windows 7 desktop and that’s home sweet home (and if I change OS or get a new machine, porting a small wiki will be the least of my worries).
Then I found bLADE Wiki. A beautiful little lightweight application that operated on raw text files. A dedicated wiki application to keep me away from the terrifying generality of standard web browsers. Simple, clean and responsive. Perfect.
The feature I found to be missing was global word replace. Some of my race, faction and even character names are still up for changing, but they are all over the place (including in page names) as they are — once I settle on final names, it will be hell to replace all instances. There will be chaos. If only I could make my own wiki with this feature installed…
You’re right, I could just have built a stand-alone application — as noted above, bLADE Wiki uses pure and simple text documents.
So it might seem a bit silly to develop my own entirely new system for a single bonus feature, but it’s also a long term investment in that I can add in new features as and when I require them. Hell, some other people might even find it handy — there clearly is a market for personal offline wikis, and I can’t be the only one with irrational requirements.
Grow Your Own Wiki
At work, I use C# (at least, when I’m not grinding those SQL rails). I decided that making RDZWiki would be a good exercise to get to know the language a bit better, and on my own terms (rather than from reverse engineering a collossal disaster of a system).
C# provides a WebBrowser control, which is the basis for RDZWiki (and by the looks of it, bLADE Wiki too). This is effectively a (slightly gimped) Internet Explorer inside your normal WinForms (oh I feel so VB6 designing the UI) program, though the documentation suggests that different browsers can provide for the control (somehow).
But rather then feeding it real HTML documents, I read in text files stored in wiki mark-up, parse them into terrible 1990s HTML, and then write them directly into the browser control. Which is surprisingly easy — I had the basic system working frighteningly quickly. After that, it was just a matter of refining the parser and tidying up the interface.
An important requirement for RDZWiki was maintaining compatibility with the original bLADE Wiki mark-up, to ease the transition process. Luckily I don’t really make use of the full extent of said mark-up, so my balls-to-the-wall parser doesn’t have to take account of as much as it might. Bold, italics, hyperlinks, headings, blockquotes, lists… Job done.
(Maybe I should add <marquee>?)
I’ve always fantasised about Subversion integration (or some other kind of version control), since there have been occasions in bLADE Wiki when I managed to accidentally a few paragraphs.
I also want to add page metadata like categories. Not quite sure how to do this yet, what with the files being decentralised individual text documents — keep a central page index? Make a metadata file to go along with each page? Append the metadata to the text file and strip it off during page loading and editing?
And having everything in a single folder is probably a nightmare, but I’m not entirely sure how to introduce a heirarchy. By a quirky side-effect of putting slashes into links, I have made it actually possible to put pages into sub-folders, but I’m not sure how this will pan out in the long term. Maybe if I make it check all sub-directories on file loading, you can still have folders but they’ll be transparent to the system? Tie it into the above desire for categories and automatically folderise things according to their parents?
Well, it’s not like I’m in a rush. There will be plenty of time to deal with these issues.
2 thoughts on “Blog 446: RDZWiki”
YOU ARE LATE BY TWO DECADES, MAH BOI
Maybe with some choice mark-up I can RESTART THE PARTY YEAAAAAAAAAAAA