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

Merge pull request #32 from YunoHost-Apps/testing

Testing
This commit is contained in:
Alexandre Aubin 2024-05-13 17:38:05 +02:00 committed by GitHub
commit 89b83b4f91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 213 additions and 72 deletions

View file

@ -1,6 +1,8 @@
# All available README files by language
- [Read the README in English](README.md)
- [Lee el README en español](README_es.md)
- [Irakurri README euskaraz](README_eu.md)
- [Lire le README en français](README_fr.md)
- [Le o README en galego](README_gl.md)
- [Leggi il “README” in italiano](README_it.md)
- [阅读中文(简体)的 README](README_zh_Hans.md)

View file

@ -9,7 +9,7 @@ It shall NOT be edited by hand.
[![Install h5ai with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=h5ai)
*[Read this README is other languages.](./ALL_README.md)*
*[Read this README in other languages.](./ALL_README.md)*
> *This package allows you to install h5ai quickly and simply on a YunoHost server.*
> *If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.*
@ -23,7 +23,7 @@ h5ai is a modern file indexer for HTTP web servers with focus on your files. Dir
Some of the optional features are: file sorting, different view modes, localization, a breadcrumb, a tree view, custom headers and footers, file filter and search, folder sizes, auto refresh, packaged download, QR codes, thumbnails, file previews
**Shipped version:** 0.30.0~ynh10
**Shipped version:** 0.30.0~ynh11
**Demo:** <https://larsjung.de/h5ai/demo/>

54
README_es.md Normal file
View file

@ -0,0 +1,54 @@
<!--
Este archivo README esta generado automaticamente<https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
No se debe editar a mano.
-->
# h5ai para Yunohost
[![Nivel de integración](https://dash.yunohost.org/integration/h5ai.svg)](https://dash.yunohost.org/appci/app/h5ai) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/h5ai.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/h5ai.maintain.svg)
[![Instalar h5ai con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=h5ai)
*[Leer este README en otros idiomas.](./ALL_README.md)*
> *Este paquete le permite instalarh5ai 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
h5ai is a modern file indexer for HTTP web servers with focus on your files. Directories are displayed in a appealing way and browsing them is enhanced by different views, a breadcrumb and a tree overview.
### Features
Some of the optional features are: file sorting, different view modes, localization, a breadcrumb, a tree view, custom headers and footers, file filter and search, folder sizes, auto refresh, packaged download, QR codes, thumbnails, file previews
**Versión actual:** 0.30.0~ynh11
**Demo:** <https://larsjung.de/h5ai/demo/>
## Capturas
![Captura de h5ai](./doc/screenshots/screenshot.jpg)
## Documentaciones y recursos
- Sitio web oficial: <https://larsjung.de/h5ai/>
- Documentación administrador oficial: <https://larsjung.de/h5ai/>
- Repositorio del código fuente oficial de la aplicación : <https://github.com/lrsjng/h5ai>
- Catálogo YunoHost: <https://apps.yunohost.org/app/h5ai>
- Reportar un error: <https://github.com/YunoHost-Apps/h5ai_ynh/issues>
## Información para desarrolladores
Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing
Para probar la rama `testing`, sigue asÍ:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing --debug
o
sudo yunohost app upgrade h5ai -u https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing --debug
```
**Mas informaciones sobre el empaquetado de aplicaciones:** <https://yunohost.org/packaging_apps>

54
README_eu.md Normal file
View file

@ -0,0 +1,54 @@
<!--
Ohart ongi: README hau automatikoki sortu da <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>ri esker
EZ editatu eskuz.
-->
# h5ai YunoHost-erako
[![Integrazio maila](https://dash.yunohost.org/integration/h5ai.svg)](https://dash.yunohost.org/appci/app/h5ai) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/h5ai.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/h5ai.maintain.svg)
[![Instalatu h5ai YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=h5ai)
*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)*
> *Pakete honek h5ai YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.*
> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.*
## Aurreikuspena
h5ai is a modern file indexer for HTTP web servers with focus on your files. Directories are displayed in a appealing way and browsing them is enhanced by different views, a breadcrumb and a tree overview.
### Features
Some of the optional features are: file sorting, different view modes, localization, a breadcrumb, a tree view, custom headers and footers, file filter and search, folder sizes, auto refresh, packaged download, QR codes, thumbnails, file previews
**Paketatutako bertsioa:** 0.30.0~ynh11
**Demoa:** <https://larsjung.de/h5ai/demo/>
## Pantaila-argazkiak
![h5ai(r)en pantaila-argazkia](./doc/screenshots/screenshot.jpg)
## Dokumentazioa eta baliabideak
- Aplikazioaren webgune ofiziala: <https://larsjung.de/h5ai/>
- Administratzaileen dokumentazio ofiziala: <https://larsjung.de/h5ai/>
- Jatorrizko aplikazioaren kode-gordailua: <https://github.com/lrsjng/h5ai>
- YunoHost Denda: <https://apps.yunohost.org/app/h5ai>
- Eman errore baten berri: <https://github.com/YunoHost-Apps/h5ai_ynh/issues>
## Garatzaileentzako informazioa
Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing).
`testing` abarra probatzeko, ondorengoa egin:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing --debug
edo
sudo yunohost app upgrade h5ai -u https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing --debug
```
**Informazio gehiago aplikazioaren paketatzeari buruz:** <https://yunohost.org/packaging_apps>

View file

@ -23,7 +23,7 @@ h5ai est un indexeur de fichiers moderne pour les serveurs web HTTP avec un focu
Parmi les fonctionnalités optionnelles, citons : le tri des fichiers, différents modes d'affichage, la localisation, le fil d'Ariane, l'arborescence, les en-têtes et pieds de page personnalisés, le filtrage et la recherche de fichiers, la taille des dossiers, le rafraîchissement automatique, l'emballage...
**Version incluse:** 0.30.0~ynh10
**Version incluse:** 0.30.0~ynh11
**Démo:** <https://larsjung.de/h5ai/demo/>

View file

@ -23,7 +23,7 @@ h5ai is a modern file indexer for HTTP web servers with focus on your files. Dir
Some of the optional features are: file sorting, different view modes, localization, a breadcrumb, a tree view, custom headers and footers, file filter and search, folder sizes, auto refresh, packaged download, QR codes, thumbnails, file previews
**Versión proporcionada:** 0.30.0~ynh10
**Versión proporcionada:** 0.30.0~ynh11
**Demo:** <https://larsjung.de/h5ai/demo/>

54
README_zh_Hans.md Normal file
View file

@ -0,0 +1,54 @@
<!--
注意:此 README 由 <https://github.com/YunoHost/apps/tree/master/tools/readme_generator> 自动生成
请勿手动编辑。
-->
# YunoHost 上的 h5ai
[![集成程度](https://dash.yunohost.org/integration/h5ai.svg)](https://dash.yunohost.org/appci/app/h5ai) ![工作状态](https://ci-apps.yunohost.org/ci/badges/h5ai.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/h5ai.maintain.svg)
[![使用 YunoHost 安装 h5ai](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=h5ai)
*[阅读此 README 的其它语言版本。](./ALL_README.md)*
> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 h5ai。*
> *如果您还没有 YunoHost请参阅[指南](https://yunohost.org/install)了解如何安装它。*
## 概况
h5ai is a modern file indexer for HTTP web servers with focus on your files. Directories are displayed in a appealing way and browsing them is enhanced by different views, a breadcrumb and a tree overview.
### Features
Some of the optional features are: file sorting, different view modes, localization, a breadcrumb, a tree view, custom headers and footers, file filter and search, folder sizes, auto refresh, packaged download, QR codes, thumbnails, file previews
**分发版本:** 0.30.0~ynh11
**演示:** <https://larsjung.de/h5ai/demo/>
## 截图
![h5ai 的截图](./doc/screenshots/screenshot.jpg)
## 文档与资源
- 官方应用网站: <https://larsjung.de/h5ai/>
- 官方管理文档: <https://larsjung.de/h5ai/>
- 上游应用代码库: <https://github.com/lrsjng/h5ai>
- YunoHost 商店: <https://apps.yunohost.org/app/h5ai>
- 报告 bug <https://github.com/YunoHost-Apps/h5ai_ynh/issues>
## 开发者信息
请向 [`testing` 分支](https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing) 发送拉取请求。
如要尝试 `testing` 分支,请这样操作:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing --debug
sudo yunohost app upgrade h5ai -u https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing --debug
```
**有关应用打包的更多信息:** <https://yunohost.org/packaging_apps>

View file

@ -5,7 +5,7 @@ name = "h5ai"
description.en = "Modern HTTP web server index for NGINX"
description.fr = "Serveur moderne d'index pour NGINX"
version = "0.30.0~ynh10"
version = "0.30.0~ynh11"
maintainers = ["alexAubin"]
@ -43,9 +43,8 @@ ram.runtime = "50M"
[resources.sources]
[resources.sources.main]
url = "https://release.larsjung.de/h5ai/h5ai-0.30.0.zip"
sha256 = "fe138305a61d72094beb8c507dab728020158e4b00dae695a60b9803babb3e30"
in_subdir = false
url = "https://github.com/lrsjng/h5ai/archive/refs/tags/v0.30.0.tar.gz"
sha256 = "f1638557ec79e6fe6bd9303b1e9d8d0180a620dbf4811b6c194befa24769800c"
[resources.system_user]
allow_sftp = true

View file

@ -1,19 +1,3 @@
#!/bin/bash
#=================================================
# COMMON VARIABLES
#=================================================
# PHP APP SPECIFIC
#=================================================
#=================================================
# PERSONAL HELPERS
#=================================================
#=================================================
# EXPERIMENTAL HELPERS
#=================================================
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================
nodejs_version="10.15"

View file

@ -1,11 +1,5 @@
#!/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
@ -15,22 +9,8 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_print_info --message="Declaring files to be backed up..."
#=================================================
# BACKUP THE APP MAIN DIR
#=================================================
ynh_backup --src_path="$install_dir" --is_big
#=================================================
# BACKUP THE NGINX CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP THE PHP-FPM CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================

View file

@ -9,13 +9,28 @@
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# INSTALL NODEJS
#=================================================
ynh_script_progression --message="Install nodejs..."
ynh_install_nodejs --nodejs_version=$nodejs_version
ynh_use_nodejs
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Setting up source files..." --weight=4
ynh_script_progression --message="Setting up source files..."
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir"
tmpdir=$(mktemp -d)
ynh_setup_source --dest_dir="$tmpdir"
pushd $tmpdir
npm ci
npm run build
mv build/_h5ai $install_dir/_h5ai
popd
ynh_secure_remove $tmpdir
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
@ -24,7 +39,7 @@ chmod 700 "$install_dir/_h5ai/private/conf"
#=================================================
# SYSTEM CONFIGURATION
#=================================================
ynh_script_progression --message="Adding system configurations related to $app..." --weight=3
ynh_script_progression --message="Adding system configurations related to $app..."
# Create a dedicated PHP-FPM config
ynh_add_fpm_config

View file

@ -1,11 +1,5 @@
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers

View file

@ -1,11 +1,5 @@
#!/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
@ -15,7 +9,7 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_script_progression --message="Restoring the app main directory..." --weight=4
ynh_restore_file --origin_path="$install_dir" --not_mandatory
ynh_restore_file --origin_path="$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"

View file

@ -3,19 +3,30 @@
source _common.sh
source /usr/share/yunohost/helpers
upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# INSTALL NODEJS
#=================================================
ynh_script_progression --message="Install nodejs..."
ynh_install_nodejs --nodejs_version=$nodejs_version
ynh_use_nodejs
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..."
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --keep="_h5ai/private/conf/options.json"
fi
ynh_script_progression --message="Setting up source files..."
tmpdir=$(mktemp -d)
ynh_setup_source --dest_dir="$tmpdir"
pushd $tmpdir
cp $install_dir/_h5ai/private/conf/options.json ./options.json.bkp
npm ci
npm run build
ynh_secure_remove $install_dir/_h5ai
mv build/_h5ai $install_dir/_h5ai
cp ./options.json.bkp $install_dir/_h5ai/private/conf/options.json
popd
ynh_secure_remove $tmpdir
chmod o-rwx "$install_dir"
chown $app:www-data "$install_dir"