Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tong/armcat
Convert binary arm files to json and vice versa
https://github.com/tong/armcat
armory3d cli tool
Last synced: 5 days ago
JSON representation
Convert binary arm files to json and vice versa
- Host: GitHub
- URL: https://github.com/tong/armcat
- Owner: tong
- Created: 2022-04-14T13:12:01.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-01-11T12:55:32.000Z (almost 2 years ago)
- Last Synced: 2024-11-07T20:50:53.257Z (about 2 months ago)
- Topics: armory3d, cli, tool
- Language: Haxe
- Homepage:
- Size: 444 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Armcat
Convert binary [armory3d](https://armory3d.org/) `arm` files to json and vice versa.
## Build + Install
```sh
haxelib install build.hxml
ARMSDK=
haxe build.hxml
cp armcat.js /usr/local/bin/armcat
chmod +x /usr/local/bin/armcat
```## Usage
```sh
armcat --help
Usage: armcat [options]Options:
[--json-indent] : Indention string
[--no-json] : Skip json formatting
[--help]
```## Examples
Pretty print using [jq](https://stedolan.github.io/jq/):
```sh
armcat | jq .
```Print all objects of given scene file:
```sh
armcat Scene.arm | jq .objects
```Print all traits of all objects in given scene file:
```sh
armcat Scene.arm | jq ".objects[].traits"
```Print decoded arm file without json formatting (note that this does **not**
output valid json):
```sh
armcat Scene.arm --no-format
```Live preview integration into [lf](https://github.com/gokcehan/lf/) file
manager using [bat](https://github.com/sharkdp/bat) for syntax highlighting
([lf/preview#L35](https://github.com/tong/dot/blob/1e0cf5cfb6ed502c58608d7c3e10791c598b3ce1/lf/.config/lf/preview#L35)):
```sh
armcat "$1" | bat --file-name "$1" --language json --color=always
```![](.github/armcat-lf.png)