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.

For more detailed information on the topics below please visit the documentation.

Motivation

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

Installation

mvdate is available from PyPI to install...

pip install mvdate

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

Development

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

pip install mvdate@git+https://codeberg.org/slackline/mvdate.git@main

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 ssh://git@codeberg.org/slackline/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 pre-commit pipeline that is 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.3.tar.gz (285.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mvdate-0.1.3-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mvdate-0.1.3.tar.gz
  • Upload date:
  • Size: 285.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for mvdate-0.1.3.tar.gz
Algorithm Hash digest
SHA256 807bf29bc094e2f6431ebc3c65a386cdc058f383ecf30b38d7d75c630d0f035b
MD5 0f850cc4cda39449373492082ad1a0ae
BLAKE2b-256 6c2d39d78c4b991e64ba20e609354d85894fa8a028059c78e2e8170a738c5dac

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mvdate-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for mvdate-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 02ec4409773474292c60288dfe8de4c2d35b5fc5a30a1a911d66a3d2b32ceed2
MD5 d5cac6ee18d172c106ee6179a8e363b7
BLAKE2b-256 f34130c4c5573af4f8d2c45658ab6047076e618c276283b322737d717a145b75

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page