Jump to content

At the last day of 2024, I made a json formater based on jq


Recommended Posts

Posted

It's the last working day of this year, so I think no body will blame me to do some fun works🤪

Basally I build this workflow on the top of jq, I loves jq to decode my json string but it's very annoying to switch windows to terminal.

I'm tried to build it years ago, but can't find a window to show the results. Fortunately alfred latest release the TextView, it's the exactly display I want !

 

So, I support jq commands both in keywords and universal actions, and then reformat and display it in the text view where it's human readable and could copy to another place.

 

Usage:

1. in the keyword:

     jq {"resume":{"name":"yingwei"},"date":"20241231"}


image.png.bfe667954555d9605f140ddd3da96313.png

 

2.  in the universal actions

image.thumb.png.8e7bb7e677618f6e05473cf5fc009db7.png

 

3. keywords with path

  - format:   jq $path $jsonstr

image.png.5e2f1ece4dab7fc767900b480c02fcb8.png

image.png.b6fa9a53e2c5a2a9a118797e209765a4.png

 

 

Hope you like it. https://github.com/Dashift/jq_for_alfred

image.png

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...