Skip to main content

pictures & video preparation tool for piwigo

Project description

piwiPre

piwiPre is a python/windows tool to prepare pictures and video for piwigo (and any other album management), and maintain the piwigo album and database

It was initially developed for a piwigo instance running on a remote server such as a Synology NAS, while the 'photo' and 'thumbnails' directories are accessible from a PC where piwiPre is run, but it can run on many other configurations.

Many features can be useful even when piwigo is not used.

piwiPre executes the following tasks:

  1. Read configuration files and command-line argument to insure a high level of configuration.

  2. Process new pictures/video on the local host in the TRIAGE directory and copy them on the piwigo server

    • process copy of content and leave original unmodified
    • convert most (managed by python) pictures formats to JPG
    • convert most (managed by ffmpeg) video formats to MP4
    • realign picture rotation, according to EXIF data
    • perform correction on picture/video dates according to settings
    • insert metadata (copyright, instructions, author) in the JPEG IPTC or MP4 file
    • rename pictures according to a user-defined scheme
    • replace by '_' characters that piwigo does not support in filenames
    • avoid collision of filenames
    • create the corresponding sub-album in piwigo, inserted in the increasing order of subdirectories
    • put updated copies into ALBUM, through file copy, NFS or ssh/sftp
    • build piwigo thumbnails, even for video
    • copy thumbnails to the appropriate location, through file copy, NFS or ssh/sftp
    • self-configure ALBUM for maintenance
    • update the piwigo SQL database with metadata and MD5 checksum
  3. Maintain ALBUM

    • work only on selected directories
    • Ensure the directory is aligned with the current configuration
    • Insert pictures and video in the piwigo database, with metadata, md5 checksum and author
    • Update the information stored in the piwigo database
  4. log intensively the actions

piwiPre comes with:

  • a Windows installer: pwpInstaller.exe, with and without Graphical User Interface (--gui true)
  • a GUI that can be used to configure and/or run the program : piwiPre --gui true
  • cmdline versions of piwiPre and pwpInstaller
  • a python version of pwpConfigurator, that runs on Linux and Windows
  • Python source code,
  • a Python library downloadable from Pypi,
  • Windows Executable versions
  • 74 configuration items
  • a complete user documentation in English and French (see bellow)
  • test coverage at 95% of the code

what piwiPre does not

piwiPre does not manage synology thumbnails created by Synology file-station in @eaDir directories, which is not a concern because those thumbnails are small (less than 500KB).

How to get piwiPre

How to use piwiPre (short)

  1. Copy new pictures and videos from your cameras to the TRIAGE directory.

  2. Create subdirectories is TRIAGE according to your taste

    • The name of the subdirectory will be a base for the new filename of pictures
    • move files into one of those.
  3. Optionally edit the pictures in TRIAGE with digiKam, gimp or other image processing tool.

  4. If you want managed files to be written to a remote piwigo server, then you need a piwiPre.ini configuration file.

    • If it does not exist, create one by running 'piwiPre --gui true'
    • If ALBUM, THUMBNAILS and AUTO-CONFIG directories are accessible, album, thumbnails and auto-config should be set.
    • If the sql database is accessible, sql-user, sql-pwd, sql-host, sql-port should be set.
    • You may want to change the (english speaking) default values for month-name, copyright, instructions.
  5. Run piwiPre

  6. Results:

    • pictures have metadata inserted
    • picture rotation is reset to default
    • Files are renamed according to directories, dates
    • the thumbnails are generated
    • the corresponding sub-album has been created in piwigo, inserted in the increasing order of subdirectories
    • files have been copied to ALBUM
    • piwigo database is updated
    • so, the corresponding pictures should be visible in piwigo without further action
    • piwiPre.log holds an exhaustive log

piwiPre as a tool

piwiPre is also a command-line tool, with command-line options. For more information:

piwiPre --help or python -m piwiPre --help

Documentation

Documentation is built using Sphinx https://www.sphinx-doc.org/

Documentation is generated in https://fabien_battini.gitlab.io/piwipre/html/ This process is achieved automatically through gitlab CI pipelines.

gitlab: https://gitlab.com/fabien_battini/piwipre

doc : https://fabien_battini.gitlab.io/piwipre/html/

test coverage: https://fabien_battini.gitlab.io/piwipre/html/htmlcov/index.html

pypi: https://pypi.org/project/piwipre/

LinkedIN: https://www.linkedin.com/in/fabien-battini-supelec/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

piwipre-0.20.3.tar.gz (177.0 kB view details)

Uploaded Source

Built Distribution

piwiPre-0.20.3-py3-none-any.whl (160.8 kB view details)

Uploaded Python 3

File details

Details for the file piwipre-0.20.3.tar.gz.

File metadata

  • Download URL: piwipre-0.20.3.tar.gz
  • Upload date:
  • Size: 177.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for piwipre-0.20.3.tar.gz
Algorithm Hash digest
SHA256 d2f7f31a32e570b85d4e494417b487f6f0064fc2eac53ac132062bddc1af6f08
MD5 153ec7a6ab6eb25e71e88c1f4f77f80f
BLAKE2b-256 4cb729dd944202161374f7fb45901f4c954a42292a1ad5bf63c2774a47e4de32

See more details on using hashes here.

File details

Details for the file piwiPre-0.20.3-py3-none-any.whl.

File metadata

  • Download URL: piwiPre-0.20.3-py3-none-any.whl
  • Upload date:
  • Size: 160.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for piwiPre-0.20.3-py3-none-any.whl
Algorithm Hash digest
SHA256 64907735d3f40c9720cf77cbd946759f7da2a1e47734678e4e1a48d83f1ed1d1
MD5 67efcef6a82a50cc369953922bd10523
BLAKE2b-256 be7ee77a2c410d76b850cace3f68d83e8f631af30c56e04d9b6667ed0061029d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page