Added newlines between each meal

This commit is contained in:
Jakub Kydlíček 2024-04-26 14:22:34 +02:00
parent 72544de2c2
commit e32d6b2c56
1 changed files with 11 additions and 8 deletions

View File

@ -43,15 +43,18 @@ get_zradylko() {
;;
esac
main_course_with_newlines=$(echo "$main_course" | sed 's/ Kč/ Kč\\n/g')
weekly_course_with_newlines=$(echo "$main_course" | sed 's/ Kč/ Kč\\n/g')
# Create a JSON object with the desired fields
# shellcheck disable=SC2016
output=''${output}'
{
"title": "**'"$commonName"'**",
"author": {
"name": "'"$restaurant_name"'",
"icon_url": "'"${icon}"'"
},
"name": "'"$restaurant_name"'",
"icon_url": "'"${icon}"'"
},
"fields": [
{
"name": "Polevka",
@ -59,11 +62,11 @@ get_zradylko() {
},
{
"name": "Hlavni chod",
"value": "'"$main_course"'"
"value": "'"$main_course_with_newlines"'"
},
{
"name": "Tydenni nabidka",
"value": "'"$weekly_course"'"
"value": "'"$weekly_course_with_newlines"'"
}
]
},'
@ -80,9 +83,9 @@ get_habibi() {
{
"title": "**'"$commonName"'**",
"author": {
"name": "'"$commonName"'",
"icon_url": "'"${icon}"'"
},
"name": "'"$commonName"'",
"icon_url": "'"${icon}"'"
},
"fields": [
{
"name": "Menu",