https://github.com/antoinegagne/parthenon-hs
Tool to convert Athena terms into JSON values
https://github.com/antoinegagne/parthenon-hs
athena aws cli haskell
Last synced: 6 months ago
JSON representation
Tool to convert Athena terms into JSON values
- Host: GitHub
- URL: https://github.com/antoinegagne/parthenon-hs
- Owner: AntoineGagne
- License: bsd-3-clause
- Created: 2022-08-05T22:52:23.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2025-03-25T14:44:09.000Z (7 months ago)
- Last Synced: 2025-05-12T22:53:44.368Z (6 months ago)
- Topics: athena, aws, cli, haskell
- Language: Haskell
- Homepage:
- Size: 62.5 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# parthenon
[](https://github.com/AntoineGagne/parthenon-hs/actions)
`parthenon` is a tool that convert Athena terms into JSON values.
## How to get
### Downloading binaries
The binaries can be found in the
[Releases](https://github.com/AntoineGagne/parthenon-hs/releases) section.
### Downloading the Docker image
The latest image can be downloaded via the following command:
```sh
docker pull haskellenthusiast/parthenon
```
Other images can be found at
[Dockerhub](https://hub.docker.com/r/haskellenthusiast/parthenon).
### Building
#### Build from source
After cloning this repository, the following command can be used to build the
binary:
```sh
stack build
```
#### Build the Docker image
```sh
docker build . -t parthenon:latest
```
## Usage
### With the binary
```sh
# Create a schema
cat << EOF > vectors
array>
EOF
cat << EOF > athena-vectors
[{x=1.0, y=1.0, z=1.0}]
EOF
echo '[{x=1.0, y=1.0, z=1.0}]' | parthenon @vectors -
# [{"x":1,"y":1,"z":1}]
echo '[{x=1.0, y=1.0, z=1.0}]' | parthenon 'array>' -
# [{"x":1,"y":1,"z":1}]
parthenon 'array>' '[{x=1.0, y=1.0, z=1.0}]'
# [{"x":1,"y":1,"z":1}]
parthenon 'array>' @athena-vectors
# [{"x":1,"y":1,"z":1}]
```
### With the Docker image
Using the Docker image is similar to the commands above:
```sh
docker run --rm -i parthenon:latest 'array>' '[{x=1.0, y=1.0, z=1.0}]'
echo '[{x=1.0, y=1.0, z=1.0}]' | docker run --rm -i parthenon:latest 'array>'
```
To make it easier to invoke the image, the following alias can be used:
```sh
alias parthenon='docker run --rm -i parthenon:latest'
```