torque 1e4a5828f8
docs: bad but in a good way
I've decided (perhaps stupidly) to eschew existing static site
generators and documentation templating systems. It seems fitting to
reinvent the wheel, which is something this project is entirely about
doing. The actual justification is a drama in a few very pathetic
parts:

a) existing documentation tools and static site generators are written
primarily in other programming languages. It feels bad to have a
dependency on a completely separate programming language ecosystem to
build the documentation.

b) existing documentation tools on average do a lot of things I don't
like. Things like trying to haul in google analytics and fonts and in
general having a truckload of javascript jammed in the frontend. The
page should have minimal or (ideally) no javascript at all.

c) modern documentation generators have really standardized on a three
column layout that looks flashy but doesn't make very good use of
space, and I think there's room to experiment with some ideas I've
seen while looking around.

So here we are. The approach being taken is to hand-roll html+css
directly, and that will hopefully converge to something that isn't
garbage. Once that has run its course, I will start considering what
level of automation makes sense to add.

Important takeaways:

1. Modern CSS is absurdly complex. It has had so many features jammed into
it over the years, it's completely nuts. I don't think it's possible
for any single person to store the details of all of it in their head.

2. Using non-tiny fonts takes up a lot of room quite quickly. Even if
you want to have a column larger than 800px, it's very easy to run out
of space quickly.

3. there's more than one way to make a list in ascii.
2023-04-06 18:31:29 -07:00
2023-04-06 18:31:29 -07:00
2022-11-20 12:54:42 -08:00
2023-04-06 18:31:29 -07:00
2022-11-20 12:54:42 -08:00
2022-11-20 12:54:42 -08:00

== nearly obvious command line interface parser

A zig library for composing declarative command-line interfaces. Heavily
inspired by https://click.palletsprojects.com/[click] for Python.

== Extemporaneous Bloviation

[quote, George "Albert Einstein" Washington]
____
The alarm rings, and expletives spill from my mouth—instinctively, before any
neuron has a chance to fire. You'd think this would get easier, having done it
at least 12000 times, but I guess it just goes to show that practice does not
necessarily converge on perfection, no matter what infinite limit t approaches.
Eyes clamped shut against the encroaching underglow spilling from the curtains,
I stretch my arms straight out from my sides and proceed to lose my balance,
flying horizontally off of the mattress. An attempt at attitude control fails
vigorously and I begin cartwheeling through open space, asserting a lopsided
trajectory that intersects with the roof of the house. Passing through it
unencumbered, I careen skyward and watch the ground recede into the distance,
as the features of the landscape shrink and pop out of existence.
____

== Hello

Requires Zig `0.10.0` or maybe better. Uses stage2-only features.

=== Features

* short- (`-s`) and long- (`--long`) style options
* short options can be chained (e.g. `-abc` is the same as `-a -b -c`)
* conventional `--` to force early of argument parsing
* option values are deserialized into rich types using conversion callback functions
* can specify default values for options that may be omitted
* options can be bound to load from environmental variables if not specified directly
* nested subcommands (e.g. for `git`-style CLIs (`command subcommand subsubcommand`))

=== Planned

* help text generation
* better error reporting
* better build system

=== Under consideration

* multi-value option flags
* shell completion integration
* `--long=value` style of value specification
* Is it actually possible for a published written document to truly be
extemporaneous?

=== Use

`zig build demo` for a demo. Otherwise just copy the file or use a submodule or
something.

== LICENSE

INTERNET SOFTWARE CONSORTIUM LICENSE

Description
Zig library for declaratively creating command-line interfaces
Readme 336 KiB
Languages
Zig 100%