busyloop / vj Goto Github PK
View Code? Open in Web Editor NEWvj - JSON Humanizer
License: BSD 2-Clause "Simplified" License
vj - JSON Humanizer
License: BSD 2-Clause "Simplified" License
I'm trying to find a good example of how to use this. For example, if you have this file:
{
"colors": [
{
"color": "black",
"category": "hue",
"type": "primary",
"code": {
"rgba": [255,255,255,1],
"hex": "#000"
}
},
{
"color": "white",
"category": "value",
"code": {
"rgba": [0,0,0,1],
"hex": "#FFF"
}
},
{
"color": "red",
"category": "hue",
"type": "primary",
"code": {
"rgba": [255,0,0,1],
"hex": "#FF0"
}
},
{
"color": "blue",
"category": "hue",
"type": "primary",
"code": {
"rgba": [0,0,255,1],
"hex": "#00F"
}
},
{
"color": "yellow",
"category": "hue",
"type": "primary",
"code": {
"rgba": [255,255,0,1],
"hex": "#FF0"
}
},
{
"color": "green",
"category": "hue",
"type": "secondary",
"code": {
"rgba": [0,255,0,1],
"hex": "#0F0"
}
},
]
}
What could you do with vj?
Are there any plans to do any kind of output formatting? I tried to do something like columns, but I can't zero in on the text with multiple spaces.
curl -s 'https://www.omdbapi.com/?s=ready&apikey=<>' | jq '.Search[]' -rc | vj -c Year -p title -s Poster
2018 Title Ready Player One Type movie imdbID tt1677720
1994 Title Ready to Wear Type movie imdbID tt0110907
2000 Title Ready to Rumble Type movie imdbID tt0217756
2011 Title Ready Type movie imdbID tt1708532
1993โ1997 Title Ready or Not Type series imdbID tt0106110
2000 Title Get Ready to Be Boyzvoiced Type movie imdbID tt0248036
2015 Title I'm Not Ready for Christmas Type movie imdbID tt5182120
2003 Title Ready, Steady, Charlie! Type movie imdbID tt0353161
2008 Title Ready Type movie imdbID tt1156516
2009 Title Ready or Not Type movie imdbID tt0892094
In this case, the title has variable levels of spaces so column -t
just sends the whole thing in disarray. I don't know Ruby, else I'd take a shot at it.
Thanks for writing this exceptionally useful tool!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.