Skip to main content

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/audio 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
    • convert most (managed by ffmpeg) audio formats to MP3
    • 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. Verify ALBUM

    • work only on selected directories
    • Ensure the directory is aligned with the current configuration
    • Insert pictures/video/audio 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/video 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/video/audio files 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/

Release files for piwiPre 0.23.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for piwiPre 0.23.8
File Size Uploaded
piwipre-0.23.8.tar.gz 217.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for piwiPre 0.23.8
File Interpreter ABI Platform
piwiPre-0.23.8-py3-none-any.whl Python 3 none any Details

Total release size: 411.3 kB

Release files / piwipre-0.23.8.tar.gz

Download URL piwipre-0.23.8.tar.gz
Size 217.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2dfa0b71f9f42d0154050e4546bd3eb98379b08771bbb5b4b4c7314ab35d4018
BLAKE2b-256 checksum
How to use checksums
935d7db842bfb7ec838e2f2c01e6fe4c81fd31f00dcda7c327e298f8594fa425
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / piwiPre-0.23.8-py3-none-any.whl

Download URL piwiPre-0.23.8-py3-none-any.whl
Size 193.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
822b6eba8defa05cafecd7780e0f11654c5a141614ce4178af4e6b12d5443b42
BLAKE2b-256 checksum
How to use checksums
0c823db24cbe859aaa9cedaa9508d2986b42173f7b479632a0c4c34817828ee0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release history Release notifications | RSS feed

This release

0.23.8 This release

2 release files

0.23.7

2 release files

0.23.6

2 release files

0.23.5

2 release files

0.23.4

2 release files

0.23.3

2 release files

0.23.1

2 release files

0.23

2 release files

0.22.9

2 release files

0.22.8

2 release files

0.22.7

2 release files

0.22.6

2 release files

0.22.5

2 release files

0.22.4

2 release files

0.22.3

2 release files

0.22.2

2 release files

0.22.1

2 release files

0.22

2 release files

0.21.8

2 release files

0.21.7

2 release files

0.21.6

2 release files

0.21

2 release files

0.20.6

2 release files

0.20.5

2 release files

0.20.4

2 release files

0.20.3

2 release files

0.20.2

2 release files

0.20.1

2 release files

0.20

2 release files

0.19.9

2 release files

0.19.8

2 release files

0.19.7

2 release files

0.19.6

2 release files

0.19

2 release files

0.18.9

2 release files

0.18.8

2 release files

0.17.9

2 release files

0.17.8

2 release files

0.17.7

2 release files

0.17

2 release files

0.8.5

2 release files

0.8.4

2 release files

0.6.11

2 release files

0.6.9

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page