add extensions inspector
This commit is contained in:
parent
56315b4afa
commit
0b04788245
23
.github/scripts/create-repo.sh
vendored
23
.github/scripts/create-repo.sh
vendored
@ -21,6 +21,8 @@ for APK in ${APKS[@]}; do
|
|||||||
VCODE=$(echo $PACKAGE | grep -Po "versionCode='\K[^']+")
|
VCODE=$(echo $PACKAGE | grep -Po "versionCode='\K[^']+")
|
||||||
VNAME=$(echo $PACKAGE | grep -Po "versionName='\K[^']+")
|
VNAME=$(echo $PACKAGE | grep -Po "versionName='\K[^']+")
|
||||||
NSFW=$(echo $BADGING | grep -Po "tachiyomi.animeextension.nsfw' value='\K[^']+")
|
NSFW=$(echo $BADGING | grep -Po "tachiyomi.animeextension.nsfw' value='\K[^']+")
|
||||||
|
HASREADME=$(echo $BADGING | grep -Po "tachiyomi.animeextension.hasReadme' value='\K[^']+")
|
||||||
|
HASCHANGELOG=$(echo $BADGING | grep -Po "tachiyomi.animeextension.hasChangelog' value='\K[^']+")
|
||||||
|
|
||||||
APPLICATION=$(echo "$BADGING" | grep application:)
|
APPLICATION=$(echo "$BADGING" | grep application:)
|
||||||
LABEL=$(echo $APPLICATION | grep -Po "label='\K[^']+")
|
LABEL=$(echo $APPLICATION | grep -Po "label='\K[^']+")
|
||||||
@ -30,6 +32,19 @@ for APK in ${APKS[@]}; do
|
|||||||
ICON=$(echo "$BADGING" | grep -Po "application-icon-320.*'\K[^']+")
|
ICON=$(echo "$BADGING" | grep -Po "application-icon-320.*'\K[^']+")
|
||||||
unzip -p $APK $ICON > icon/${FILENAME%.*}.png
|
unzip -p $APK $ICON > icon/${FILENAME%.*}.png
|
||||||
|
|
||||||
|
SOURCE_INFO=$(jq ".[\"$PKGNAME\"]" < ../output.json)
|
||||||
|
|
||||||
|
# Fixes the language code without needing to update the packages.
|
||||||
|
SOURCE_LEN=$(echo $SOURCE_INFO | jq length)
|
||||||
|
|
||||||
|
if [ $SOURCE_LEN = "1" ]; then
|
||||||
|
SOURCE_LANG=$(echo $SOURCE_INFO | jq -r '.[0].lang')
|
||||||
|
|
||||||
|
if [ $SOURCE_LANG != $LANG ] && [ $SOURCE_LANG != "all" ] && [ $SOURCE_LANG != "other" ] && [ $LANG != "all" ] && [ $LANG != "other" ]; then
|
||||||
|
LANG=$SOURCE_LANG
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
jq -n \
|
jq -n \
|
||||||
--arg name "$LABEL" \
|
--arg name "$LABEL" \
|
||||||
--arg pkg "$PKGNAME" \
|
--arg pkg "$PKGNAME" \
|
||||||
@ -38,14 +53,14 @@ for APK in ${APKS[@]}; do
|
|||||||
--argjson code $VCODE \
|
--argjson code $VCODE \
|
||||||
--arg version "$VNAME" \
|
--arg version "$VNAME" \
|
||||||
--argjson nsfw $NSFW \
|
--argjson nsfw $NSFW \
|
||||||
'{name:$name, pkg:$pkg, apk:$apk, lang:$lang, code:$code, version:$version, nsfw:$nsfw}'
|
--argjson hasReadme $HASREADME \
|
||||||
|
--argjson hasChangelog $HASCHANGELOG \
|
||||||
|
--argjson sources "$SOURCE_INFO" \
|
||||||
|
'{name:$name, pkg:$pkg, apk:$apk, lang:$lang, code:$code, version:$version, nsfw:$nsfw, hasReadme:$hasReadme, hasChangelog:$hasChangelog, sources:$sources}'
|
||||||
|
|
||||||
done | jq -sr '[.[]]' > index.json
|
done | jq -sr '[.[]]' > index.json
|
||||||
|
|
||||||
# Alternate minified copy
|
# Alternate minified copy
|
||||||
jq -c '.' < index.json > index.min.json
|
jq -c '.' < index.json > index.min.json
|
||||||
|
|
||||||
# Alternate gzipped copy
|
|
||||||
gzip -c index.json > index.json.gz
|
|
||||||
|
|
||||||
cat index.json
|
cat index.json
|
3
.github/workflows/build_push.yml
vendored
3
.github/workflows/build_push.yml
vendored
@ -207,6 +207,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd master
|
cd master
|
||||||
./.github/scripts/move-apks.sh
|
./.github/scripts/move-apks.sh
|
||||||
|
INSPECTOR_LINK="$(curl -s "https://api.github.com/repos/jmir1/aniyomi-extensions-inspector/releases/latest" | jq -r '.assets[0].browser_download_url')"
|
||||||
|
curl -L "$INSPECTOR_LINK" -o ./Inspector.jar
|
||||||
|
java -jar ./Inspector.jar "apk" "output.json" "tmp"
|
||||||
./.github/scripts/create-repo.sh
|
./.github/scripts/create-repo.sh
|
||||||
|
|
||||||
- name: Checkout repo branch
|
- name: Checkout repo branch
|
||||||
|
Loading…
x
Reference in New Issue
Block a user