c-md/srcs/cli/help.c.md
lohhiiccc 80f7a1b9b6 feat(build): add build instructions in README and convert sources to .c.md format
- Add detailed build and bootstrap instructions to README.md.
 - Convert all source and header files from .c/.h to .c.md/.h.md.
 - Add bootstrap.sh script for automated building across version history.
 - Update Makefile and sources.mk to reflect new markdown-based source organization.
2026-01-12 14:54:49 +01:00

939 B

#include <stdio.h>

#include "cli.h"

void
cli_print_help(const char *progname)
{
	fprintf(stderr, "Usage: %s [OPTIONS]\n\n", progname);
	fprintf(stderr, "Extract code blocks from literate markdown files.\n\n");
	fprintf(stderr, "Options:\n");
	fprintf(stderr, "  -h, --help          Show this help\n");
	fprintf(stderr, "  -e, --ext EXT       Extension to extract (c, h, py, etc.)\n");
	fprintf(stderr, "                      Required for stdin, optional for files\n");
	fprintf(stderr, "  -i, --input FILE    Input file (default: stdin)\n");
	fprintf(stderr, "  -o, --output FILE   Output file (default: stdout)\n");
	fprintf(stderr, "  -m, --map FILE      Generate line mapping file\n\n");
	fprintf(stderr, "Examples:\n");
	fprintf(stderr, "  %s -e c < input.md > output.c\n", progname);
	fprintf(stderr, "  %s -i main.c.md -o main.c\n", progname);
	fprintf(stderr, "  %s -e h -i file.md -o file.h -m file.map\n", progname);
}