Skip to main content

CleanUp

GitHub Actions PyPI License

A simple command line utility that organises files in a directory into subdirectories based on the files' extensions.

Usage

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

  1. Clone the repo and cd into it.

  2. 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
    
  3. 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.

Metadata

Release files for cleanup 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cleanup 1.0.4
File Size Uploaded
cleanup-1.0.4.tar.gz 40.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cleanup 1.0.4
File Interpreter ABI Platform
cleanup-1.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 80.2 kB

Release files / cleanup-1.0.4.tar.gz

Download URL cleanup-1.0.4.tar.gz
Size 40.5 kB
Tags Source
SHA-256 checksum
How to use checksums
805f2763ec5c0bee392e3d087690503379d5bd7d1e0dada405f27a299e5a03a2
BLAKE2b-256 checksum
How to use checksums
e23714b7da1821230485310f04dd636f5134848f57910777b96398b5136ce3f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / cleanup-1.0.4-py3-none-any.whl

Download URL cleanup-1.0.4-py3-none-any.whl
Size 39.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
08486a9e3bf6e13f1c1f8694ea7d73970715515eebb3956adf02734b4ac3057a
BLAKE2b-256 checksum
How to use checksums
d111fd257e347f07829c1d544737b4c756cfb52bf3f9fe295b1d068bde16b6ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 release files

1.0.3

1 release file

1.0.2

2 release files

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page