1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/etherpad_mypads_ynh.git synced 2024-09-03 18:36:09 +02:00

Merge pull request #204 from YunoHost-Apps/fix

2.0.2
This commit is contained in:
eric_G 2024-05-12 22:55:41 +02:00 committed by GitHub
commit f881b41a3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 134 additions and 130 deletions

View file

@ -1,6 +1,7 @@
# All available README files by language # All available README files by language
- [Read the README in English](README.md) - [Read the README in English](README.md)
- [Lee el README en español](README_es.md)
- [Irakurri README euskaraz](README_eu.md) - [Irakurri README euskaraz](README_eu.md)
- [Lire le README en français](README_fr.md) - [Lire le README en français](README_fr.md)
- [Le o README en galego](README_gl.md) - [Le o README en galego](README_gl.md)

View file

@ -34,7 +34,7 @@ This version of Etherpad is preconfigured with a collection of plugins:
- [ep_subscript_and_superscript](https://www.npmjs.com/package/ep_subscript_and_superscript) - *Support for subscript and superscript* - [ep_subscript_and_superscript](https://www.npmjs.com/package/ep_subscript_and_superscript) - *Support for subscript and superscript*
**Shipped version:** 1.9.5~ynh1 **Shipped version:** 2.0.3~ynh1
**Demo:** <https://video.etherpad.com> **Demo:** <https://video.etherpad.com>

65
README_es.md Normal file
View file

@ -0,0 +1,65 @@
<!--
Este archivo README esta generado automaticamente<https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
No se debe editar a mano.
-->
# Etherpad MyPads para Yunohost
[![Nivel de integración](https://dash.yunohost.org/integration/etherpad_mypads.svg)](https://dash.yunohost.org/appci/app/etherpad_mypads) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/etherpad_mypads.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/etherpad_mypads.maintain.svg)
[![Instalar Etherpad MyPads con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=etherpad_mypads)
*[Leer este README en otros idiomas.](./ALL_README.md)*
> *Este paquete le permite instalarEtherpad MyPads rapidamente y simplement en un servidor YunoHost.*
> *Si no tiene YunoHost, visita [the guide](https://yunohost.org/install) para aprender como instalarla.*
## Descripción general
Etherpad is a real-time collaborative editor scalable to thousands of simultaneous real time users. It provides full data export capabilities, and runs on your server, under your control.
This version of Etherpad is preconfigured with a collection of plugins:
- [ep_mypads](https://www.npmjs.com/package/ep_mypads) - *Groups and private pads for etherpad*
- [ep_align](https://www.npmjs.com/package/ep_align) - *Add Left/Center/Right/Justify alignment*
- [ep_author_hover](https://www.npmjs.com/package/ep_author_hover) - *Display author names when hovereing text*
- [ep_comments_page](https://www.npmjs.com/package/ep_comments_page) - *Add comments on sidebar and link it to the text.*
- [ep_countable](https://www.npmjs.com/package/ep_countable) - *Add paragraphs, words and characters count*
- [ep_delete_empty_pads](https://www.npmjs.com/package/ep_delete_empty_pads) - *Delete pads which were never edited*
- [ep_font_color](https://www.npmjs.com/package/ep_font_color) - *Be able to change font color*
- [ep_font_size](https://www.npmjs.com/package/ep_font_size) - *Be able to change font size*
- [ep_headings2](https://www.npmjs.com/package/ep_headings2) - *Be able to set text as headers*
- [ep_markdown](https://www.npmjs.com/package/ep_markdown) - *Edit and export as Markdown*
- [ep_spellcheck](https://www.npmjs.com/package/ep_spellcheck) - *Add spell checking*
- [ep_subscript_and_superscript](https://www.npmjs.com/package/ep_subscript_and_superscript) - *Support for subscript and superscript*
**Versión actual:** 2.0.3~ynh1
**Demo:** <https://video.etherpad.com>
## Capturas
![Captura de Etherpad MyPads](./doc/screenshots/etherpad_demo.gif)
## Documentaciones y recursos
- Sitio web oficial: <http://etherpad.org>
- Documentación administrador oficial: <http://etherpad.org/doc/v1.9.0>
- Repositorio del código fuente oficial de la aplicación : <https://github.com/ether/etherpad-lite>
- Catálogo YunoHost: <https://apps.yunohost.org/app/etherpad_mypads>
- Reportar un error: <https://github.com/YunoHost-Apps/etherpad_mypads_ynh/issues>
## Información para desarrolladores
Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/etherpad_mypads_ynh/tree/testing
Para probar la rama `testing`, sigue asÍ:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/etherpad_mypads_ynh/tree/testing --debug
o
sudo yunohost app upgrade etherpad_mypads -u https://github.com/YunoHost-Apps/etherpad_mypads_ynh/tree/testing --debug
```
**Mas informaciones sobre el empaquetado de aplicaciones:** <https://yunohost.org/packaging_apps>

View file

@ -34,7 +34,7 @@ This version of Etherpad is preconfigured with a collection of plugins:
- [ep_subscript_and_superscript](https://www.npmjs.com/package/ep_subscript_and_superscript) - *Support for subscript and superscript* - [ep_subscript_and_superscript](https://www.npmjs.com/package/ep_subscript_and_superscript) - *Support for subscript and superscript*
**Paketatutako bertsioa:** 1.9.5~ynh1 **Paketatutako bertsioa:** 2.0.3~ynh1
**Demoa:** <https://video.etherpad.com> **Demoa:** <https://video.etherpad.com>

View file

@ -34,7 +34,7 @@ Cette version d'Etherpad est préconfigurée avec une collection de plugins:
- [ep_subscript_and_superscript](https://www.npmjs.com/package/ep_subscript_and_superscript) - *Support des exposants et indices* - [ep_subscript_and_superscript](https://www.npmjs.com/package/ep_subscript_and_superscript) - *Support des exposants et indices*
**Version incluse:** 1.9.5~ynh1 **Version incluse:** 2.0.3~ynh1
**Démo:** <https://video.etherpad.com> **Démo:** <https://video.etherpad.com>

View file

@ -34,7 +34,7 @@ This version of Etherpad is preconfigured with a collection of plugins:
- [ep_subscript_and_superscript](https://www.npmjs.com/package/ep_subscript_and_superscript) - *Support for subscript and superscript* - [ep_subscript_and_superscript](https://www.npmjs.com/package/ep_subscript_and_superscript) - *Support for subscript and superscript*
**Versión proporcionada:** 1.9.5~ynh1 **Versión proporcionada:** 2.0.3~ynh1
**Demo:** <https://video.etherpad.com> **Demo:** <https://video.etherpad.com>

View file

@ -3,7 +3,7 @@
请勿手动编辑。 请勿手动编辑。
--> -->
# YunoHost 的 Etherpad MyPads # YunoHost 的 Etherpad MyPads
[![集成程度](https://dash.yunohost.org/integration/etherpad_mypads.svg)](https://dash.yunohost.org/appci/app/etherpad_mypads) ![工作状态](https://ci-apps.yunohost.org/ci/badges/etherpad_mypads.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/etherpad_mypads.maintain.svg) [![集成程度](https://dash.yunohost.org/integration/etherpad_mypads.svg)](https://dash.yunohost.org/appci/app/etherpad_mypads) ![工作状态](https://ci-apps.yunohost.org/ci/badges/etherpad_mypads.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/etherpad_mypads.maintain.svg)
@ -34,7 +34,7 @@ This version of Etherpad is preconfigured with a collection of plugins:
- [ep_subscript_and_superscript](https://www.npmjs.com/package/ep_subscript_and_superscript) - *Support for subscript and superscript* - [ep_subscript_and_superscript](https://www.npmjs.com/package/ep_subscript_and_superscript) - *Support for subscript and superscript*
**分发版本:** 1.9.5~ynh1 **分发版本:** 2.0.3~ynh1
**演示:** <https://video.etherpad.com> **演示:** <https://video.etherpad.com>

View file

@ -434,7 +434,7 @@ __COMMENT_IF_LDAP_DISABLED__ },
/* /*
* Restrict socket.io transport methods * Restrict socket.io transport methods
*/ */
"socketTransportProtocols" : ["xhr-polling", "jsonp-polling", "htmlfile"], "socketTransportProtocols" : ["websocket", "polling"],
"socketIo": { "socketIo": {
/* /*

View file

@ -9,7 +9,7 @@ Group=__APP__
WorkingDirectory=__INSTALL_DIR__/ WorkingDirectory=__INSTALL_DIR__/
Environment=ETHERPAD_PRODUCTION=true Environment=ETHERPAD_PRODUCTION=true
Environment="__YNH_NODE_LOAD_PATH__" Environment="__YNH_NODE_LOAD_PATH__"
ExecStart=__YNH_NODE__ __INSTALL_DIR__/src/node/server.js ExecStart=__INSTALL_DIR__/bin/run.sh
StandardOutput=append:/var/log/__APP__/etherpad.log StandardOutput=append:/var/log/__APP__/etherpad.log
StandardError=inherit StandardError=inherit
Restart=always Restart=always

View file

@ -5,7 +5,7 @@ name = "Etherpad MyPads"
description.en = "Online editor providing collaborative editing in real-time" description.en = "Online editor providing collaborative editing in real-time"
description.fr = "Éditeur en ligne fournissant l'édition collaborative en temps réel" description.fr = "Éditeur en ligne fournissant l'édition collaborative en temps réel"
version = "1.9.5~ynh1" version = "2.0.3~ynh1"
maintainers = [] maintainers = []
@ -83,8 +83,8 @@ ram.runtime = "50M"
[resources.sources] [resources.sources]
[resources.sources.main] [resources.sources.main]
url = "https://github.com/ether/etherpad-lite/archive/1.9.5.tar.gz" url = "https://github.com/ether/etherpad-lite/archive/refs/tags/2.0.3.tar.gz"
sha256 = "7f9a93370a9e2d900b64273c369cbb195bfc3747664b7632da9c1549c03f4407" sha256 = "6dc19addc8280806590f9a82d4426a88a8ef77c7841f99f97a50d6aa6c9ecc1a"
autoupdate.strategy = "latest_github_tag" autoupdate.strategy = "latest_github_tag"
[resources.system_user] [resources.system_user]
@ -115,4 +115,4 @@ ram.runtime = "50M"
[resources.database] [resources.database]
type = "mysql" type = "mysql"

View file

@ -5,24 +5,24 @@
#================================================= #=================================================
# NodeJS version # NodeJS version
nodejs_version=14 nodejs_version=20
# MyPads version # MyPads version
# This variable is mostly used to force an upgrade of the package in case of new versions of MyPads. # This variable is mostly used to force an upgrade of the package in case of new versions of MyPads.
mypads_version=1.7.24 mypads_version=1.7.24
# Plugin versions # Plugin versions
ep_align_version=0.3.53 ep_align_version=0.3.94
ep_author_hover_version=0.3.37 ep_author_hover_version=0.3.55
ep_comments_page_version=1.0.5 ep_comments_page_version=1.0.33
ep_countable_version=0.0.13 ep_countable_version=0.0.13
ep_delete_empty_pads_version=0.0.10 ep_delete_empty_pads_version=0.0.10
ep_font_color_version=0.0.63 ep_font_color_version=0.0.86
ep_headings2_version=0.2.44 ep_headings2_version=0.2.62
ep_markdown_version=0.1.50 ep_markdown_version=0.1.77
ep_spellcheck_version=0.0.43 ep_spellcheck_version=0.0.59
ep_subscript_and_superscript_version=0.2.47 ep_subscript_and_superscript_version=0.3.7
ep_font_size_version=0.4.44 ep_font_size_version=0.4.59
#================================================= #=================================================
# PERSONAL HELPERS # PERSONAL HELPERS

View file

@ -59,7 +59,7 @@ chown $app -R /var/log/$app
#================================================= #=================================================
# ADD A CONFIGURATION # ADD A CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Configure etherpad..." ynh_script_progression --message="Configure $app..."
abiword_path="null" abiword_path="null"
soffice_path="null" soffice_path="null"
@ -80,7 +80,6 @@ then
fi fi
# Calculate and store the config file checksum into the app settings # Calculate and store the config file checksum into the app settings
ynh_add_config --template="settings.json" --destination="$install_dir/settings.json" ynh_add_config --template="settings.json" --destination="$install_dir/settings.json"
ynh_add_config --template="credentials.json" --destination="$install_dir/credentials.json" ynh_add_config --template="credentials.json" --destination="$install_dir/credentials.json"
@ -90,47 +89,25 @@ chown $app:$app "$install_dir/settings.json"
chmod 600 "$install_dir/credentials.json" chmod 600 "$install_dir/credentials.json"
chown $app:$app "$install_dir/credentials.json" chown $app:$app "$install_dir/credentials.json"
#=================================================
# INSTALL ETHERPAD'S PLUGINS
#=================================================
ynh_script_progression --message="Installing Etherpad plugins..." --weight=90
pushd "$install_dir"
# Add Left/Center/Right/Justify to lines of text in a pad
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_align@${ep_align_version}
# Framapad - Adds author names to span titles
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_author_hover@${ep_author_hover_version}
# Framapad - Adds comments on sidebar and link it to the text.
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_comments_page@${ep_comments_page_version}
# Framapad - Displays paragraphs, sentences, words and characters counts.
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_countable@${ep_countable_version}
# Framapad - Delete pads which were never edited
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_delete_empty_pads@${ep_delete_empty_pads_version}
# Framapad - Apply colors to fonts
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_font_color@${ep_font_color_version}
# Framapad - Adds heading support to Etherpad Lite.
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_headings2@${ep_headings2_version}
# Framapad - Edit and Export as Markdown in Etherpad
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_markdown@${ep_markdown_version}
if [ $mypads -eq 1 ]; then
# Framapad - Groups and private pads for Etherpad
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_mypads@${mypads_version}
fi
# Framapad - Add support to do 'Spell checking'
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_spellcheck@${ep_spellcheck_version}
# Framapad - Add support for Subscript and Superscript
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_subscript_and_superscript@${ep_subscript_and_superscript_version}
# Framapad - User Pad Contents font size can be set in settings, this does not effect other peoples views
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_font_size@${ep_font_size_version}
popd
#================================================= #=================================================
# INSTALL ETHERPAD # INSTALL ETHERPAD
#================================================= #=================================================
ynh_script_progression --message="Installing Etherpad..." --weight=90 ynh_script_progression --message="Installing $app..." --weight=90
pushd $install_dir pushd "$install_dir"
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH ETHERPAD_PRODUCTION=true src/bin/installDeps.sh ynh_exec_warn_less npm install pnpm -g
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH ETHERPAD_PRODUCTION=true bin/installDeps.sh && \
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm run install-plugins \
ep_align@${ep_align_version} \
ep_author_hover@${ep_author_hover_version} \
ep_delete_empty_pads@${ep_delete_empty_pads_version} \
ep_headings2@${ep_headings2_version} \
ep_markdown@${ep_markdown_version} \
ep_font_size@${ep_font_size_version}
if [ $mypads -eq 1 ]; then
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm run install-plugins \
ep_mypads@${mypads_version}
fi
popd popd
#================================================= #=================================================
@ -139,12 +116,12 @@ popd
if [ $mypads -eq 1 ] if [ $mypads -eq 1 ]
then then
ynh_script_progression --message="Tweaking mypad configuration..." --weight=1 ynh_script_progression --message="Tweaking MyPads configuration..." --weight=1
# Add a link to Etherpad to allow anonymous pads creation from MyPads. # Add a link to Etherpad to allow anonymous pads creation from MyPads.
ynh_replace_string --match_string="^ *\"DESCRIPTION\": .*</ul>" --replace_string="&<a href=../>Pads anonymes</a>" --target_file=$install_dir/node_modules/ep_mypads/static/l10n/fr.json ynh_replace_string --match_string="^ *\"DESCRIPTION\": .*</ul>" --replace_string="&<a href=../>Pads anonymes</a>" --target_file=$install_dir/node_modules/ep_mypads/static/l10n/fr.json
ynh_replace_string --match_string="^ *\"DESCRIPTION\": .*</ul>" --replace_string="&<a href=../>Anonymous pads</a>" --target_file=$install_dir/node_modules/ep_mypads/static/l10n/en.json ynh_replace_string --match_string="^ *\"DESCRIPTION\": .*</ul>" --replace_string="&<a href=../>Anonymous pads</a>" --target_file=$install_dir/node_modules/ep_mypads/static/l10n/en.json
# And a link to etherpad admin from Mypads. # And a link to Etherpad admin from MyPads.
ynh_replace_string --match_string="^ *\"FOOTER\": .*2.0" --replace_string="& | <a href='../admin'>Etherpad admin</a>" --target_file=$install_dir/node_modules/ep_mypads/static/l10n/en.json ynh_replace_string --match_string="^ *\"FOOTER\": .*2.0" --replace_string="& | <a href='../admin'>Etherpad admin</a>" --target_file=$install_dir/node_modules/ep_mypads/static/l10n/en.json
ynh_replace_string --match_string="^ *\"FOOTER\": .*2.0" --replace_string="& | <a href='../admin'>Etherpad admin</a>" --target_file=$install_dir/node_modules/ep_mypads/static/l10n/fr.json ynh_replace_string --match_string="^ *\"FOOTER\": .*2.0" --replace_string="& | <a href='../admin'>Etherpad admin</a>" --target_file=$install_dir/node_modules/ep_mypads/static/l10n/fr.json

View file

@ -6,7 +6,6 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
# RESTORE THE APP MAIN DIR # RESTORE THE APP MAIN DIR
#================================================= #=================================================
#
ynh_script_progression --message="Restoring the app main directory..." --weight=5 ynh_script_progression --message="Restoring the app main directory..." --weight=5
ynh_restore_file --origin_path="$install_dir" ynh_restore_file --origin_path="$install_dir"
@ -28,7 +27,11 @@ chown $app:$app "$install_dir/credentials.json"
ynh_script_progression --message="Restoring system configurations related to $app..." ynh_script_progression --message="Restoring system configurations related to $app..."
ynh_install_nodejs --nodejs_version=$nodejs_version ynh_install_nodejs --nodejs_version=$nodejs_version
ynh_use_nodejs
pushd $install_dir
ynh_use_nodejs
ynh_exec_warn_less npm install pnpm -g
popd
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"

View file

@ -3,14 +3,12 @@
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
# ACTIVATE MAINTENANCE MODE # ACTIVATE MAINTENANCE MODE
#================================================= #=================================================
ynh_script_progression --message="Activating maintenance mode..." --weight=2 ynh_script_progression --message="Activating maintenance mode..." --weight=2
# Wait for etherpad to be fully started # (... but why ???) # Wait for Etherpad to be fully started # (... but why ???)
ynh_systemd_action --action=restart --line_match="You can access your Etherpad instance at" --log_path="/var/log/$app/etherpad.log" --timeout="120" ynh_systemd_action --action=restart --line_match="You can access your Etherpad instance at" --log_path="/var/log/$app/etherpad.log" --timeout="120"
ynh_maintenance_mode_ON ynh_maintenance_mode_ON
@ -67,14 +65,10 @@ ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name \
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_script_progression --message="Upgrading source files..." --weight=4
if [ "$upgrade_type" == "UPGRADE_APP" ] # Download, check integrity, uncompress and patch the source from app.src
then ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="settings.json credentials.json"
ynh_script_progression --message="Upgrading source files..." --weight=4
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --keep="settings.json credentials.json"
fi
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
chown -R $app:$app "$install_dir" chown -R $app:$app "$install_dir"
@ -107,8 +101,7 @@ chown $app -R /var/log/$app
#================================================= #=================================================
# CONFIGURE ETHERPAD # CONFIGURE ETHERPAD
#================================================= #=================================================
ynh_script_progression --message="Configure $app..."
ynh_script_progression --message="Configure etherpad..."
abiword_path="null" abiword_path="null"
soffice_path="null" soffice_path="null"
@ -139,67 +132,32 @@ chown $app:$app "$install_dir/settings.json"
chmod 600 "$install_dir/credentials.json" chmod 600 "$install_dir/credentials.json"
chown $app:$app "$install_dir/credentials.json" chown $app:$app "$install_dir/credentials.json"
#=================================================
# INSTALL ETHERPAD'S PLUGINS
#=================================================
# If upgrading from an old version and table of content is there, remove it
if ynh_compare_current_package_version --comparison lt --version 1.9.1~ynh3
then
pushd "$install_dir"
if ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm ls 2>/dev/null | grep -q ep_table_of_contents
then
ynh_script_progression --message="Uninstalling ep_table_of_contents..." --weight=2
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm uninstall ep_table_of_contents
fi
popd
fi
ynh_script_progression --message="Installing Etherpad plugins..." --weight=10
pushd "$install_dir"
# Add Left/Center/Right/Justify to lines of text in a pad
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_align@${ep_align_version}
# Framapad - Adds author names to span titles
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_author_hover@${ep_author_hover_version}
# Framapad - Adds comments on sidebar and link it to the text.
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_comments_page@${ep_comments_page_version}
# Framapad - Displays paragraphs, sentences, words and characters counts.
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_countable@${ep_countable_version}
# Framapad - Delete pads which were never edited
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_delete_empty_pads@${ep_delete_empty_pads_version}
# Framapad - Apply colors to fonts
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_font_color@${ep_font_color_version}
# Framapad - Adds heading support to Etherpad Lite.
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_headings2@${ep_headings2_version}
# Framapad - Edit and Export as Markdown in Etherpad
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_markdown@${ep_markdown_version}
if [ $mypads -eq 1 ]; then
# Framapad - Groups and private pads for Etherpad
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_mypads@${mypads_version}
fi
# Framapad - Add support to do 'Spell checking'
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_spellcheck@${ep_spellcheck_version}
# Framapad - Add support for Subscript and Superscript
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_subscript_and_superscript@${ep_subscript_and_superscript_version}
# Framapad - User Pad Contents font size can be set in settings, this does not effect other peoples views
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --no-save ep_font_size@${ep_font_size_version}
popd
#================================================= #=================================================
# UPGRADE NPM MODULES # UPGRADE NPM MODULES
#================================================= #=================================================
ynh_script_progression --message="Upgrading Etherpad..." --weight=10 ynh_script_progression --message="Upgrading $app..." --weight=10
pushd $install_dir pushd $install_dir
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH ETHERPAD_PRODUCTION=true src/bin/installDeps.sh ynh_exec_warn_less npm install pnpm -g
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH ETHERPAD_PRODUCTION=true bin/installDeps.sh && \
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm run install-plugins \
ep_align@${ep_align_version} \
ep_author_hover@${ep_author_hover_version} \
ep_delete_empty_pads@${ep_delete_empty_pads_version} \
ep_headings2@${ep_headings2_version} \
ep_markdown@${ep_markdown_version} \
ep_font_size@${ep_font_size_version}
if [ $mypads -eq 1 ]; then
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm run install-plugins \
ep_mypads@${mypads_version}
fi
popd popd
#================================================= #=================================================
# ADD MYPADS LINK # ADD MYPADS LINK
#================================================= #=================================================
if [ "$upgrade_type" == "UPGRADE_APP" ] && [ $mypads -eq 1 ] if [ $mypads -eq 1 ]
then then
# Find the /div just after the field to open a pad in order to add a link to MyPads plugin. # Find the /div just after the field to open a pad in order to add a link to MyPads plugin.
sed -i '157i<center><br><font size="4"><a href="./mypads/" style="text-decoration: none; color: #555">MyPads</a></font></center>' $install_dir/src/templates/index.html sed -i '157i<center><br><font size="4"><a href="./mypads/" style="text-decoration: none; color: #555">MyPads</a></font></center>' $install_dir/src/templates/index.html

View file

@ -20,19 +20,19 @@ test_format = 1.0
test_upgrade_from.4e8049b31708b9f0223ee1a6ca8f153f04ec7e40.name = "1.9.1" test_upgrade_from.4e8049b31708b9f0223ee1a6ca8f153f04ec7e40.name = "1.9.1"
[with_mypads] [with_MyPads]
args.export = "libreoffice" args.export = "libreoffice"
args.mypads = 1 args.mypads = 1
args.useldap = 1 args.useldap = 1
only = ["install.root"] only = ["install.root"]
[with_abiword] [with_Abiword]
args.export = "abiword" args.export = "abiword"
args.mypads = 0 args.mypads = 0
args.useldap = 0 args.useldap = 0
only = ["install.root"] only = ["install.root"]
[with_libreoffice] [with_Libreoffice]
args.export = "libreoffice" args.export = "libreoffice"
args.mypads = 0 args.mypads = 0
args.useldap = 0 args.useldap = 0