Tuesday, August 9, 2022

Status Update on Writing Tools

 I spent some time messing around with writing exporters from Leo files in a particular layout, to HTML.

So far, I have code to parse out information from the Leo file using lxml, process it into a self-referential tangle of attrs classes, and render that all to standard output after processing it with a Jinja template. Also argument processing via Click because I am lazy and I think Click is fine.

There are a few things still missing, however:

  • I have links from options to episodes; I want to add a backlink to the parent episode; this is easy. DONE
  • I have links from options to episodes; for the purposes of soliciting feedback, I want to get those links into Google Docs and still work; I've gotten as far as getting them in as broken links.
  • I kind of want page breaks between episodes; the hacks I've tried to make this work on Google Docs import... don't...
  • I wrote a basic custom stylesheet so I can look at my drafts as they'd show up in a browser, without getting flashbanged, but I don't want this stylesheet to show up in the import, and currently it does. DONE (wrote style to apply to subdirectory, removed style block)

There's also the fact that some of my processing options prompt Firefox to perform some rather excessive repairs; I'd rather have it do something calmer. I can tweak and think about that as I feel like it.

Also, I kind of want to output statistics like wordcount on standard error, but that shouldn't be hard, either.

Saturday, August 6, 2022

Thoughts on Writing Process

 This is going to be painfully boring for most people, apologies.

One thing that occurred to me while I was drafting various storylines for the BEAddventure, is that I don't have a really solid format for putting the files in.

I've done all of

  • Try to indicate branching structure by indenting later episodes
  • Indicate branching by varying the number of asterisks I put before an option text (I'm actually not sure what this even communicates, ultimately)
  • Put everything into a Leo document and indicate the branching in there
  • Put line breaks only where I want them
  • Put in <br> tags, and use that to set off paragraphs.

I think I should make two major changes, one simple but tedious, and the other more involved and less certain how it would turn out.

The simple change is, switch to <p> tags, assuming that plays nice with the auto-formatting.

The more complicated change is, so, background: it is very helpful to be able to put a draft into nice HTML format for feedback purposes. That way, I can just copy it into Google Docs, and share it. I want to see if it's possible to convert from a more stripped-down textual representation in Leo.

Well, Leo's plugins are acting weird enough that I think it makes more sense to try and parse its XML myself, which is going to be interesting, for sure.

Another possibility, which would be a little fiddlier, but cut down on dev time would be: have a list of HTML files, and a script that just shoves them together with <hr> tags between them.

I don't really know what makes sense...

Leo provides the nicest way I know of to track all of the metadata, but I don't currently have a solution for pulling this stuff out and turning it into a shareable draft.

Between the formats I'm using currently, I guess it makes the most sense to see about improving Leo support, because no other format really has anything to support...

Anyway, I'm tired and I've got other stuff to work on, so I'm just going to publish this and work on that other stuff.

Tuesday, August 2, 2022

Like a Phoenix From the Ashes… Except Not As Exciting

 Okay, I'm back.

I never did put in the work to figure out which of my old posts I stood by, so I'm keeping them all drafted for now. I know for sure that one post isn't coming back...

Anyway, what I'm here for...

I've been writing stuff for the BE Addventure off and on for a while, and recently, I'm now trying to do some proper editing first. So far, this has significantly expanded one storyline, and gotten it to make somewhat more sense.

Anyway, in order to streamline things, I want to put together a checklist for myself to make sure I catch obvious stuff before I hand it off for feedback.

My plan here is to draft up the guidelines in the coming week, and put up a page here.

I didn't really plan beyond that, and I have other stuff tonight, so, um, bye? See you later? I forget if comments are enabled?