• Stars
    star
    223
  • Rank 178,458 (Top 4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 6 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

manipulate JSON files

Website โ€ข Tutorial โ€ข Live demo โ€ข CLI version โ€ข Compile-to-JS version


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.

More Repositories

1

LibreLingo

๐Ÿข ๐ŸŒŽ ๐Ÿ“š a community-owned language-learning platform
Python
1,933
star
2

just-dashboard

๐Ÿ“Š ๐Ÿ“‹ Dashboards using YAML or JSON files
JavaScript
1,570
star
3

SeaGOAT

local-first semantic code search engine
Python
967
star
4

i3-gnome-pomodoro

๐Ÿ… Integrate gnome-pomodoro into i3
Python
223
star
5

zoetic

๐ŸŒฑ ๐ŸŽฅ Markdown presentations using your webcam
JavaScript
58
star
6

ledger-cli-dashboard

๐Ÿ’ฐ ๐Ÿฆ ๐Ÿ“ˆ Customizable graphical reporting for ledger
Makefile
52
star
7

eslint-plugin-write-good-comments

ESLint rule that forces you to write good comments
JavaScript
34
star
8

jq-in-the-browser

JSON processor for web use (jq port)
JavaScript
26
star
9

pricedb

Zero-config auto-updated pricedb for ledger
Shell
15
star
10

compton-grayscale-reading-mode

Shell
15
star
11

twm-status-builder

See only the most relevant information in your status bar
Shell
9
star
12

i3-env

Productivity tool for i3
Shell
7
star
13

SeaGOAT-web

TypeScript
7
star
14

pyanist

Pyanist allows using chorded typing in addition to normal typing in order to improve your typing speed
Python
5
star
15

rofi-netctl

Switch networks using rofi
Shell
3
star
16

emuto-cli

CLI for emuto
JavaScript
2
star
17

just-dashboard-desktop

JavaScript
2
star
18

emuto-demo

JavaScript
2
star
19

bashql

Python
1
star
20

advent-of-code-solutions

Rust
1
star
21

me

JavaScript
1
star
22

git-relevant-files

1
star
23

3d-github

1
star
24

arch-config

Dotfiles repo
Lua
1
star
25

librelingo-spaced-repetition-simulation

1
star
26

cypress-resilient-match

JavaScript
1
star
27

just-chart

JavaScript
1
star
28

bottoml.in-e

JavaScript
1
star
29

glut

CLI fill gaps in pre-sorted data
1
star
30

advent_of_code_2020

My advent of code solutions (2020)
Python
1
star
31

awesome-links

My personal collection of awesome links. PRs welcome though!
1
star
32

enwiro

Rust
1
star
33

snake.sh

A snake clone written in Bash script
Shell
1
star
34

exercise-cards

TypeScript
1
star