Author Intrusion - A black triangle CLI

Over the last week, I've been working on the current version of Author Intrusion. It can get pretty discouraging since there is so much to do, so I'm focusing on a single task at a time and building out along the way so I will hopefully get a complete project by the end.

Formatting

One of the hardest things about coding is the GUI. There are so many things for getting events hooked up and the interface running smoothly. Being that GUIs are my weakest area of code, plus the state of the cross-platform .NET UI libraries is still a little weak, I'm going to work on other things.

I ended up deciding on project IO. For those who have read my blog in the post, you probably remember that I spend a lot of time working on automated the creation of ebooks and print from my source documents. Not to mention a lot of time working on creating a format that works the way I like to work.

That lead into my first goal: transforming a source project into another format. Eventually, this is going to lead into system used to create ODT, Microsoft Word, EPUB, MOBI, and everything else. Not to mention importing from other formats.

While I'm going to eventually have a GUI interface for it, I can also write a command-line interface (CLI) version which lets me get the functionality written without getting distracted by the GUI.

Progress

This weekend, I actually saw the beginning of my ideas show up. The initial framework for converting a Markdown file into DocBook 5 worked via the CLI.

$ aicli transform sample.markdown sample.xml

I went with aicli (Author Intrusion CLI) for the tool. The interface is inspired by Git with sub-commands and a somewhat flexible way of adding new tools.

The cool part is that the above command actually worked. It doesn't look like much, but there weeks of effort to get to that point. It's a black triangle moment in this development.

Formats

I arranged the file formats into, creatively enough, IBufferFormat objects. They are discovered via an IoC container (StructureMap) and represent a single type of input or output.

The initial ones to get the above code working were:

  • Markdown (input only)
  • DocBook (output only)

I'll get these to be both input and output, that way anyone can use either Markdown or DocBook files for their primary project format. I'll also use these for the output formats:

  • EPUB
  • MOBI
  • Libreoffice (ODT)
  • Microsoft Word (DOCX)

And it has options too!

Yeah, the other bit I like is the single configurable option.

$ aicli transform sample.markdown sample.xml -ORootElement=chapter

There may be more, but that puts me one step closer to replacing mfgames-creole docbook that I originally wrote for MfGames Writing Python.

Metadata

Categories:

Tags: