diff options
| author | Ben Busby <contact@benbusby.com> | 2022-08-01 12:04:53 -0600 |
|---|---|---|
| committer | Ben Busby <contact@benbusby.com> | 2022-08-01 12:04:53 -0600 |
| commit | 3c776d55b0cab56f94cb02c1284b945fc3ba8e45 (patch) | |
| tree | 9f3f4f977608f9b0fe5904809ecaa6f2ff95dae1 /.github | |
| parent | 3460986481b11cbd212c0504db49d9684ea9eeeb (diff) | |
| download | farside-3c776d55b0cab56f94cb02c1284b945fc3ba8e45.tar.gz | |
Auto update bibliogram instances w/ instance api
Closes #57
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/update-instances.yml | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/.github/workflows/update-instances.yml b/.github/workflows/update-instances.yml index c77c551..69dcea4 100644 --- a/.github/workflows/update-instances.yml +++ b/.github/workflows/update-instances.yml @@ -48,7 +48,7 @@ jobs: done <$file # Remove any trailing commas from new instance lists - sed -i '' -e ':begin' -e '$!N' -e 's/,\n]/\n]/g' -e 'tbegin' -e 'P' -e 'D' out.json + sed -e ':begin' -e '$!N' -e 's/,\n]/\n]/g' -e 'tbegin' -e 'P' -e 'D' out.json cat out.json | jq --indent 2 . > services.json rm -f out.json @@ -63,6 +63,22 @@ jobs: git checkout main # ============================================================== + # Bibliogram update + # ============================================================== + curl -s https://bibliogram.art/api/instances | \ + jq '[ + .data | + .[] | + select(.onion_site | not) | + .address + ] | sort' > bibliogram-tmp.json + jq --slurpfile bibliogram bibliogram-tmp.json \ + '( .[] | select(.type == "bibliogram") ) + .instances |= $bibliogram[0]' services-full.json > services-tmp.json + + apply_update + + # ============================================================== # searx update # ============================================================== curl -s https://searx.space/data/instances.json | \ |
