MushDriver, unformatter/installer
-
So, since I'm going to get serious about coding again, I'm polishing off my mushdriver tool. Its basically an unformatter that has has "defines" that you can specify in a central file, via command line, or can be inferred based on certain search rules.
And then it knows how to connect to a MUSH and actually install the unformatted code.
This is largely built towards my preferences and purposes, but my workflow under it is something I'm enjoying a lot. I have my code open in a Sublime Text 3 project (with a mushcode syntax highlighter, though its only half-assed), I save, then alt-tab over to the command prompt and re-run this command:
X:\Projects\mush\code> mushdriver install -P mush-cards -H dusttodust.yaml
The dusttodust.yaml is just a simple file with server/port/username/password, but under the mush-cards directory is a project.yaml which has all the magic glue:
When the "install" program runs, it looks at the targets list-of-dictionaries, and does a search for anything with the specified name. If it finds it, it sets the define to the dbref (the define starts out defaulting to the objects name). If it can't find one, it runs the create script. It repeats for each object, and when its done it'll go and actually load in the code-- now replacing all the references to the old/new objects with the dbrefs.
By convention I have all my defines as #something, but that's not required (it just looks better with my syntax highlighting rules)-- the defines are just simple/stupid search/replace's that are done on each command before sending to the MUSH.
Then there's the "requires" section, which has two types of pre-requisites so far. One is defines, meaning it won't even try to do anything if you don't specify the "#codestorage" and "#masterroom" defines, which you can do on the command line or via "mushdriver define masterroom #2".
The "objects" requirement will run a search like it did for its own objects, only it won't (obviously) create anything if it can't find it. Instead, it'll just abort installation.
Anyways! The tool, right now, is sorta geared to my own preferences and needs, but I could clean it up to be a bit more generic if there was any interest in it.
(FWIW, it also can simply "mushdriver compile" to 'just' unformat, and it has some slightly different rules then Muxify which is why I prefer it)