dotfiles/.local/bin/scripts/synct

4 lines
240 B
Plaintext
Raw Normal View History

2021-03-26 18:02:21 +00:00
#!/bin/sh
apikey=$(grep apikey $XDG_CONFIG_HOME/syncthing/config.xml | cut -d '>' -f2 | cut -d '<' -f1)
curl -H 'Content-Type: application/json' -H "X-API-Key: $apikey" "http://localhost:8384/rest/$1" "${@:2}" | bat --style=numbers -l json