Rendered at 16:23:08 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
chamomeal 10 minutes ago [-]
I have a similar alias for borkdude’s ‘jet’ tool.
The extra nice thing about jet is you can convert json into edn, then pipe it into an inline babashka repl where you can inspect the object with all the power of clojure. It is super duper nice for quickly looking through hunks (even huge hunks) of json. You can sum things up, filter through thousands of elements, generate a json schema with malli, whatever you want!
_flux 10 minutes ago [-]
I use similar approach for fixing up clipboard contents with
tr '\n' ' ' | sed 's/\t/ /g; s/ */ /g'
But also I switched to xsel at one point, as xclip doesn't seem to deal as well with unicode. It could be xclip has been fixed since then, though.
lkbm 35 minutes ago [-]
I have this as a bash script and a some similar bash and python scripts for converting between python's print(my_dict) and json, or to run some python (mostly the dicts) through black.
The j2p is pretty self-evident if you know any python, and the only trick to p2j was knowing `ast.literal_eval(input_str)`.
megagpt1 24 minutes ago [-]
Should be print(repr(my_dict)) in case my_dict is actually a string, or you'd have an injection attack
nullgeo 27 minutes ago [-]
I like the version where it throws the error. That way I will realize I might not have copied the right JSON (or forgotten to copy)
netsharc 1 hours ago [-]
A universal tool (well, since I use Windows, a Windows tool) to modify the clipboard would be cool.
So, copy text to clipboard, press a hotkey to popup the menu, and it'll offer options depending on the detected text. For example changing the clipboard contents to prettified (if it detects JSON, XML, HTML), or formatting a number back and forth (e.g. working with SSN's out of numerical DB entries when they prefer AAA-GG-SSSS).
1 hours ago [-]
OskarS 2 hours ago [-]
Lovely little alias, but I much prefer fracjson[0] pretty printing to jq, so I might go with that instead!
The extra nice thing about jet is you can convert json into edn, then pipe it into an inline babashka repl where you can inspect the object with all the power of clojure. It is super duper nice for quickly looking through hunks (even huge hunks) of json. You can sum things up, filter through thousands of elements, generate a json schema with malli, whatever you want!
The j2p is pretty self-evident if you know any python, and the only trick to p2j was knowing `ast.literal_eval(input_str)`.
So, copy text to clipboard, press a hotkey to popup the menu, and it'll offer options depending on the detected text. For example changing the clipboard contents to prettified (if it detects JSON, XML, HTML), or formatting a number back and forth (e.g. working with SSN's out of numerical DB entries when they prefer AAA-GG-SSSS).
[0]: https://github.com/j-brooke/FracturedJson
> yq is a portable command-line YAML, JSON, XML, CSV, TOML, HCL and properties processor