Move files to directories based on created date
Project description
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
Built Distribution
File details
Details for the file mvdate-0.1.1.tar.gz
.
File metadata
- Download URL: mvdate-0.1.1.tar.gz
- Upload date:
- Size: 226.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ddc8b8178a2c1abfc7b7170dcde879341c9a98677a06a6d09ca671e612530ac0 |
|
MD5 | d271eaced755e9fe07e91a5907198044 |
|
BLAKE2b-256 | 225204216aafc75b32d41c2574f7f6935c0b67aa1ea8b59e5330e2fb376866b5 |
File details
Details for the file mvdate-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: mvdate-0.1.1-py3-none-any.whl
- Upload date:
- Size: 19.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9685ffc7142febfbfc9e5a35fd30f83d3e43d26fa0a6046ba7a85b25120ac0b1 |
|
MD5 | 77e255b95db75f35a8a1d7e90b2cf087 |
|
BLAKE2b-256 | 2f6a63376d894124461e706ad0bd1630c069083566be3814dafd41f30bff35a4 |