From 3f15f13d6c3aacbc889aa6c798057769cefe83a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Kydl=C3=AD=C4=8Dek?= Date: Wed, 24 Apr 2024 15:22:48 +0200 Subject: [PATCH] "Added static sites - agent orange, habibi" --- zradylko.sh | 57 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 53 insertions(+), 4 deletions(-) diff --git a/zradylko.sh b/zradylko.sh index ffe4d32..cd26204 100755 --- a/zradylko.sh +++ b/zradylko.sh @@ -69,15 +69,64 @@ get_zradylko() { },' } -# Example usage: +get_habibi() { + local url="$1" + local commonName="$2" + local icon="$3" + + # Create a JSON object with the desired fields + # shellcheck disable=SC2016 + output=''${output}' + { + "title": "**'"$commonName"'**", + "author": { + "name": "'"$commonName"'", + "icon_url": "'"${icon}"'" + }, + "fields": [ + { + "name": "Menu", + "value": "'"https://www.foodora.cz/restaurant/qus9/kebab-house-galerie-slovany?utm_source=google&utm_medium=organic&utm_campaign=google_reserve_place_order_action"'" + } + ] + },' +} + +get_agent_orange() { + local url="$1" + local commonName="$2" + local icon="$3" + + # Create a JSON object with the desired fields + # shellcheck disable=SC2016 + output=''${output}' + { + "title": "**'"$commonName"'**", + "author": { + "name": "'"$commonName"'", + "icon_url": "'"${icon}"'" + }, + "fields": [ + { + "name": "Menu", + "value": "'"https://www.foodora.cz/restaurant/r2xt/bistro-pho-time?utm_source=google&utm_medium=organic&utm_campaign=google_reserve_place_order_action"'" + } + ] + },' +} + urlGarage="https://www.unasplzenchutna.cz/garage/cz/denni-nabidka/" get_zradylko "$urlGarage" "Salieriho bar" "https://png.pngtree.com/png-vector/20240211/ourlarge/pngtree-italy-round-flag-peeling-sticker-transparent-background-vector-png-image_11738118.png" urlSladovnicka="https://sladovnicka.unasplzenchutna.cz/cz/denni-nabidka/" get_zradylko "$urlSladovnicka" "V. pavilón" "https://i0.wp.com/life4you.cz/wp-content/uploads/2022/09/Pilsner-Urquell.png?fit=480%2C480&ssl=1" -# Remove the trailing comma from the menu_data -#output="${output%,}" +get_habibi "Habibi" "Habibi" "https://upload.wikimedia.org/wikipedia/commons/e/ed/Flag_of_the_Islamic_State_of_Iraq_and_the_Levant2.svg" + +get_agent_orange "Agent Orange" "Agent Orange" "https://www.postavy.cz/foto-dila/vietcong-foto.jpg" + +# TODO +# get_microsoft_support # Print the complete menu data -echo "$output" #| jq . \ No newline at end of file +echo "$output" \ No newline at end of file