diff options
Diffstat (limited to 'nodegen')
-rwxr-xr-x | nodegen | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -0,0 +1,9 @@ +#!/bin/sh + +echo 'static struct node nodes[] = {' + +curl https://nodes.tox.chat/json | +jq --tab '[.nodes[] | {".addr4": .ipv4, ".addr6": .ipv6, ".port": .port, ".idstr": .public_key}]' | +sed 's/"-"/NULL/; s/"\(\.[0-9a-z]\+\)":/\1 =/; 1d; $d' + +echo '};' |