From 8fb95c786b3c1bd2e4457fb80b0b436ec547483d Mon Sep 17 00:00:00 2001 From: wrmr Date: Sat, 8 Mar 2025 18:21:53 -0500 Subject: add -? / --help --- main.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index 634127f..56edb04 100644 --- a/main.c +++ b/main.c @@ -273,6 +273,18 @@ int hvar_calc(Str param, Str *name, Str *val, Str filename) { return 1; } +void usage(const char *cmd) { + fprintf(stderr, "usage: %s -?\n" + " %s [-s] [-c FILE] [-h NAME:ARG1[,ARG2,ARG3...]] [FILES...]\n" + "\n" + " -? --help show this help text\n" + " -s --standalone prefix with html metadata\n" + " -h --hvar define a css variable (--name) with a random value,\n" + " selected by a hash of the document's title\n" + " -c --css embed the given file within a