5
5
mirror of https://github.com/trueChristian/daily-light.git synced 2024-11-28 23:16:27 +00:00

Updated the json link values.

This commit is contained in:
Llewellyn van der Merwe 2023-04-07 04:49:37 +02:00
parent 8d18799423
commit 8aaa380401
Signed by: Llewellyn
GPG Key ID: A9201372263741E7
2 changed files with 19 additions and 8 deletions

View File

@ -21,6 +21,7 @@
"Deut 33:27" "Deut 33:27"
] ]
}, },
"joomla": "https://git.vdm.dev/christian/mod_dailylight",
"morning": { "morning": {
"body": [ "body": [
"We ... rejoice in hope of the glory of God. And not only so, but we glory in tribulations also. -- I am filled with comfort, I am exceeding joyful in all our tribulation. -- Believing, ye rejoice with joy unspeakable and full of glory.", "We ... rejoice in hope of the glory of God. And not only so, but we glory in tribulations also. -- I am filled with comfort, I am exceeding joyful in all our tribulation. -- Believing, ye rejoice with joy unspeakable and full of glory.",
@ -40,5 +41,5 @@
] ]
}, },
"source": "https://github.com/trueChristian/daily-light", "source": "https://github.com/trueChristian/daily-light",
"telegram": "https://t.me/s/daily_light" "telegram": "daily_light"
} }

View File

@ -13,6 +13,7 @@ command -v git >/dev/null 2>&1 || {
#█████████████████████████████████████████████████████████████████ GLOBALS ███ #█████████████████████████████████████████████████████████████████ GLOBALS ███
# global config options # global config options
DRY_RUN=0 DRY_RUN=0
DO_GIT=1
# the date # the date
TODAY=$(TZ="Africa/Windhoek" date '+%B-%d') TODAY=$(TZ="Africa/Windhoek" date '+%B-%d')
TODAY_DATE=$(TZ="Africa/Windhoek" date '+%A %d-%B, %Y') TODAY_DATE=$(TZ="Africa/Windhoek" date '+%A %d-%B, %Y')
@ -24,6 +25,9 @@ while :; do
--dry) --dry)
DRY_RUN=1 DRY_RUN=1
;; ;;
--git-off)
DO_GIT=0
;;
-t | --today) # Takes an option argument; ensure it has been specified. -t | --today) # Takes an option argument; ensure it has been specified.
if [ "$2" ]; then if [ "$2" ]; then
TODAY=$2 TODAY=$2
@ -181,15 +185,17 @@ JSON="$(
--arg date_key "$DATE_KEY" \ --arg date_key "$DATE_KEY" \
--argjson morning "$MORNING_JSON" \ --argjson morning "$MORNING_JSON" \
--argjson evening "$EVENING_JSON" \ --argjson evening "$EVENING_JSON" \
--arg telegram "https://t.me/s/daily_light" \ --arg telegram "daily_light" \
--arg source "https://github.com/trueChristian/daily-light" ' --arg source "https://github.com/trueChristian/daily-light" \
--arg joomla "https://git.vdm.dev/christian/mod_dailylight" '
{ {
date_name: $date_name, date_name: $date_name,
date_key: $date_key, date_key: $date_key,
morning: $morning, morning: $morning,
evening: $evening, evening: $evening,
telegram: $telegram, telegram: $telegram,
source: $source source: $source,
joomla: $joomla
} }
' '
)" )"
@ -239,8 +245,12 @@ else
jq <<<"$JSON" -S . >README.json jq <<<"$JSON" -S . >README.json
#██████████████████████████████████████████████████████████████ UPDATE GIT ███
if (("$DO_GIT" == 1)); then
git add .
git commit -am"${TODAY_DATE}" git commit -am"${TODAY_DATE}"
git push git push
fi fi
fi
exit 0 exit 0