json.bash
jc
json.bash | jc | |
---|---|---|
3 | 98 | |
445 | 8,087 | |
0.2% | 0.9% | |
6.4 | 9.0 | |
3 months ago | 3 months ago | |
Shell | Python | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
json.bash
-
Show HN: Jb / json.bash – Command-line tool (and bash library) that creates JSON
If it helps, there's a little example of using the bash API with bash variables/arrays, should give you an idea of how it could be to use: https://github.com/h4l/json.bash/blob/main/examples/notify.s...
This example uses the pattern of setting an out=varname when calling a json function, the encoded JSON goes into $varname variable. This pattern avoids the overhead of forking processes (e.g. subshells) when generating JSON.
Otherwise you can use the more normal approach of jb writing to stdout, and capturing the output stream.
jc
-
Show HN: Jb / json.bash – Command-line tool (and bash library) that creates JSON
How is this different to this https://github.com/kellyjonbrazil/jc
-
Why *not* parse `ls` (and what to do instead)
the thing with the coreutils is they provide basic core functionality; you dont need bash on your system - `ls` is not bash (and then you still end up with busybox where json still would not be part of ls). add more utilities to your system to do more complex logic; ive used similar apps to this in the past: https://github.com/kellyjonbrazil/jc
there's also using zero terminiated lines in ls with `--zero`; then piping that to a number of apps which also support similar (read,xargs,ect)
might also checkout powershell on linux which may suite your needs where instead of string manipulation, everything is a class object
-
Xonsh: Python-powered, cross-platform, Unix-gazing shell
https://github.com/kellyjonbrazil/jc - "CLI tool and python library that converts the output of popular command-line tools, file-types, and common strings to JSON, YAML, or Dictionaries. This allows piping of output to tools like jq and simplifying automation scripts."
-
Gooey: Turn almost any Python command line program into a full GUI application
> I'd love to see programs communicate through a typed JSON/proto format that shed enough details to make this more independent, and get useful shell command structuring/completion or full blown GUIs from simply introspecting the expected input and output types.
You should try PowerShell. It's basically Microsoft's .NET ecosystem molded into an interactive command line. I'm not entirely sure if PoweShell can make full use of the static types that build up its core, but its ability to exchange objects in the command line is almost unmatched.
On Linux you can use `jc` (https://github.com/kellyjonbrazil/jc) combined with `jq` (https://jqlang.github.io/jq/) to glue together command lines.
- jc: Converts the output of popular command-line tools to JSON
- why does the proc directory exist?
- Open source python projecto to contribute to
What are some alternatives?
welcome.sh - A nice welcome script for Bash and Zsh
jq - Command-line JSON processor
asciinema-rec_script - Record 💭 comments and ❯ commands from from shell scripts in addition to their output.
murex - A smarter shell and scripting environment with advanced features designed for usability, safety and productivity (eg smarter DevOps tooling)
discord.sh - Write-only command-line Discord webhooks integration written in 100% Bash script
Octo Pack - Creates Octopus-compatible NuGet packages