Skip to content

Latest commit

 

History

History
47 lines (30 loc) · 2.32 KB

File metadata and controls

47 lines (30 loc) · 2.32 KB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

What This Project Does

A Clojure CLI tool that automates generating release artifacts for liblouis and liblouisutdml (braille translation libraries). It produces: an ANNOUNCE file, a Jekyll blog post, an updated download index, processed HTML documentation, a GitHub release description, and a hub command to create the GitHub release.

Running the Tool

# After running `make dist` and `make distwin` in the liblouis source repo:
clojure -m release-helper ~/src/liblouis ~/src/liblouis.github.io

# For liblouisutdml (after `make dist` there):
clojure -m release-helper ~/src/liblouisutdml ~/src/liblouis.github.io

The first argument is the source project directory; the second is the local clone of the liblouis GitHub Pages site.

Checking Dependencies

clojure -M:outdated

Architecture

Everything lives in a single source file: src/release_helper.clj. The -main function detects which project it's handling (liblouis vs. liblouisutdml), extracts the version from the NEWS file, and then calls a series of pure functions that each produce one release artifact.

Key processing steps:

  • Version extraction: regex on the NEWS file
  • Format conversion: shells out to pandoc (org → rst, org → markdown, org → gfm)
  • Templating: uses selmer to fill in templates/*.org and templates/*.txt
  • Documentation: strips HTML headers/metadata and wraps content in Jekyll front matter; handles both single-page and multi-page HTML docs

Release schedule: Fixed ISO weeks 10, 23, 36, 49 each year (every 13 weeks, always Monday). The next-release-date function computes this automatically.

External Dependencies

  • pandoc — must be on PATH; used for all document format conversions
  • hub — GitHub CLI; used to construct the release creation command (the tool prints the command, it does not run it)
  • Clojure CLI (clojure) — runtime

Templates

templates/ contains Selmer templates for the announcement (two variants: liblouis and liblouisutdml) and the release description. The feedback.txt template is rendered at the end to tell the user what files were written and what to do next.