A simple command line utility that organises files in a directory into subdirectories.
Project description
CleanUp
A simple command line utility that organises files in a directory into subdirectories based on the files' extensions.
Usage
When run without any option, it organises the files in the specified directory into subdirectories based on the files' extensions.
Options
-
-d
,--dry-run
Just displays the changes that would be made, without actually doing anything.
cleanup -d path/to/dir # dry run the cleanup cleanup -dr path/to/dir # dry run the reverting a cleanup
-
-s
,--silent
Prevents displaying any information while performing operations. Errors, however, are displayed irrespective of whether this option is enabled or not.
cleanup -s path/to/dir # silently cleanup cleanup -sr path/to/dir # silently revert a cleanup
-
-r
,--revert
Reverts the cleanup of a directory. Note that for this to work, the specified directory should have been cleaned up before.
cleanup -r path/to/dir # revert the cleanup of a directory
-
-h
,--help
Displays the help text.
cleanup -h
Development
Setup
-
Clone the repo and
cd
into it. -
Set up a Python 3 virtual environment using pipenv:
pipenv --three # create Python 3 virtual environment pipenv install --dev # install all dependencies pipenv shell # activate virtual environment shell
-
The cleanup script can now be run from the root directory of the project:
python3 -m cleanup.cleanup -h
Test
Make sure you're in the root directory of the project. You can then run the test using:
python3 -m tests.test
License
This project is licensed under the terms of the MIT license.
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 cleanup-1.0.4.tar.gz
.
File metadata
- Download URL: cleanup-1.0.4.tar.gz
- Upload date:
- Size: 40.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 805f2763ec5c0bee392e3d087690503379d5bd7d1e0dada405f27a299e5a03a2 |
|
MD5 | bb1c3fac3c0b22727556151f2549e5d8 |
|
BLAKE2b-256 | e23714b7da1821230485310f04dd636f5134848f57910777b96398b5136ce3f2 |
File details
Details for the file cleanup-1.0.4-py3-none-any.whl
.
File metadata
- Download URL: cleanup-1.0.4-py3-none-any.whl
- Upload date:
- Size: 39.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08486a9e3bf6e13f1c1f8694ea7d73970715515eebb3956adf02734b4ac3057a |
|
MD5 | 1fad0737a80b532b0c88c9ae98297abc |
|
BLAKE2b-256 | d111fd257e347f07829c1d544737b4c756cfb52bf3f9fe295b1d068bde16b6ed |