Skip to content

patrickziegler/mediacopier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mediacopier

Build Status

This is an app that searches for tagged media files in a given directory and copies or moves those files to another directory while renaming them according to the specified format. The original creation date is used to generate a folder structure and unique filenames. It supports a wide variety of image and videos formats (including raw) and features lossless on-the-fly auto-rotation of JPEG files.

The app focusses on integrating into the native KDE Plasma notification system and context menu (screenshot) but other desktop environments are supported as well.

Getting Started

⚓ Install via Package Manager

openSUSE

build result

There are packages being built with the Open Build Service. You can add the repostory to your distribution and install mediacopier easily with the following commands:

zypper ar -f https://download.opensuse.org/repositories/home:/zipat:/mediacopier/openSUSE_Tumbleweed/ mediacopier
zypper in mediacopier-plasma

🔨 Build and Install

Direct dependencies (library):

Direct dependencies (tools):

For example on openSUSE, these dependencies can be installed via

zypper install spdlog-devel toml11-devel libexiv2-devel libjpeg8-devel ffmpeg-7-libavformat-devel ffmpeg-7-libavutil-devel # for the core library
zypper install cli11-devel range-v3-devel # for the pure command line interface
zypper install libQt5Widgets-devel libqt5-linguist-devel ki18n-devel kjobwidgets-devel # for the Qt5 based graphical user interface
zypper install ki18n-devel kjobwidgets-devel # for the KDE Plasma integration with Qt5
zypper install qt6-core-devel qt6-widgets-devel qt6-statemachine-devel qt6-linguist-devel # for Qt6 based graphical user interface 
zypper install kf6-ki18n-devel kf6-kjobwidgets-devel # for the KDE Plasma integration with Qt6
zypper install gtest lcov exiftool ImageMagick # for testing

Clone this repository and create a build directory

git clone --recursive https://github.com/patrickziegler/MediaCopier.git
cd MediaCopier && mkdir build && cd build

Build and install the package

export CXX=/usr/bin/g++-13 # set specific compiler (optional)
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=release .. && make -j$(nproc) && sudo make install

Available cmake flags

Flag Description Default
SKIP_GUI Don't build graphical user interface OFF
SKIP_CLI Don't build plain command line interface OFF
SKIP_KDE Don't build KDE Plasma integration OFF
USE_QT5 Build against Qt5 libraries (legacy) OFF
ENABLE_TEST Enable test targets OFF
ENABLE_TEST_COVERAGE Enable test and coverage targets OFF
INSTALL_DEV_FILES Install library headers and cmake targets OFF

🏭 Containerized build environment

Build the container image as specified in the Dockerfile

docker build \
    --build-arg USER_NAME=$(id -nu) \
    --build-arg USER_UID=$(id -u) \
    --build-arg USER_GID=$(id -g) \
    -t mediacopier-build .

Start the build environment with the following command

docker run -it --rm -v ${PWD}:/usr/src/mediacopier -u $(id -nu) mediacopier-build

Alternatively, with rootless podman you don't have to specify the user

podman run -it --rm -v ${PWD}:/usr/src/mediacopier mediacopier-build

Inside the container, run the test suite with the following commands

cmake -DUSE_QT5=ON -DSKIP_GUI=ON -DSKIP_KDE=ON -DENABLE_TEST=ON /usr/src/mediacopier/ && make -j $(nproc) && make test

Alternatively, create a test coverage report like this (result can also be found here)

cmake -DUSE_QT5=ON -DSKIP_GUI=ON -DSKIP_KDE=ON -DENABLE_TEST_COVERAGE=ON /usr/src/mediacopier/ && make -j $(nproc) && make coverage

📎 Build Instructions for Windows

Prepare the vcpkg environment like described in a very helpful article by Sam Elborai

.\bootstrap-vcpkg.bat -disableMetrics
.\vcpkg.exe install spdlog exiv2 libjpeg-turbo ffmpeg range-v3 qt5 --triplet=x64-windows
.\vcpkg.exe list --triplet=x64-windows # check installed packages

Use the vcpkg toolchain file with cmake

cmake -DCMAKE_TOOLCHAIN_FILE=${VCPKG_DIR}\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -DSKIP_KDE=ON -B build -S .
cmake --build build --config Release

License

This project is licensed under the GPL - see the LICENSE file for details

About

Tools for transferring media files and removing duplicates in your photo collections

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published