Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 15 days 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 (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-04T07:57:12.000Z (8 months ago)
- Last Synced: 2024-03-04T08:56:49.294Z (8 months ago)
- Topics: athena, aws, cli, haskell
- Language: Haskell
- Homepage:
- Size: 64.5 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# parthenon
[![Build Status](https://github.com/AntoineGagne/parthenon-hs/actions/workflows/haskell.yml/badge.svg)](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>
EOFcat << EOF > athena-vectors
[{x=1.0, y=1.0, z=1.0}]
EOFecho '[{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'
```