Skip to main content

Move files to directories based on created date

Project description

PyPI version PyPI - Python Version pre-commit Code style: black Code style: flake8 Code style: Ruff) Downloads Downloads Downloads Donate

mvdate

A Python package to search for files and move them to a directory structure based on date.

Motivation

I keep my pictures in a hierarchical data structure of YYYY/MM/DD but that isn't how my camera stores them. I wanted an easy way to copy/move files to this structure.

Installation

mvdate is available from PyPI to install...

pip install mvdate

Development

If you wish to try the development version you can install directly using pip...

pip install mvdate@git+https://gitlab.com/nshephard/mvdate.git@main

Or if you are likely to want to tinker you can clone the repository and install (although you may wish to fork and clone that if you want to contribute).

git clone git@gitlab.com:nshephard/mvdate.git
cd mvdate
pip install .

Usage

To search the current directory for files ending with png and move them to ~/pics/YYYY/MM/DD/

mvdate --base ./ --destination ~/pics/ --ext png

For all options see the help

mvdate --help

Contributing

If you want to contribute merge requests are more than welcome. Fork and clone the repository and install the development and test dependencies.

mkvirtualenv mvdate # Or similar depending on your preferences
git clone git@gitlab.com:nshephard/mvdate.git
cd mvdate
pip install .[dev,tests]
pre-commit install

I use various tools to lint and test the package, mostly via pre-commit. These include pre-commit-hooks, black, markdownlint-cli2 and ruff. By using pre-commit locally any contributions should then pass the GitLab CI pipelines I have in place.

Links

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

mvdate-0.1.2.tar.gz (285.7 kB view hashes)

Uploaded Source

Built Distribution

mvdate-0.1.2-py3-none-any.whl (19.6 kB view hashes)

Uploaded Python 3

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