1
0
Fork 0
mirror of https://github.com/benbusby/farside.git synced 2025-04-25 13:10:02 +00:00

Auto update teddit and Scribe instances (#15)

This commit is contained in:
Austin Huang 2022-02-03 17:10:48 -05:00 committed by GitHub
parent 87b1e15c77
commit 2cd82adeb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,7 +38,6 @@ jobs:
# ==============================================================
# Searx update
# ==============================================================
echo "Fetching searx instances..."
curl -s https://searx.space/data/instances.json | \
jq '[
.instances |
@ -63,7 +62,7 @@ jobs:
apply_update
# ==============================================================
# Simply Translate update
# SimplyTranslate update
# ==============================================================
curl -s https://simple-web.org/instances/simplytranslate > st-out
sed -i -e 's/^/https:\/\//' st-out
@ -102,6 +101,31 @@ jobs:
apply_update
# ==============================================================
# Scribe update
# ==============================================================
curl -s https://git.sr.ht/~edwardloveall/scribe/blob/main/docs/instances.json > scribe-tmp.json
jq --slurpfile scribe scribe-tmp.json \
'( .[] | select(.type == "scribe") )
.instances |= $scribe[0]' services.json > services-tmp.json
apply_update
# ==============================================================
# teddit update
# ==============================================================
curl -s https://codeberg.org/teddit/teddit/raw/branch/main/instances.json | \
jq '[
.[] |
select(.url | contains("https")) |
.url ] |
sort' > teddit-tmp.json
jq --slurpfile teddit teddit-tmp.json \
'( .[] | select(.type == "teddit") )
.instances |= $teddit[0]' services.json > services-tmp.json
apply_update
# ==============================================================
# TODO: Update instances for other services
# ==============================================================