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.

No comments:

Post a Comment