Skip to content

actx4gh/Imaegete

Repository files navigation

Imaegete - Image Viewer and Sorting Application

Imaegete is a Qt-based image management and sorting application. Its implementation is intended to perform well with large file libraries on local or remote storage. It allows users to organize, view, move, and delete images using customizable categories. The app is designed to be both a GUI and command-line utility with various configurable options.

Features

  • Organize images into custom categories
  • Delete and move images to predefined folders
  • Use keyboard shortcuts for fast navigation
  • Supports configuration via CLI arguments and YAML config file
  • Logging of all operations for tracking

Screenshots

Screenshot of imaegete displaying an image of a dog named Ya-hoo

Installation

Requirements

The following dependencies are required to run the application:

Install the dependencies using the requirements.txt file:

pip install -r requirements.txt

Running the Application

You can run the application from the command line with various options either by specifying command-line arguments or by using a configuration file.

1. Running with CLI Arguments

python main.py --categories cat1 cat2 --start_dirs /path/to/images --log_dir /path/to/logs --cache_dir /path/to/cache
Available CLI Arguments:
  • --categories: A list of categories to organize images into.
  • --sort_dir: Base directory to put sorting folders. Defaults to the starting directory.
  • --start_dirs: The directory where images are stored. Defaults to the current working directory.
  • --log_dir: Directory where logs are stored. Defaults to the config/logs directory.
  • --cache_dir: Directory where cached data is stored. Defaults to the config/cache directory.
  • --config: Path to the YAML configuration file for loading settings (alternative to CLI options).

Example:

python main.py --categories cats dogs --start_dirs ./images --log_dir ./logs --cache_dir ./cache

2. Running with Configuration File

You can specify the configuration file by using the --config option:

python main.py --config config.yaml
Example Config File (YAML):
categories:
  - Category1
  - Category2
log_dir: /path/to/logs
cache_dir: /path/to/cache
start_dirs: 
  - /path/to/images
sort_dir: /path/to/sorted

This configuration allows you to preload settings instead of passing them as CLI arguments.

Logging

By default, all operations are logged in the imaegete.log file (or another specified log location). You can check the logs for any errors or operations performed by the application.

Keyboard Shortcuts

The following keyboard shortcuts are available for quick navigation and management of images:

Action Key
Next Image Right
Previous Image Left
First Image Home
Last Image End
Random Image R
Delete Image Delete
Undo Last Action U
Toggle Fullscreen F
Toggle Slideshow S
Quit Application Q

These shortcuts can be used within the GUI to perform operations quickly.

Slideshow Feature

Overview

The application now includes a slideshow mode that automatically cycles through images at a set interval. Users can control the direction of image cycling (next, previous, or random) and manually set the cycling rate by tapping the appropriate shortcut keys multiple times. When the slideshow is turned off, the cycling rate resets to its default value of 3 seconds.

Slideshow Controls:

  • Toggle Slideshow On/Off: Press the S key to start or stop the slideshow.
  • Manual Image Cycling: Use the following shortcut keys to manually cycle through images:
    • Next Image: [Specify the key, e.g., Right Arrow or another key]
    • Previous Image: [Specify the key, e.g., Left Arrow or another key]
    • Random Image: [Specify the key, e.g., R or another key]

Manual Rate Setting:

  • To manually set the cycling rate, press any of the cycle shortcut keys twice in succession. The interval between the key presses will become the new cycling rate.
  • After 1 minute of inactivity, the manual rate setting times out if only pressed once

Development

To contribute to this project, clone the repository and install the dependencies as specified in the requirements.txt.

Running Tests

The project contains unit tests that are written using pytest. To run the tests, execute the following:

pytest

The tests cover key components like configuration parsing, image handling, and logging.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

New Features

Animation Speed Controls

  • Keyboard Shortcuts: You can now control the animation speed in slideshows using the following keys:

    • [ : Decrease animation speed.
    • ] : Increase animation speed.
    • = : Reset animation speed to normal.
  • Dynamic Speed Adjustment: The ImageDisplay class now includes methods for adjusting frame delay in animations, allowing dynamic speed control during playback.

Enhanced Slideshow Feature

  • Improved Slideshow Control: Slideshow toggling and cycling are now integrated with the animation speed controls, providing a more interactive user experience.
  • Smooth Frame Transitions: The on_frame_changed method in ImageDisplay has been refactored to apply speed offsets, ensuring smooth frame transitions.
  • Configurable Speed Control Keys: New speed control keys are defined in config.py, making it easy to adjust key bindings as needed.

Key Bindings

  • Key Bindings for Speed Control: Added new shortcuts for speed control to key_binder.py, connecting them to the respective methods in ImageDisplay.

Releases

No releases published

Packages

No packages published

Languages