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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mvdate-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ffff6d83ff204af5932eee708901c239382b98729e2ecbb411f1a5c9fd3931aa
MD5 43134c958b7ae0403f4bc893b7be71c1
BLAKE2b-256 e8c89292b75e70bd86dca922e4285ef090a56dff79f119094cda68c18e9b6bc5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for mvdate-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 aefecffd10123db1c95d76f7734ae8a1652c1333b51ca557470b5ae6e7d6561b
MD5 b476a8e108e8e8078d8438a565cc0f17
BLAKE2b-256 7ed2f0a0c73c1de65b8cd49a3438fef5dbb0e0c6ac3da2be5d024a2cb8f368db

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