Skip to content
This repository has been archived by the owner on Apr 9, 2022. It is now read-only.
/ org-make-toc-action Public archive

Update TOCs in Org files automatically using GitHub Actions

License

Notifications You must be signed in to change notification settings

akirak/org-make-toc-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

org-make-toc-action

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.

Table of contents

Usage

GitHub Action

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.

Docker image

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.

Nix flake

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.

Credits

  • Adam Porter, a.k.a. alphapapa, for writing the org-make-toc package.