1.43.0 • Published 5 years ago

emuto v1.43.0

Weekly downloads
45
License
MIT
Repository
github
Last release
5 years ago

Emuto is a small language for manipulating and restructuring JSON and other data files. Emuto is inspired by jq and GraphQL

build Codecov David NPM GitHub release Twitter URL

Features

  • Transform and query data structures
  • Integrate with unix commands in the command line
  • Conversions between different file formats
  • Supported input formats: JSON, text, csv, tsv, dsv
  • Supported output formats: JSON, text
  • Available as a Webpack loader

Getting started

Emuto as a CLI tool

npm install -g emuto emuto-cli

Read more in the tutorial

For Arch Linux users, also available as an AUR package

Webpack loader for emuto

yarn add --dev emuto emuto-loader

Read more in the Webpack guide

What is emuto good for? Examples

Number of items in JSON file

curl my_file.json | emuto 'length'

Your karma on HackerNews

curl https://hacker-news.firebaseio.com/v0/user/kantord.json -s | emuto '$.karma'

Convert another command's output to JSON

ls | emuto -i=raw '$[0:-1]'

See number of NPM dependencies

cat package.json | emuto -c '$.dependencies | keys | length'

List available scripts in package.json

cat package.json | emuto -c '$.scripts | keys | join " · "'

Get only the relevant data from a huge JSON file

curl https://api.github.com/repos/stedolan/jq/commits |\
emuto -c 'map ($ => $ { commit { message } committer { login } } )'

Automate the restructuring of data by creating scripts with emuto

restructure.emu

#! emuto -s

$
  | map ($ => $ { commit { message } committer { login } } )
  | map ($ => {
      "committer": $.committer.login,
      "message":   $.commit.message,
    })

Calling your script

curl https://api.github.com/repos/stedolan/jq/commits | ./restructure.emu

Contributing Guide

Read our contributing guide to learn about our development process, how to create bugfixes and improvements, and how to build and test your changes to emuto.

1.43.0

5 years ago

1.42.0

5 years ago

1.41.1

5 years ago

1.41.0

5 years ago

1.40.0

5 years ago

1.39.0

5 years ago

1.38.0

5 years ago

1.37.1

5 years ago

1.37.0

5 years ago

1.36.0

5 years ago

1.35.0

5 years ago

1.34.0

5 years ago

1.33.0

5 years ago

1.32.0

5 years ago

1.31.0

5 years ago

1.30.0

5 years ago

1.29.2

5 years ago

1.29.1

5 years ago

1.29.0

5 years ago

1.28.2

5 years ago

1.28.1

5 years ago

1.28.0

6 years ago

1.27.0

6 years ago

1.26.0

6 years ago

1.25.0

6 years ago

1.24.0

6 years ago

1.23.1

6 years ago

1.23.0

6 years ago

1.22.0

6 years ago

1.21.1

6 years ago

1.21.0

6 years ago

1.20.0

6 years ago

1.19.0

6 years ago

1.18.0

6 years ago

1.17.0

6 years ago

1.16.0

6 years ago

1.15.0

6 years ago

1.14.0

6 years ago

1.13.0

6 years ago

1.12.0

6 years ago

1.11.2

6 years ago

1.11.1

6 years ago

1.11.0

6 years ago

1.10.0

6 years ago

1.9.0

6 years ago

1.8.0

6 years ago

1.7.0

6 years ago

1.6.1

6 years ago

1.6.0

6 years ago

1.5.1

6 years ago

1.5.0

6 years ago

1.4.0

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago