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{J6FX~qqR)k&O}Tdff9V9-
zxQXw2NgF5tAwjNPYYIB%e$m&@A2G!|_0;&Snx$gVq-ad^SGI$UH}!6B7syR`djcSn
zNdlq#E(sd=rAYm@vh52UuNhV6eQIbgw|dwT^L+)wyrG{r%<)9h4BpADpHRmEHwC0u
zhi^C8q+2}-SV$K_z_gJapdfc_h6A5CkL#>0Q-V!0gS$0owgvS`OFEV>3v~AM6R!Pq{zJKaPQHQpI%lp`K>q{gM269P&Oh
zzO#*PEn-S^?>msrjM8o^WNu?WOzO>O+K%^hczF02q{W@i{qY8Wg`y?;=1D;G6Y;U?lDu=gIVqdFV|{brA%PgSb0Zs*pdj
zeA1ax8y+R&1>GZ_oOS(11nW(F;g~S}`6`&m<3-ZHXp!J3U^^lJ;_M`?M0`S`^N2TS
zl{hjQE;Kyea3l94l2r&&j&l;y*C{U(=dd+ght=owi&?i#?6c2Gd`QZxRi>LF$!4{v
zc!I6*mAEL-a~$<+%n4OZp;ym~$k?T)nOGl%b>`^zL<}M&B7D~WXr)nKnbaLEamUq#
zPzk%dJUH@h24B*5(jb1lYGr@l85aq~LIi|6UQ!@_eQxWZ$)a*s<*3}dpbBb`K&u`k
zoCT?tGH(XGqUmTsi$&wv7{+t15If^2?|0sr?!w3JuJj1pLslAzHj1_1nf#RyBSsly
z!j_XsR~xwtUt{gj=|j2O{MB1Vu3&YN$0^j3dyec5{w(V!%Q#BxYlFuMI>eKg{7T0L
zZ;O~Y!`V!EtW=b&8UW*hPMyi;Ds;bez8?d$%WVk
zUy2(yCEv=+tT=N|DAiEp{a%BvZ|!<}=S6E-o-cm~>mAEsxk$nvWQEpt=e}J-qfsjm)
UE-)&$xd9C0IsX9d#{5|Pe`qLcKmY&$
literal 0
HcmV?d00001
diff --git a/manifest.toml b/manifest.toml
new file mode 100644
index 0000000..3986789
--- /dev/null
+++ b/manifest.toml
@@ -0,0 +1,61 @@
+#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/manifest.v2.schema.json
+
+packaging_format = 2
+
+id = "open-web-calendar"
+name = "open web calendar"
+description.en = "Embed a web calendar into your own website"
+description.fr = "Intégrez un calendrier Web à votre propre site Web"
+
+version = "1.25~ynh1"
+
+maintainers = ["eric_G"]
+
+[upstream]
+license = "GPL-2.0"
+website = "https://open-web-calendar.hosted.quelltext.eu/"
+demo = "https://open-web-calendar.hosted.quelltext.eu/"
+code = "https://github.com/niccokunzmann/open-web-calendar/"
+
+[integration]
+yunohost = ">= 11.2"
+architectures = "all"
+multi_instance = true
+
+ldap = false
+
+sso = false
+
+disk = "50M"
+ram.build = "50M"
+ram.runtime = "50M"
+
+[install]
+ [install.domain]
+ type = "domain"
+
+ [install.init_main_permission]
+ type = "group"
+ default = "visitors"
+
+[resources]
+
+ [resources.sources]
+
+ [resources.sources.main]
+ url = "https://github.com/niccokunzmann/open-web-calendar/archive/refs/tags/v1.25.tar.gz"
+ sha256 = "cbbd510937f6a7eb4aca68ea1c7d32e656411779aa2f0c597453a09ef87d8de2"
+ autoupdate.strategy = "latest_github_tag"
+
+ [resources.system_user]
+
+ [resources.install_dir]
+
+ [resources.permissions]
+ main.url = "/"
+
+ [resources.ports]
+ main.default = 5000
+
+ [resources.apt]
+ packages = "python3-venv, python3-pip"
diff --git a/scripts/_common.sh b/scripts/_common.sh
new file mode 100644
index 0000000..944a65e
--- /dev/null
+++ b/scripts/_common.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+#=================================================
+# COMMON VARIABLES
+#=================================================
+
+#=================================================
+# PERSONAL HELPERS
+#=================================================
+
+#=================================================
+# EXPERIMENTAL HELPERS
+#=================================================
+
+#=================================================
+# FUTURE OFFICIAL HELPERS
+#=================================================
diff --git a/scripts/backup b/scripts/backup
new file mode 100755
index 0000000..f31d78a
--- /dev/null
+++ b/scripts/backup
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+#=================================================
+# GENERIC START
+#=================================================
+# IMPORT GENERIC HELPERS
+#=================================================
+
+# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
+source ../settings/scripts/_common.sh
+source /usr/share/yunohost/helpers
+
+#=================================================
+# DECLARE DATA AND CONF FILES TO BACKUP
+#=================================================
+ynh_print_info --message="Declaring files to be backed up..."
+
+#=================================================
+# BACKUP THE APP MAIN DIR
+#=================================================
+
+ynh_backup --src_path="$install_dir"
+
+#=================================================
+# SYSTEM CONFIGURATION
+#=================================================
+
+# Backup the nginx configuration
+ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
+
+# Backup the systemd service unit
+ynh_backup --src_path="/etc/systemd/system/$app.service"
+
+#=================================================
+# END OF SCRIPT
+#=================================================
+
+ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
diff --git a/scripts/change_url b/scripts/change_url
new file mode 100644
index 0000000..3233706
--- /dev/null
+++ b/scripts/change_url
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+## this script is only run if actual change to domain/path is detected, if you're here either $domain or $path changed
+## new location is available via $domain and $path (or $new_domain and $new_path variables if you want to be explicit)
+## old values are available via, you guessed it, $old_domain and $old_path
+
+#=================================================
+# GENERIC STARTING
+#=================================================
+# IMPORT GENERIC HELPERS
+#=================================================
+
+source _common.sh
+source /usr/share/yunohost/helpers
+
+#=================================================
+# STANDARD MODIFICATIONS
+#=================================================
+# STOP SYSTEMD SERVICE
+#=================================================
+ynh_script_progression --message="Stopping a systemd service..." --weight=1
+
+ynh_systemd_action --service_name="$app" --action="stop" --log_path="/var/log/$app/$app.log"
+
+#=================================================
+# MODIFY URL IN NGINX CONF
+#=================================================
+ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
+
+# this will most likely adjust NGINX config correctly
+ynh_change_url_nginx_config
+
+#=================================================
+# GENERIC FINALISATION
+#=================================================
+# START SYSTEMD SERVICE
+#=================================================
+ynh_script_progression --message="Starting a systemd service..." --weight=1
+
+ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/$app/$app.log"
+
+#=================================================
+# END OF SCRIPT
+#=================================================
+
+ynh_script_progression --message="Change of URL completed for $app" --last
diff --git a/scripts/config b/scripts/config
new file mode 100644
index 0000000..29f78f8
--- /dev/null
+++ b/scripts/config
@@ -0,0 +1,101 @@
+#!/bin/bash
+# In simple cases, you don't need a config script.
+
+# With a simple config_panel.toml, you can write in the app settings, in the
+# upstream config file or replace complete files (logo ...) and restart services.
+
+# The config scripts allows you to go further, to handle specific cases
+# (validation of several interdependent fields, specific getter/setter for a value,
+# display dynamic informations or choices, pre-loading of config type .cube... ).
+
+#=================================================
+# GENERIC STARTING
+#=================================================
+# IMPORT GENERIC HELPERS
+#=================================================
+
+source /usr/share/yunohost/helpers
+
+ynh_abort_if_errors
+
+#=================================================
+# RETRIEVE ARGUMENTS
+#=================================================
+
+install_dir=$(ynh_app_setting_get --app="$app" --key=install_dir)
+
+#=================================================
+# SPECIFIC GETTERS FOR TOML SHORT KEY
+#=================================================
+
+get__amount() {
+ # Here we can imagine to have an API call to stripe to know the amount of donation during a month
+ local amount=200
+
+ # It's possible to change some properties of the question by overriding it:
+ if [ "$amount" -gt 100 ]; then
+ cat << EOF
+style: success
+value: $amount
+ask:
+ en: A lot of donation this month: **$amount €**
+EOF
+ else
+ cat << EOF
+style: danger
+value: $amount
+ask:
+ en: Not so much donation this month: $amount €
+EOF
+ fi
+}
+
+get__prices() {
+ local prices
+ prices="$(grep "DONATION\['" "$install_dir/settings.py" | sed -r "s@^DONATION\['([^']*)'\]\['([^']*)'\] = '([^']*)'@\1/\2/\3@g" | sed -z 's/\n/,/g;s/,$/\n/')"
+ if [ "$prices" == "," ]; then
+ # Return YNH_NULL if you prefer to not return a value at all.
+ echo YNH_NULL
+ else
+ echo "$prices"
+ fi
+}
+
+
+#=================================================
+# SPECIFIC VALIDATORS FOR TOML SHORT KEYS
+#=================================================
+validate__publishable_key() {
+
+ # We can imagine here we test if the key is really a publishable key
+ (is_secret_key "$publishable_key") &&
+ echo 'This key seems to be a secret key'
+}
+
+#=================================================
+# SPECIFIC SETTERS FOR TOML SHORT KEYS
+#=================================================
+set__prices() {
+
+ #---------------------------------------------
+ # IMPORTANT: setters are triggered only if a change is detected
+ #---------------------------------------------
+ for price in $(echo "$prices" | sed "s/,/ /"); do
+ frequency=$(echo "$price" | cut -d/ -f1)
+ currency=$(echo "$price" | cut -d/ -f2)
+ price_id=$(echo "$price" | cut -d/ -f3)
+ sed "d/DONATION\['$frequency'\]\['$currency'\]" "$install_dir/settings.py"
+
+ echo "DONATION['$frequency']['$currency'] = '$price_id'" >> "$install_dir/settings.py"
+ done
+
+ #---------------------------------------------
+ # IMPORTANT: to be able to upgrade properly, you have to save the value in settings too
+ #---------------------------------------------
+ ynh_app_setting_set --app="$app" --key=prices --value="$prices"
+}
+
+#=================================================
+# GENERIC FINALIZATION
+#=================================================
+ynh_app_config_run "$1"
diff --git a/scripts/install b/scripts/install
new file mode 100755
index 0000000..9bac060
--- /dev/null
+++ b/scripts/install
@@ -0,0 +1,72 @@
+#!/bin/bash
+
+#=================================================
+# GENERIC START
+#=================================================
+# IMPORT GENERIC HELPERS
+#=================================================
+
+source _common.sh
+source /usr/share/yunohost/helpers
+
+#=================================================
+# APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC)
+#=================================================
+# DOWNLOAD, CHECK AND UNPACK SOURCE
+#=================================================
+ynh_script_progression --message="Setting up source files..." --weight=1
+
+ynh_setup_source --dest_dir="$install_dir"
+
+chown -R "$app:www-data" "$install_dir"
+
+#=================================================
+# SYSTEM CONFIGURATION
+#=================================================
+ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
+
+# Create a dedicated NGINX config using the conf/nginx.conf template
+ynh_add_nginx_config
+
+# Create a dedicated systemd config
+ynh_add_systemd_config
+
+yunohost service add "$app" --description="A short description of the app" --log="/var/log/$app/$app.log"
+
+#=================================================
+# BUILDING OPEN WEB CALENDAR
+#=================================================
+ynh_script_progression --message="Building $app..."
+
+pushd "$install_dir"
+ python3 -m venv venv
+ venv/bin/pip install --upgrade pip
+ venv/bin/pip install -r requirements.txt
+popd
+
+#=================================================
+# APP INITIAL CONFIGURATION
+#=================================================
+# ADD A CONFIGURATION
+#=================================================
+ynh_script_progression --message="Adding a configuration file..." --weight=1
+
+ynh_add_config --template="app.json" --destination="$install_dir/app.json"
+
+chmod 400 "$install_dir/app.json"
+chown "$app:$app" "$install_dir/app.json"
+
+#=================================================
+# GENERIC FINALIZATION
+#=================================================
+# START SYSTEMD SERVICE
+#=================================================
+ynh_script_progression --message="Starting a systemd service..." --weight=1
+
+# Start a systemd service
+ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/$app/$app.log"
+
+#=================================================
+# END OF SCRIPT
+#=================================================
+ynh_script_progression --message="Installation of $app completed" --last
diff --git a/scripts/remove b/scripts/remove
new file mode 100755
index 0000000..a0f1d84
--- /dev/null
+++ b/scripts/remove
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+#=================================================
+# GENERIC START
+#=================================================
+# IMPORT GENERIC HELPERS
+#=================================================
+
+source _common.sh
+source /usr/share/yunohost/helpers
+
+#=================================================
+# REMOVE SYSTEM CONFIGURATIONS
+#=================================================
+ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
+
+# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
+if ynh_exec_warn_less yunohost service status "$app" >/dev/null; then
+ ynh_script_progression --message="Removing $app service integration..." --weight=1
+ yunohost service remove "$app"
+fi
+
+ynh_remove_systemd_config
+
+ynh_remove_nginx_config
+
+#=================================================
+# END OF SCRIPT
+#=================================================
+
+ynh_script_progression --message="Removal of $app completed" --last
diff --git a/scripts/restore b/scripts/restore
new file mode 100755
index 0000000..bd00500
--- /dev/null
+++ b/scripts/restore
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+#=================================================
+# GENERIC START
+#=================================================
+# IMPORT GENERIC HELPERS
+#=================================================
+
+# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
+source ../settings/scripts/_common.sh
+source /usr/share/yunohost/helpers
+
+#=================================================
+# RESTORE THE APP MAIN DIR
+#=================================================
+ynh_script_progression --message="Restoring the app main directory..." --weight=1
+
+ynh_restore_file --origin_path="$install_dir"
+
+chown -R "$app:www-data" "$install_dir"
+
+#=================================================
+# RESTORE SYSTEM CONFIGURATIONS
+#=================================================
+ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
+
+ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
+
+ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
+systemctl enable "$app.service" --quiet
+
+yunohost service add "$app" --description="A short description of the app" --log="/var/log/$app/$app.log"
+
+#=================================================
+# GENERIC FINALIZATION
+#=================================================
+# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE
+#=================================================
+ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
+
+### Typically you only have either $app or php-fpm but not both at the same time...
+ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/$app/$app.log"
+
+ynh_systemd_action --service_name=nginx --action=reload
+
+#=================================================
+# END OF SCRIPT
+#=================================================
+
+ynh_script_progression --message="Restoration completed for $app" --last
diff --git a/scripts/upgrade b/scripts/upgrade
new file mode 100755
index 0000000..fdfb689
--- /dev/null
+++ b/scripts/upgrade
@@ -0,0 +1,66 @@
+#!/bin/bash
+
+#=================================================
+# GENERIC START
+#=================================================
+# IMPORT GENERIC HELPERS
+#=================================================
+
+source _common.sh
+source /usr/share/yunohost/helpers
+
+#=================================================
+# STOP SYSTEMD SERVICE
+#=================================================
+ynh_script_progression --message="Stopping a systemd service..." --weight=1
+
+ynh_systemd_action --service_name="$app" --action="stop" --log_path="/var/log/$app/$app.log"
+
+#=================================================
+# "REBUILD" THE APP (DEPLOY NEW SOURCES, RERUN NPM BUILD...)
+#=================================================
+# DOWNLOAD, CHECK AND UNPACK SOURCE
+#=================================================
+
+ynh_script_progression --message="Upgrading source files..." --weight=1
+
+# Download, check integrity, uncompress and patch the source from manifest.toml
+ynh_setup_source --dest_dir="$install_dir"
+
+chown -R "$app:www-data" "$install_dir"
+
+#=================================================
+# REAPPLY SYSTEM CONFIGURATIONS
+#=================================================
+ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
+
+ynh_add_nginx_config
+
+ynh_add_systemd_config
+
+yunohost service add "$app" --description="A short description of the app" --log="/var/log/$app/$app.log"
+
+#=================================================
+# RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...)
+#=================================================
+# UPDATE A CONFIG FILE
+#=================================================
+ynh_script_progression --message="Updating a configuration file..." --weight=1
+
+ynh_add_config --template="app.json" --destination="$install_dir/app.json"
+
+chmod 400 "$install_dir/app.json"
+chown "$app:$app" "$install_dir/app.json"
+
+#=================================================
+# START SYSTEMD SERVICE
+#=================================================
+ynh_script_progression --message="Starting a systemd service..." --weight=1
+
+ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/$app/$app.log"
+
+#=================================================
+# END OF SCRIPT
+#=================================================
+
+ynh_script_progression --message="Upgrade of $app completed" --last
diff --git a/sources/extra_files/app/.gitignore b/sources/extra_files/app/.gitignore
new file mode 100644
index 0000000..783a4ae
--- /dev/null
+++ b/sources/extra_files/app/.gitignore
@@ -0,0 +1,2 @@
+*~
+*.sw[op]
diff --git a/sources/patches/.gitignore b/sources/patches/.gitignore
new file mode 100644
index 0000000..783a4ae
--- /dev/null
+++ b/sources/patches/.gitignore
@@ -0,0 +1,2 @@
+*~
+*.sw[op]
diff --git a/tests.toml b/tests.toml
new file mode 100644
index 0000000..76f5804
--- /dev/null
+++ b/tests.toml
@@ -0,0 +1,78 @@
+#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/tests.v1.schema.json
+
+test_format = 1.0
+
+[default]
+
+ # ------------
+ # Tests to run
+ # ------------
+
+ # -------------------------------------------------------------------------------
+ # EVERYTHING PAST THIS POINT IS OPTIONAL AND MOST LIKELY UNNECESSARY FOR NEW APPS
+ #--------------------------------------------------------------------------------
+ ## Conventions in this sample:
+ ## <- An actual comment
+ # <- uncommenting this should be a valid entry in 'tests.toml'
+
+ ## NB: the tests to run are automatically deduced by the CI script according to the
+ ## content of the app's manifest. The declarations below allow to customize which
+ ## tests are ran, possibly add special test suite to test special args, or
+ ## declare which commits to test upgrade from.
+ ##
+ ## You can also decide (though this is discouraged!) to ban/ignore some tests,
+ ## The test IDs to be used in only/exclude statements are:
+ ## * install.root
+ ## * install.subdir
+ ## * install.nourl
+ ## * install.multi
+ ## * backup_restore
+ ## * upgrade
+ ## * upgrade.someCommitId
+ ## * change_url
+ ## NB: you should NOT need this except if you really have a good reason...
+
+ # exclude = ["install.private", "install.multi"]
+
+ ## For special usecases, sometimes you need to setup other things on the machine
+ ## prior to installing the app (such as installing another app)
+ ## (Remove this key entirely if not needed)
+
+ # preinstall = """
+ # sudo yunohost app install foobar
+ # sudo yunohost user list
+ # """
+
+ # -------------------------------
+ # Default args to use for install
+ # -------------------------------
+
+ ## By default, the CI will automagically fill the 'standard' args
+ ## such as domain, path, admin, is_public and password with relevant values
+ ## and also install args with a "default" provided in the manifest..
+ ## It should only make sense to declare custom args here for args with no default values
+ ## NB: you should NOT need those lines unless for custom questions with no obvious/default value
+
+ # args.language = "fr_FR"
+ # args.multisite = 0
+
+ # -------------------------------
+ # Commits to test upgrade from
+ # -------------------------------
+
+ ## 00a1a6e7 is part of commit SHA, preferrably from 'master' branch
+ ## that points to valid install of previous version
+
+ # test_upgrade_from.00a1a6e7.name = "Upgrade from 5.4"
+ # test_upgrade_from.00a1a6e7.args.foo = "bar"
+
+
+## This is an additional test suite
+# [some_additional_testsuite]
+
+ ## On additional tests suites, you can decide to run only specific tests
+
+ # only = ["install.subdir"]
+
+ # args.language = "en_GB"
+ # args.multisite = 1