Building on Charlie Garrison's work, this is the one I came up with: ``` #!/bin/sh
## requires pip3 install jsbeautify ## requires pip3 install cssbeautify ## online at https://beautifier.io ## and https://github.com/beautify-web/js-beautify ## echo $BB_DOC_LANGUAGE if [ "$BB_DOC_LANGUAGE" == "CSS" ]; then css-beautify elif [ "$BB_DOC_LANGUAGE" == "JavaScript" ]; then js-beautify --jslint-happy elif [ "$BB_DOC_LANGUAGE" == "JSON" ]; then python3 -m json.tool else echo "unknown language: $BB_DOC_LANGUAGE" fi ``` On Wednesday, May 26, 2021 at 9:42:09 AM UTC-7 [email protected] wrote: > I'm looking for text filters to format JSON and XML. Google and > https://www.barebones.com/search.html finds things that are not well > documented or seem outdated. > > For macOS Big Sur and Python 3 please. > > Thanks > Arthur > -- This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "[email protected]" rather than posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit> --- You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/bbedit/40b911a3-5b21-4a16-a1a3-0fa9e1b6fdaan%40googlegroups.com.
