Skip to content

Toolbox for copying media files and removing duplicates in your photo collections

License

Notifications You must be signed in to change notification settings

patrickziegler/mediacopier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

370 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mediacopier

Build Status Coverage Status

This app 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.

Valid format specifiers for the renaming pattern can be found here.

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:

SUSE_DIST=openSUSE_Tumbleweed # use '16.0' for Leap 16
zypper addrepo --refresh https://download.opensuse.org/repositories/home:/zipat:/mediacopier/${SUSE_DIST}/ mediacopier
zypper install mediacopier-plasma

🔨 Manually Build and Install

Dependencies:

For openSUSE, these dependencies can be installed via the following commands

zypper install \
    spdlog-devel toml11-devel cli11-devel \
    libexiv2-devel libjpeg8-devel ffmpeg-7-libavformat-devel ffmpeg-7-libavutil-devel \
    qt6-core-devel qt6-widgets-devel qt6-statemachine-devel qt6-linguist-devel \
    kf6-ki18n-devel kf6-kjobwidgets-devel \
    gtest lcov clang exiftool ImageMagick

Clone this repository and create a build directory

git clone https://github.com/patrickziegler/MediaCopier.git
cd MediaCopier && mkdir build && cd $_

Build and install the package

export CC=gcc-14 CXX=g++-14 # 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
ENABLE_CLANG_TIDY Enable static code analysis with clang-tidy OFF

🏭 Containerized Build Environment (for development purposes)

Build und run the container image as specified in the Dockerfile with the following commands

docker build -t mediacopier-build .
docker run -it --rm -v ${PWD}:/run/src/mediacopier -u $(id -u):$(id -g) mediacopier-build

Inside the container, run the test suite or generate coverage reports with the following commands

cmake -DUSE_QT5=ON -DENABLE_TEST_COVERAGE=ON -DENABLE_CLANG_TIDY=ON /run/src/mediacopier/ && make formatcheck && make -j $(nproc) && make test && make coverage

📎 Build Instructions for Windows

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

Note

These instructions haven't been tested for a while and likely won't work (without updating the package list at least)

.\bootstrap-vcpkg.bat -disableMetrics
.\vcpkg.exe install spdlog exiv2 libjpeg-turbo ffmpeg 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

Toolbox for copying media files and removing duplicates in your photo collections

Topics

Resources

License

Stars

Watchers

Forks