Merge pull request #8 from kiwix/feature/1-dwds-about-url

Move about website,  and about text from xcconfig to info.json
This commit is contained in:
BPH 2023-12-14 22:40:38 +01:00 committed by GitHub
commit e76fe06daf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 7 deletions

View File

@ -1,10 +1,6 @@
// Copyright © 2023 Kiwix. All rights reserved.
// Configuration settings file format documentation can be found at:
// https://help.apple.com/xcode/#/dev745c5c974
SETTINGS_DEFAULT_EXTERNAL_LINK_TO = alwaysLoad
SETTINGS_SHOW_EXTERNAL_LINK_OPTION = false
APP_STORE_ID = id6473090365
SETTINGS_SHOW_SEARCH_SNIPPET = false
CUSTOM_ABOUT_TEXT = Für Schreibende, Lernende, Lehrende und Sprachinteressierte: Das Digitale Wörterbuch der deutschen Sprache (DWDS) ist das große Bedeutungswörterbuch des Deutschen der Gegenwart. Es bietet umfassende und wissenschaftlich verlässliche lexikalische Informationen, kostenlos und werbefrei.
CUSTOM_ABOUT_WEBSITE = www.dwds.de
SETTINGS_SHOW_SEARCH_SNIPPET = false

View File

@ -2,5 +2,7 @@
"app_name": "DWDS",
"zim_url": "https://www.dwds.de/kiwix/f/dwds_de_dictionary_nopic_2023-11-20.zim",
"zim_auth": "DWDS_HTTP_BASIC_ACCESS_AUTHENTICATION",
"enforced_lang": "de"
"enforced_lang": "de",
"about_app_url": "www.dwds.de",
"about_text": "Für Schreibende, Lernende, Lehrende und Sprachinteressierte: Das Digitale Wörterbuch der deutschen Sprache (DWDS) ist das große Bedeutungswörterbuch des Deutschen der Gegenwart. Es bietet umfassende und wissenschaftlich verlässliche lexikalische Informationen, kostenlos und werbefrei."
}

View File

@ -19,13 +19,17 @@ do
url=`jq .zim_url -r $info`
auth=`jq .zim_auth -r $info`
about_url=`jq .about_app_url -r $info`
about_text=`jq .about_text -r $info`
parent_url=${url%/*}
file_name=${url:${#parent_url} + 1} # + 1 to remove the trailing slash
auth_value=`print -rl -- ${(P)auth}` # get the credentials from environment var named by .zim_auth in the json
curl -O -L $url -u "$auth_value" $parent_dir/$file_name
echo "CUSTOM_ZIM_FILE = "${file_name%.zim} > apple/$brand_name/$brand_name.xcconfig
echo "CUSTOM_ZIM_FILE = "${file_name%.zim}"\n" > apple/$brand_name/$brand_name.xcconfig
echo "CUSTOM_ABOUT_WEBSITE = "${about_url}"\n" > apple/$brand_name/$brand_name.xcconfig
echo "CUSTOM_ABOUT_TEXT = "${about_text}"\n" > apple/$brand_name/$brand_name.xcconfig
done
# download libkiwix xcframework