From 6f507ccb59ef048c662f777ad8239b2d67422c9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20M=C3=A9a?= Date: Wed, 8 Apr 2026 17:31:00 -0400 Subject: [PATCH 1/2] Module Store listing gen > add config/agency_type --- shared-modules/MTREADME.md.MT.sh | 10 ++++++++++ .../en-US/MTfull-description.txt.MT.sh | 18 ++++++++++++++---- .../en-US/MTshort-description.txt.MT.sh | 10 ++++++++++ .../main/play/listings/en-US/MTtitle.txt.MT.sh | 10 ++++++++++ .../graphics/feature-graphic/MT1.png.MT.sh | 2 +- .../fr-FR/MTfull-description.txt.MT.sh | 8 ++++---- .../res/values/MTgtfs_rts_strings.xml.MT.sh | 10 ++++++++++ .../src/main/res/values/MTstrings.xml.MT.sh | 10 ++++++++++ shared-modules/gh_repo_update_details.sh | 10 ++++++++++ 9 files changed, 79 insertions(+), 9 deletions(-) diff --git a/shared-modules/MTREADME.md.MT.sh b/shared-modules/MTREADME.md.MT.sh index 05e27076..01287473 100755 --- a/shared-modules/MTREADME.md.MT.sh +++ b/shared-modules/MTREADME.md.MT.sh @@ -112,6 +112,16 @@ else exit 1 # error fi +AGENCY_TYPE_FILE="${CONFIG_DIR}/agency_type"; +if [ ! -f "$AGENCY_TYPE_FILE" ]; then + echo "$AGENCY_TYPE_FILE doesn't exist!"; +else + AGENCY_TYPE_SHORT=$(head -n 1 $AGENCY_TYPE_FILE); + if [ -n "$AGENCY_TYPE_SHORT" ]; then + TYPE_LABEL="$AGENCY_TYPE_SHORT"; + fi +fi + cat >>"${README_FILE}" < # $AGENCY_LABEL $TYPE_LABEL for [MonTransit](https://github.com/mtransitapps/mtransit-for-android) diff --git a/shared-modules/app-android/src/main/play/listings/en-US/MTfull-description.txt.MT.sh b/shared-modules/app-android/src/main/play/listings/en-US/MTfull-description.txt.MT.sh index 76a1c0c0..c29ce661 100755 --- a/shared-modules/app-android/src/main/play/listings/en-US/MTfull-description.txt.MT.sh +++ b/shared-modules/app-android/src/main/play/listings/en-US/MTfull-description.txt.MT.sh @@ -226,6 +226,16 @@ else exit 1 # error fi +AGENCY_TYPE_FILE="${CONFIG_DIR}/agency_type"; +if [ ! -f "$AGENCY_TYPE_FILE" ]; then + echo "$AGENCY_TYPE_FILE doesn't exist!"; +else + AGENCY_TYPE_SHORT=$(head -n 1 $AGENCY_TYPE_FILE); + if [ -n "$AGENCY_TYPE_SHORT" ]; then + TYPE_LABEL="$AGENCY_TYPE_SHORT"; + fi +fi + PROVIDES_LINE="This app provides the $TYPE_LABEL"; INFORMATION_LIST=""; @@ -255,7 +265,7 @@ YOUTUBE_FILE="${VALUES_DIR}/youtube_values.xml"; if [[ -f "${RSS_FILE}" || -f "${TWITTER_FILE}" || -f "${YOUTUBE_FILE}" ]]; then if [ -z "$PROVIDES_LINE_END" ]; then PROVIDES_LINE_END="${PROVIDES_LINE_END} and"; - else + else PROVIDES_LINE_END="${PROVIDES_LINE_END},"; fi PROVIDES_LINE_END="${PROVIDES_LINE_END} news"; @@ -338,7 +348,7 @@ if [ -f "${GTFS_RT_FILE}" ]; then RT_LINE=" real-time${RT_LINE}"; if [ -z "$PROVIDES_LINE_END" ]; then PROVIDES_LINE_END=" and${RT_LINE}${PROVIDES_LINE_END}"; - else + else PROVIDES_LINE_END=",${RT_LINE}${PROVIDES_LINE_END}"; fi fi @@ -398,7 +408,7 @@ if [ -f "${GTFS_RT_FILE}" ]; then echo "Permissions:" >> "${FULL_DESCRIPTION_FILE}"; checkResult $?; PERMISSIONS_LINE="- Other: required to download"; - else + else PERMISSIONS_LINE="${PERMISSIONS_LINE} and"; fi PERMISSIONS_LINE="${PERMISSIONS_LINE} real-time service alerts"; @@ -409,7 +419,7 @@ if [[ -f "${RSS_FILE}" || -f "${TWITTER_FILE}" || -f "${YOUTUBE_FILE}" ]]; then echo "Permissions:" >> "${FULL_DESCRIPTION_FILE}"; checkResult $?; PERMISSIONS_LINE="- Other: required to download"; - else + else PERMISSIONS_LINE="${PERMISSIONS_LINE} and"; fi PERMISSIONS_LINE="${PERMISSIONS_LINE} news"; diff --git a/shared-modules/app-android/src/main/play/listings/en-US/MTshort-description.txt.MT.sh b/shared-modules/app-android/src/main/play/listings/en-US/MTshort-description.txt.MT.sh index 665aa0dc..4f17e8f7 100755 --- a/shared-modules/app-android/src/main/play/listings/en-US/MTshort-description.txt.MT.sh +++ b/shared-modules/app-android/src/main/play/listings/en-US/MTshort-description.txt.MT.sh @@ -103,6 +103,16 @@ else exit 1 # error fi +AGENCY_TYPE_FILE="${CONFIG_DIR}/agency_type"; +if [ ! -f "$AGENCY_TYPE_FILE" ]; then + echo "$AGENCY_TYPE_FILE doesn't exist!"; +else + AGENCY_TYPE_SHORT=$(head -n 1 $AGENCY_TYPE_FILE); + if [ -n "$AGENCY_TYPE_SHORT" ]; then + TYPE_LABEL="$AGENCY_TYPE_SHORT"; + fi +fi + SHORT_DESC="$AGENCY_NAME_LONG $TYPE_LABEL for MonTransit."; if [ -n "$AGENCY_LOCATION_SHORT" ]; then diff --git a/shared-modules/app-android/src/main/play/listings/en-US/MTtitle.txt.MT.sh b/shared-modules/app-android/src/main/play/listings/en-US/MTtitle.txt.MT.sh index b6ddbeea..d84a6b59 100755 --- a/shared-modules/app-android/src/main/play/listings/en-US/MTtitle.txt.MT.sh +++ b/shared-modules/app-android/src/main/play/listings/en-US/MTtitle.txt.MT.sh @@ -106,6 +106,16 @@ else exit 1 # error fi +AGENCY_TYPE_FILE="${CONFIG_DIR}/agency_type"; +if [ ! -f "$AGENCY_TYPE_FILE" ]; then + echo "$AGENCY_TYPE_FILE doesn't exist!"; +else + AGENCY_TYPE_SHORT=$(head -n 1 $AGENCY_TYPE_FILE); + if [ -n "$AGENCY_TYPE_SHORT" ]; then + TYPE_LABEL="$AGENCY_TYPE_SHORT"; + fi +fi + MAX_LENGTH=30; TYPE_LABEL_MIN_LENGTH=3; # ${#TYPE_LABEL} diff --git a/shared-modules/app-android/src/main/play/listings/en-US/graphics/feature-graphic/MT1.png.MT.sh b/shared-modules/app-android/src/main/play/listings/en-US/graphics/feature-graphic/MT1.png.MT.sh index 77e8c4cc..123af642 100755 --- a/shared-modules/app-android/src/main/play/listings/en-US/graphics/feature-graphic/MT1.png.MT.sh +++ b/shared-modules/app-android/src/main/play/listings/en-US/graphics/feature-graphic/MT1.png.MT.sh @@ -134,7 +134,7 @@ CITIES_LABEL=$(echo $CITIES_LABEL | awk -v len=$MAX_CITY_LENGTH '{ if (length($0 if [[ -z "${AGENCY_NAME_2}" ]]; then $ROOT_DIR/commons-android/pub/module-featured-graphic.sh "$AGENCY_NAME_1" "$CITIES_LABEL" "$STATE_AND_COUNTRY_LABEL"; checkResult $?; -else +else $ROOT_DIR/commons-android/pub/module-featured-graphic.sh "$AGENCY_NAME_1" "$AGENCY_NAME_2" "$CITIES_LABEL" "$STATE_AND_COUNTRY_LABEL"; checkResult $?; fi diff --git a/shared-modules/app-android/src/main/play/listings/fr-FR/MTfull-description.txt.MT.sh b/shared-modules/app-android/src/main/play/listings/fr-FR/MTfull-description.txt.MT.sh index ede7eab8..76f93c3e 100755 --- a/shared-modules/app-android/src/main/play/listings/fr-FR/MTfull-description.txt.MT.sh +++ b/shared-modules/app-android/src/main/play/listings/fr-FR/MTfull-description.txt.MT.sh @@ -267,7 +267,7 @@ YOUTUBE_FILE="${VALUES_DIR}/youtube_values.xml"; if [[ -f "${RSS_FILE}" || -f "${TWITTER_FILE}" || -f "${YOUTUBE_FILE}" ]]; then if [ -z "$PROVIDES_LINE_END" ]; then PROVIDES_LINE_END="${PROVIDES_LINE_END} et"; - else + else PROVIDES_LINE_END="${PROVIDES_LINE_END},"; fi PROVIDES_LINE_END="${PROVIDES_LINE_END} les nouvelles"; @@ -350,7 +350,7 @@ if [ -f "${GTFS_RT_FILE}" ]; then RT_LINE="${RT_LINE} en temps-réel"; if [ -z "$PROVIDES_LINE_END" ]; then PROVIDES_LINE_END=" et${RT_LINE}${PROVIDES_LINE_END}"; - else + else PROVIDES_LINE_END=",${RT_LINE}${PROVIDES_LINE_END}"; fi fi @@ -410,7 +410,7 @@ if [ -f "${GTFS_RT_FILE}" ]; then echo "Autorisations :" >> "${FULL_DESCRIPTION_FILE}"; checkResult $?; PERMISSIONS_LINE="- Autres : requis pour le téléchargement des"; - else + else PERMISSIONS_LINE="${PERMISSIONS_LINE} et des"; fi PERMISSIONS_LINE="${PERMISSIONS_LINE} alertes de service en temps-réel"; @@ -421,7 +421,7 @@ if [[ -f "${RSS_FILE}" || -f "${TWITTER_FILE}" || -f "${YOUTUBE_FILE}" ]]; then echo "Autorisations :" >> "${FULL_DESCRIPTION_FILE}"; checkResult $?; PERMISSIONS_LINE="- Autres : requis pour le téléchargement des"; - else + else PERMISSIONS_LINE="${PERMISSIONS_LINE} et des"; fi PERMISSIONS_LINE="${PERMISSIONS_LINE} nouvelles"; diff --git a/shared-modules/app-android/src/main/res/values/MTgtfs_rts_strings.xml.MT.sh b/shared-modules/app-android/src/main/res/values/MTgtfs_rts_strings.xml.MT.sh index 1b3c5728..e0d39abe 100755 --- a/shared-modules/app-android/src/main/res/values/MTgtfs_rts_strings.xml.MT.sh +++ b/shared-modules/app-android/src/main/res/values/MTgtfs_rts_strings.xml.MT.sh @@ -96,6 +96,16 @@ else exit 1 # error fi +AGENCY_TYPE_FILE="${CONFIG_DIR}/agency_type"; +if [ ! -f "$AGENCY_TYPE_FILE" ]; then + echo "$AGENCY_TYPE_FILE doesn't exist!"; +else + AGENCY_TYPE_SHORT=$(head -n 1 $AGENCY_TYPE_FILE); + if [ -n "$AGENCY_TYPE_SHORT" ]; then + TYPE_LABEL="$AGENCY_TYPE_SHORT"; + fi +fi + cat >>"${GTFS_RTS_STRINGS_FILE}" < diff --git a/shared-modules/app-android/src/main/res/values/MTstrings.xml.MT.sh b/shared-modules/app-android/src/main/res/values/MTstrings.xml.MT.sh index 58960722..fe010089 100755 --- a/shared-modules/app-android/src/main/res/values/MTstrings.xml.MT.sh +++ b/shared-modules/app-android/src/main/res/values/MTstrings.xml.MT.sh @@ -95,6 +95,16 @@ else exit 1 # error fi +AGENCY_TYPE_FILE="${CONFIG_DIR}/agency_type"; +if [ ! -f "$AGENCY_TYPE_FILE" ]; then + echo "$AGENCY_TYPE_FILE doesn't exist!"; +else + AGENCY_TYPE_SHORT=$(head -n 1 $AGENCY_TYPE_FILE); + if [ -n "$AGENCY_TYPE_SHORT" ]; then + TYPE_LABEL="$AGENCY_TYPE_SHORT"; + fi +fi + AGENCY_LOCATION_SHORT="" # optional AGENCY_LOCATION_FILE="${CONFIG_DIR}/agency_location"; if [ -f "$AGENCY_LOCATION_FILE" ]; then diff --git a/shared-modules/gh_repo_update_details.sh b/shared-modules/gh_repo_update_details.sh index d8c2b76e..5b274efe 100755 --- a/shared-modules/gh_repo_update_details.sh +++ b/shared-modules/gh_repo_update_details.sh @@ -105,6 +105,16 @@ else exit 1 # error fi +AGENCY_TYPE_FILE="${CONFIG_DIR}/agency_type"; +if [ ! -f "$AGENCY_TYPE_FILE" ]; then + echo "$AGENCY_TYPE_FILE doesn't exist!"; +else + AGENCY_TYPE_SHORT=$(head -n 1 $AGENCY_TYPE_FILE); + if [ -n "$AGENCY_TYPE_SHORT" ]; then + TYPE_LABEL="$AGENCY_TYPE_SHORT"; + fi +fi + REPO_DESC="$AGENCY_LABEL $TYPE_LABEL for MonTransit" REPO_URL="https://play.google.com/store/apps/details?id=$PKG" From d218ac9ae1217b977a11a45ef574bf9996413627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20M=C3=A9a?= Date: Wed, 8 Apr 2026 17:42:22 -0400 Subject: [PATCH 2/2] PR comments --- shared-modules/MTREADME.md.MT.sh | 6 ++---- .../play/listings/en-US/MTfull-description.txt.MT.sh | 12 +++++------- .../listings/en-US/MTshort-description.txt.MT.sh | 12 +++++------- .../src/main/play/listings/en-US/MTtitle.txt.MT.sh | 12 +++++------- .../src/main/res/values/MTgtfs_rts_strings.xml.MT.sh | 12 +++++------- .../src/main/res/values/MTstrings.xml.MT.sh | 12 +++++------- shared-modules/gh_repo_update_details.sh | 6 ++---- 7 files changed, 29 insertions(+), 43 deletions(-) diff --git a/shared-modules/MTREADME.md.MT.sh b/shared-modules/MTREADME.md.MT.sh index 01287473..1148c9d4 100755 --- a/shared-modules/MTREADME.md.MT.sh +++ b/shared-modules/MTREADME.md.MT.sh @@ -113,10 +113,8 @@ else fi AGENCY_TYPE_FILE="${CONFIG_DIR}/agency_type"; -if [ ! -f "$AGENCY_TYPE_FILE" ]; then - echo "$AGENCY_TYPE_FILE doesn't exist!"; -else - AGENCY_TYPE_SHORT=$(head -n 1 $AGENCY_TYPE_FILE); +if [ -f "$AGENCY_TYPE_FILE" ]; then + AGENCY_TYPE_SHORT=$(head -n 1 "$AGENCY_TYPE_FILE"); if [ -n "$AGENCY_TYPE_SHORT" ]; then TYPE_LABEL="$AGENCY_TYPE_SHORT"; fi diff --git a/shared-modules/app-android/src/main/play/listings/en-US/MTfull-description.txt.MT.sh b/shared-modules/app-android/src/main/play/listings/en-US/MTfull-description.txt.MT.sh index c29ce661..c566d543 100755 --- a/shared-modules/app-android/src/main/play/listings/en-US/MTfull-description.txt.MT.sh +++ b/shared-modules/app-android/src/main/play/listings/en-US/MTfull-description.txt.MT.sh @@ -227,13 +227,11 @@ else fi AGENCY_TYPE_FILE="${CONFIG_DIR}/agency_type"; -if [ ! -f "$AGENCY_TYPE_FILE" ]; then - echo "$AGENCY_TYPE_FILE doesn't exist!"; -else - AGENCY_TYPE_SHORT=$(head -n 1 $AGENCY_TYPE_FILE); - if [ -n "$AGENCY_TYPE_SHORT" ]; then - TYPE_LABEL="$AGENCY_TYPE_SHORT"; - fi +if [ -f "$AGENCY_TYPE_FILE" ]; then + AGENCY_TYPE_SHORT=$(head -n 1 "$AGENCY_TYPE_FILE"); + if [ -n "$AGENCY_TYPE_SHORT" ]; then + TYPE_LABEL="$AGENCY_TYPE_SHORT"; + fi fi PROVIDES_LINE="This app provides the $TYPE_LABEL"; diff --git a/shared-modules/app-android/src/main/play/listings/en-US/MTshort-description.txt.MT.sh b/shared-modules/app-android/src/main/play/listings/en-US/MTshort-description.txt.MT.sh index 4f17e8f7..287a7058 100755 --- a/shared-modules/app-android/src/main/play/listings/en-US/MTshort-description.txt.MT.sh +++ b/shared-modules/app-android/src/main/play/listings/en-US/MTshort-description.txt.MT.sh @@ -104,13 +104,11 @@ else fi AGENCY_TYPE_FILE="${CONFIG_DIR}/agency_type"; -if [ ! -f "$AGENCY_TYPE_FILE" ]; then - echo "$AGENCY_TYPE_FILE doesn't exist!"; -else - AGENCY_TYPE_SHORT=$(head -n 1 $AGENCY_TYPE_FILE); - if [ -n "$AGENCY_TYPE_SHORT" ]; then - TYPE_LABEL="$AGENCY_TYPE_SHORT"; - fi +if [ -f "$AGENCY_TYPE_FILE" ]; then + AGENCY_TYPE_SHORT=$(head -n 1 "$AGENCY_TYPE_FILE"); + if [ -n "$AGENCY_TYPE_SHORT" ]; then + TYPE_LABEL="$AGENCY_TYPE_SHORT"; + fi fi SHORT_DESC="$AGENCY_NAME_LONG $TYPE_LABEL for MonTransit."; diff --git a/shared-modules/app-android/src/main/play/listings/en-US/MTtitle.txt.MT.sh b/shared-modules/app-android/src/main/play/listings/en-US/MTtitle.txt.MT.sh index d84a6b59..53c1c246 100755 --- a/shared-modules/app-android/src/main/play/listings/en-US/MTtitle.txt.MT.sh +++ b/shared-modules/app-android/src/main/play/listings/en-US/MTtitle.txt.MT.sh @@ -107,13 +107,11 @@ else fi AGENCY_TYPE_FILE="${CONFIG_DIR}/agency_type"; -if [ ! -f "$AGENCY_TYPE_FILE" ]; then - echo "$AGENCY_TYPE_FILE doesn't exist!"; -else - AGENCY_TYPE_SHORT=$(head -n 1 $AGENCY_TYPE_FILE); - if [ -n "$AGENCY_TYPE_SHORT" ]; then - TYPE_LABEL="$AGENCY_TYPE_SHORT"; - fi +if [ -f "$AGENCY_TYPE_FILE" ]; then + AGENCY_TYPE_SHORT=$(head -n 1 "$AGENCY_TYPE_FILE"); + if [ -n "$AGENCY_TYPE_SHORT" ]; then + TYPE_LABEL="$AGENCY_TYPE_SHORT"; + fi fi MAX_LENGTH=30; diff --git a/shared-modules/app-android/src/main/res/values/MTgtfs_rts_strings.xml.MT.sh b/shared-modules/app-android/src/main/res/values/MTgtfs_rts_strings.xml.MT.sh index e0d39abe..f60dba07 100755 --- a/shared-modules/app-android/src/main/res/values/MTgtfs_rts_strings.xml.MT.sh +++ b/shared-modules/app-android/src/main/res/values/MTgtfs_rts_strings.xml.MT.sh @@ -97,13 +97,11 @@ else fi AGENCY_TYPE_FILE="${CONFIG_DIR}/agency_type"; -if [ ! -f "$AGENCY_TYPE_FILE" ]; then - echo "$AGENCY_TYPE_FILE doesn't exist!"; -else - AGENCY_TYPE_SHORT=$(head -n 1 $AGENCY_TYPE_FILE); - if [ -n "$AGENCY_TYPE_SHORT" ]; then - TYPE_LABEL="$AGENCY_TYPE_SHORT"; - fi +if [ -f "$AGENCY_TYPE_FILE" ]; then + AGENCY_TYPE_SHORT=$(head -n 1 "$AGENCY_TYPE_FILE"); + if [ -n "$AGENCY_TYPE_SHORT" ]; then + TYPE_LABEL="$AGENCY_TYPE_SHORT"; + fi fi cat >>"${GTFS_RTS_STRINGS_FILE}" <