Skip to main content

Move files to directories based on created date

Project description

PyPI version PyPI - Python Version 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.0.tar.gz (225.2 kB view details)

Uploaded Source

Built Distribution

mvdate-0.1.0-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file mvdate-0.1.0.tar.gz.

File metadata

  • Download URL: mvdate-0.1.0.tar.gz
  • Upload date:
  • Size: 225.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for mvdate-0.1.0.tar.gz
Algorithm Hash digest
SHA256 06bd0b89d5cb5c5eac6d050be661a18fb7cc97dc65e3899e47790cf04d93c9cf
MD5 b80b39a010323d19f91176d1141c77f2
BLAKE2b-256 887e7dbd6de4a02072bffe7e4cb8c7403836b5b9b12d8308d2909072efe002c6

See more details on using hashes here.

File details

Details for the file mvdate-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mvdate-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for mvdate-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 78faf53ee6b0c75b4f89736dc02c50f153a13c21b4899bb55792e97c09cc9a69
MD5 d436991668e60aa8415213c73c6c3c8c
BLAKE2b-256 e79a810a4f8a13d997cc9a68606f584a6077ae5ab9834de53f6ab98c20f5b12d

See more details on using hashes here.

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