This is a GitHub Action which updates TOCs in Emacs Org mode files. It uses org-make-toc by alphapapa which provides a rich API to fine-grained control of output. This repository also provides a Docker image and a Nix flake which run an executable version of the library.
This repository contains an example workflow which updates the TOC of this document and push the change to the branch.
The action accepts a single required input parameter patterns
which is a comma-separated glob patterns of target files.
You can also use a Docker image from this repository. It is currently hosted on GitHub Container Registry:
docker run -v $PWD:/data -w /data -t ghcr.io/akirak/org-make-toc:latest README.org
It accepts Org files (not glob patterns) as arguments.
This repository contains a Nix flake, so you can run the application using nix run
, e.g.:
nix run github:akirak/org-make-toc-action -- README.org
Since this is a flake, you can also integrate it with your flake project by using pre-commit-hooks.nix, for example.
The package name is executable
.
- Adam Porter, a.k.a. alphapapa, for writing the org-make-toc package.