#jq can be really complicated. But also really powerfull. To output the information from the bicicle-counters in #Tübingen: curl --silent https://www.tuebingen.de/ecocounter/ecocounter-sites | jq -r '(.[] | "\(.name) (\(.last_day["day"])): \(.last_day["count"])"), "gesamt: \(map(.last_day.count|tonumber)|add)"'
Which is the information one can get from: https://www.tuebingen.de/radfahren/31489.html
Jq salva. Itay lançou uma nova versão. https://github.com/jqlang/jq/releases/tag/jq-1.7 #jq
jq 1.7 has been released 🥳 feel proud to be part of the team bringing new life into this wonderful tool and language! #jq
@rheijdendael oh scapy is cool, used many years ago to do dhcp integration tests :)
btw me and bunch of ppl are actively working on the original #jq again so hopefully there will be 1.7 release soon, first release in 5 years!
@mate i use this #jq diff function from time to time https://gist.github.com/wader/4163da796082c3ddaf32e4602547c604 might be interesting
(link seems to have new line btw)
compare two JSONs with jq #json #jq
"jq diff json"
https://gist.github.com
/ipan/e5e86d5495f16216e31fe12ebc9532a4
The Best Modern Linux Commands For Beginners And Experts #ModernLinuxCommands #LinuxCommandsAlternatives #httpie #bat #ncdu #htop #fd #exa #duf #tldr #autojump #zoxide #ripgrep #sd #jq #neofetch #dust #fossil #poetry #Commandline #Productivity #Linux #LinuxCommands #Linuxhowto
https://ostechnix.com/linux-commands-alternatives/
#modernlinuxcommands #linuxcommandsalternatives #httpie #bat #ncdu #htop #fd #exa #duf #tldr #autojump #zoxide #ripgrep #sd #jq #neofetch #dust #fossil #poetry #commandLine #productivity #Linux #linuxcommands #linuxhowto
@deepak I'm a big fan of #ijq, it's awesome.
BTW, in case it helps, I wrote about how I improved my workflow with ijq, bash and tmux here 👉 https://qmacro.org/blog/posts/2023/04/27/improving-my-interactive-jq-workflow-with-ijq-bash-and-tmux/
Unbelievably, my script to generate a City Hall calendar appropriate for Google Calendar works!
I figured out string interpolation to generate agenda URLs, how to turn the Unix timestamps into appropriate dates and times, and how to string it all together into one script.
It could certainly be made more compact (I couldn't figure out how to nest curl commands right), but it works!
Now I need to figure out how to generate an .ics version, and/or make the Google Calendar…sync-able? Updatable? Because the schedule is obviously a static result and sometimes meetings get rescheduled, added, etc. I don't know a way to do that.
🔖 Processing deeply nested JSON with jq streams :: blog.oddbit.com https://blog.oddbit.com/post/2023-07-27-jq-streams/
📝 A nice story building up to a great example of #jq's .
just spent a few hours noodling away in the terminal and made a lot of progress in understanding #jq!
i am very slowly progressing towards generating a calendar file (.ics) of all the #TOcouncil meetings for the year.
it used to be a thing you could download but is no longer. you can download .ics files for individual meetings, but 1) not all at once and 2) they don't have links to the agendas, which are easy to add if you make it yourself
yes i'm sure a knowledgeable person could do this in 5 minutes but i want to *understand* it, and, more importantly, no one has offered to do it for me
I learned enough #jq scripting to know that I don't want to learn jq scripting.
Today we're happy to announce a new JSONata CLI: https://github.com/dashjoin/jsonata-cli
* JSON processing and transformation from the CLI
* Inspired by #jq
* single executable file, no dependencies
* Up to 100% performance improvement compared to jq and others
Please feel free to submit feedback, PRs or any issues on GitHub. And don't forget to give us a star if you like it 😀
And before I forget, I discovered "streams" support in #jq and thought it was pretty nifty so I wrote a short article about it: https://blog.oddbit.com/post/2023-07-27-jq-streams/
In particular, we look at how to remove a particular attribute (`description`) that could occur at any level in a deeply nested JSON document (an #OpenAPI spec).