mirror of
https://git.ari.lt/ari.lt/ari.lt.git
synced 2025-02-04 17:49:24 +01:00
Improve apis.json, add externap apis
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
This commit is contained in:
parent
109ade9841
commit
b465a4f593
2 changed files with 10 additions and 2 deletions
4
api/external_apis.json
Normal file
4
api/external_apis.json
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
[
|
||||||
|
"https://blog.ari-web.xyz/blog.json",
|
||||||
|
"https://files.ari-web.xyz/files.json"
|
||||||
|
]
|
|
@ -10,12 +10,16 @@ mkdata() {
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
printf ' * %s... ' 'Generating api list'
|
printf ' * %s... ' 'Generating api list'
|
||||||
|
apid='api'
|
||||||
|
apis="$apid/apis.json"
|
||||||
|
eapis="$apid/external_apis.json"
|
||||||
|
|
||||||
|
# shellcheck disable=SC2094
|
||||||
{
|
{
|
||||||
printf '%s' '{"desc":"Ari-web API list","data":['
|
printf '%s' '{"desc":"Ari-web API list","data":['
|
||||||
find api -type f -exec basename {} \; | mkdata
|
find api -type f -exec basename {} \; | mkdata
|
||||||
echo '"."]}'
|
echo "\"$(basename "$apis")\"],\"external\":$(cat -- "$eapis" | tr -d ' \n')}"
|
||||||
} >api/apis.json
|
} >"$apis"
|
||||||
|
|
||||||
echo 'done'
|
echo 'done'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue