diff --git a/ALL_README.md b/ALL_README.md index 3d6c579..77b7509 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,6 +1,6 @@ # All available README files by language - [Read the README in English](README.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) diff --git a/README.md b/README.md index 477c0c9..f3f8418 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ It shall NOT be edited by hand. [![Install Shiori with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=shiori) -*[Read this README is other languages.](./ALL_README.md)* +*[Read this README in other languages.](./ALL_README.md)* > *This package allows you to install Shiori 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.* @@ -28,7 +28,7 @@ Shiori is a simple bookmarks manager written in Go language. Intended as a simpl - Where possible, by default shiori will download a static copy of the webpage in simple text and HTML format, which later can be used as an offline archive for that page. -**Shipped version:** 1.5.5~ynh4 +**Shipped version:** 1.6.1~ynh1 ## Screenshots diff --git a/README_eu.md b/README_eu.md new file mode 100644 index 0000000..36b07df --- /dev/null +++ b/README_eu.md @@ -0,0 +1,57 @@ + + +# Shiori YunoHost-erako + +[![Integrazio maila](https://dash.yunohost.org/integration/shiori.svg)](https://dash.yunohost.org/appci/app/shiori) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/shiori.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/shiori.maintain.svg) + +[![Instalatu Shiori YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=shiori) + +*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)* + +> *Pakete honek Shiori YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.* +> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.* + +## Aurreikuspena + +Shiori is a simple bookmarks manager written in Go language. Intended as a simple clone of Pocket. You can use it as command line application or as web application. This application is distributed as a single binary, which means it can be installed and used easily. + +### Features + +- Simple and clean command line interface. +- Basic bookmarks management i.e. add, edit and delete. +- Search bookmarks by their title, tags, URL and page content. +- Import and export bookmarks from and to Netscape Bookmark file. +- Simple web interface for those who don't want to use a command line app. +- Where possible, by default shiori will download a static copy of the webpage in simple text and HTML format, which later can be used as an offline archive for that page. + + +**Paketatutako bertsioa:** 1.6.1~ynh1 + +## Pantaila-argazkiak + +![Shiori(r)en pantaila-argazkia](./doc/screenshots/screenshot.png) + +## Dokumentazioa eta baliabideak + +- Erabiltzaileen dokumentazio ofiziala: +- Administratzaileen dokumentazio ofiziala: +- Jatorrizko aplikazioaren kode-gordailua: +- YunoHost Denda: +- Eman errore baten berri: + +## Garatzaileentzako informazioa + +Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/shiori_ynh/tree/testing). + +`testing` abarra probatzeko, ondorengoa egin: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/shiori_ynh/tree/testing --debug +edo +sudo yunohost app upgrade shiori -u https://github.com/YunoHost-Apps/shiori_ynh/tree/testing --debug +``` + +**Informazio gehiago aplikazioaren paketatzeari buruz:** diff --git a/README_fr.md b/README_fr.md index 7b241b1..844ca31 100644 --- a/README_fr.md +++ b/README_fr.md @@ -28,7 +28,7 @@ Shiori est un simple gestionnaire de signets écrit en langage Go. Conçu comme - Dans la mesure du possible, shiori téléchargera par défaut une copie statique de la page Web au format texte simple et HTML, qui pourra ensuite être utilisée comme archive hors ligne pour cette page. -**Version incluse :** 1.5.5~ynh4 +**Version incluse :** 1.6.1~ynh1 ## Captures d’écran diff --git a/README_gl.md b/README_gl.md index 2d029ba..d85e937 100644 --- a/README_gl.md +++ b/README_gl.md @@ -28,7 +28,7 @@ Shiori is a simple bookmarks manager written in Go language. Intended as a simpl - Where possible, by default shiori will download a static copy of the webpage in simple text and HTML format, which later can be used as an offline archive for that page. -**Versión proporcionada:** 1.5.5~ynh4 +**Versión proporcionada:** 1.6.1~ynh1 ## Capturas de pantalla diff --git a/README_it.md b/README_it.md index 4afe0a6..b6df590 100644 --- a/README_it.md +++ b/README_it.md @@ -28,7 +28,7 @@ Shiori is a simple bookmarks manager written in Go language. Intended as a simpl - Where possible, by default shiori will download a static copy of the webpage in simple text and HTML format, which later can be used as an offline archive for that page. -**Versione pubblicata:** 1.5.5~ynh4 +**Versione pubblicata:** 1.6.1~ynh1 ## Screenshot diff --git a/conf/nginx.conf b/conf/nginx.conf index 0345df9..7aebb6c 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,7 +1,7 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { - proxy_pass http://127.0.0.1:__PORT__; + proxy_pass http://127.0.0.1:__PORT__/; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; diff --git a/conf/systemd.service b/conf/systemd.service index 2df65bb..1141906 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -8,7 +8,7 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ -ExecStart=__INSTALL_DIR__/shiori serve --port __PORT__ --webroot __PATH__ +ExecStart=__INSTALL_DIR__/shiori server --port __PORT__ --webroot __PATH__ Restart=always Environment="SHIORI_DIR=__DATA_DIR__" diff --git a/doc/POST_INSTALL.md b/doc/POST_INSTALL.md index 3c719a4..0ac921d 100644 --- a/doc/POST_INSTALL.md +++ b/doc/POST_INSTALL.md @@ -1 +1 @@ -The default account is `shiori` with password `gopher`. It is removed once another 'owner' account is created. +The default account is `shiori` with password `gopher`. Please manually remove it after you create your own account. diff --git a/doc/POST_INSTALL_fr.md b/doc/POST_INSTALL_fr.md index 3d29ddd..2eb087c 100644 --- a/doc/POST_INSTALL_fr.md +++ b/doc/POST_INSTALL_fr.md @@ -1 +1 @@ -Le compte par défaut est `shiori` avec le mot de passe `gopher`. Il est supprimé une fois qu'un autre compte « propriétaire » est créé. +Le compte par défaut est `shiori` avec le mot de passe `gopher`. Veuillez le supprimer manuellement après avoir créé votre propre compte. diff --git a/manifest.toml b/manifest.toml index 52b525b..be66941 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,9 +5,9 @@ name = "Shiori" description.en = "Simple bookmark manager" description.fr = "Gestionnaire de liens simple" -version = "1.5.5~ynh4" +version = "1.6.1~ynh1" -maintainers = ["eric_G"] +maintainers = [] [upstream] license = "MIT" @@ -45,12 +45,12 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - amd64.url = "https://github.com/go-shiori/shiori/releases/download/v1.5.5-rc.2/shiori_Linux_x86_64.tar.gz" - amd64.sha256 = "928adfc3d927b718c7bd75396bbb3a34cb542676374b6c89bb3da92063ac099c" - arm64.url = "https://github.com/go-shiori/shiori/releases/download/v1.5.5-rc.2/shiori_Linux_aarch64.tar.gz" - arm64.sha256 = "98fc7c8114264b338838089a6ab7c4ce326224fac4f498b6ecc4bfab2d3d3c78" - armhf.url = "https://github.com/go-shiori/shiori/releases/download/v1.5.5-rc.2/shiori_Linux_arm.tar.gz" - armhf.sha256 = "3ac24d434ff7a76bb3a8810e6c23caf28a7040c67756fec99a2483f04a197f77" + amd64.url = "https://github.com/go-shiori/shiori/releases/download/v1.6.1/shiori_Linux_x86_64.tar.gz" + amd64.sha256 = "db48033c3289cfb54a9436cd269b968acc4184e1e7179dfe128bcbdbe5a258e2" + arm64.url = "https://github.com/go-shiori/shiori/releases/download/v1.6.1/shiori_Linux_aarch64.tar.gz" + arm64.sha256 = "f581355b4dce02cbf594bb2cfebd31867b09b4112feb09ff35a17de37181ef48" + armhf.url = "https://github.com/go-shiori/shiori/releases/download/v1.6.1/shiori_Linux_arm.tar.gz" + armhf.sha256 = "017479e7835150e098a59dbf3d20bb4e5866b69e195d88d7ff45407bc1f9e05f" in_subdir = false autoupdate.strategy = "latest_github_release" autoupdate.asset.amd64 = "^shiori_Linux_x86_64.tar.gz$" diff --git a/scripts/backup b/scripts/backup index 737146f..c8931d8 100755 --- a/scripts/backup +++ b/scripts/backup @@ -21,6 +21,12 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$install_dir" +#================================================= +# BACKUP THE APP DATA DIR +#================================================= + +ynh_backup --src_path="$data_dir" --is_big + #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 9f1d860..145a290 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -40,6 +40,39 @@ chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" chmod +x "$install_dir/shiori" +#================================================= +# MIGRATE AND UPGRADE +#================================================= + +if [ "$upgrade_type" == "UPGRADE_APP" ] +then + if ynh_compare_current_package_version --comparison lt --version 1.50~ynh9 + then + ynh_script_progression --message="Migrating sqlite from version < 1.50~ynh9..." --weight=1 + FTS4_EXISTS=$(sqlite3 "$data_dir/shiori.db" "SELECT sql FROM sqlite_master WHERE type = 'table' AND name = 'bookmark_content' AND sql LIKE '%USING fts4%';") + if [ -z "$FTS4_EXISTS" ] + then + echo "No FTS4 table found or already migrated" + else + sqlite3 "$data_dir/shiori.db" "BEGIN TRANSACTION; CREATE VIRTUAL TABLE bookmark_content_fts5 USING fts5(title, content, html, docid); INSERT INTO bookmark_content_fts5 (title, content, html, docid) SELECT title, content, html, docid FROM bookmark_content; DROP TABLE bookmark_content; ALTER TABLE bookmark_content_fts5 RENAME TO bookmark_content; COMMIT;" + fi + + SCHEMA_MIGRATIONS_EXISTS=$(sqlite3 "$data_dir/shiori.db" "SELECT name FROM sqlite_master WHERE type='table' AND name='schema_migrations';") + if [ -z "$SCHEMA_MIGRATIONS_EXISTS" ]; then + echo "No schema_migrations table found, skipping" + else + DIRTY=$(sqlite3 "$data_dir/shiori.db" "SELECT dirty FROM schema_migrations WHERE dirty = 1;") + if [ -z "$DIRTY" ]; then + echo "No dirty migrations found, skipping" + else + VERSION=$(sqlite3 "$data_dir/shiori.db" "SELECT version FROM schema_migrations WHERE dirty = 1;") + NEW_VERSION=$((VERSION - 1)) + sqlite3 "$data_dir/shiori.db" "UPDATE schema_migrations SET version = $NEW_VERSION, dirty = 0 WHERE dirty = 1;" + fi + fi + fi +fi + #================================================= # REAPPLY SYSTEM CONFIGURATIONS #=================================================