This repository contains a Docker Image to run an export of the GAP Library into a JSON file. It can be found as mathhub/gap-export on DockerHub.
To run the docker image, and place the generated files in a file called types.json
JSON in the current directory, use:
docker run -t -i --rm -v $(pwd):/data mathhub/gap-export
It approximately follows this list of
instructions
to download GAP, install the MathInTheMiddle package, and export
most of the loaded symbols (which should be those in the library
and the default packages) to a JSON file called types.json
.
This won't include every single thing in the GAP namespace, but
should have most user-facing functions.
MitM itself doesn't care about formatting, but if you want to examine it better or upload it to mathhub, then you might consider using a JSON formatter. The following should work nicely:
cat types.json | jq -M --indent 4 . > types-pretty.json
Unlicense (read: Public Domain)