Convenient way to create a JSON file containing all directory entries:

$ find * -maxdepth 0 -exec echo "- {}" \; | js-yaml > index.json

$ cat index.json

( )


This probably fails for some special characters. I just hope I will never see that happen. 🤷

Sign in to participate in the conversation

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!