Skip to content

BoboTiG/shaarlimages

Repository files navigation

Shaarlimages

Shaarlimages, la galerie des shaarlis !

URL : www.shaarlimages.net

API

Galleries:

Files:

RSS feeds (a link is made accessible when clicking on "images" at the top-right on the website):

Production

Copy all files from the host folder to the PythonAnywhere hosting account.

Details:

  • Web app type: Bottle
  • Python version: 3.10
  • Force HTTPS: enabled

Tasks:

  • "Sync all shaarlis":
    • when: daily at 06:00 UTC
    • command: CI=true PYTHONPATH='/home/tiger222/shaarlimages' python -m host sync

Check Batteries Included to know what modules are already provided.

Backup

Command to fully sync back the data on a local machine:

# Usage:
# rsync -avzhe ssh <USER>@ssh.pythonanywhere.com:<SHAARLIMAGES_FOLDER>/data <LOCAL_FOLDER>/

# Example:
$ rsync -avzhe ssh tiger222@ssh.pythonanywhere.com:/home/tiger222/shaarlimages/data /home/tiger-222/projects/shaarlimages/

OSError: write error

In the server logs, we might see lots of OSError: write error messages. They are not related to the current application, more information here.

Development

Installation

$ python3.10 -m venv venv
$ . venv/bin/activate
$ python -m pip install -U pip
$ python -m pip install -r requirements-dev.txt

Quality

$ ./checks.sh

Tests

$ python -m pytest --doctest-modules host tests/unit

# To be run from time to time to ensure solvers are still working
$ python -m pytest tests/integration

Local Server

$ python server.py

CLI

$ python -m host -h

Synchronization

Sync all registered shaarlis:

$ python -m host sync [--force]

Sync any Shaarli instance (registered or not):

$ python -m host sync --url URL [--force]

# Example:
# python -m host sync --url 'https://shaarli.example.org/feed/atom'

In both cases, use --force to (re)sync from the beginning.


Historique

Suite à cette requête.

Ajouter un shaarli

La liste des instances shaarli est récupérée depuis BoboTiG/shaarlis. N'hésitez pas à proposer un patch pour ajouter d'autres liens.

Remerciements