cleanup


Namecleanup JSON
Version 1.0.4 PyPI version JSON
download
home_pagehttps://github.com/faheel/cleanup
SummaryA simple command line utility that organises files in a directory into subdirectories.
upload_time2023-12-04 07:46:44
maintainer
docs_urlNone
authorSyed Faheel Ahmad
requires_python
licenseMIT
keywords cleanup file-organiser file-organisation file-management hue docopt
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # CleanUp

[![GitHub Actions][gh-actions-shield]][gh-actions-link]
[![PyPI][pypi-shield]][pypi-link]
[![License][license-shield]][license-link]

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

## Usage

![Usage](https://i.imgur.com/iATfu3Y.png)

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.
  
  ```bash
  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.

  ```bash
  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.

  ```bash
  cleanup -r path/to/dir        # revert the cleanup of a directory
  ```

* #### `-h`, `--help`
  
  Displays the help text.

  ```bash
  cleanup -h
  ```

## Development

### Setup

1. Clone the repo and `cd` into it.

2. Set up a Python 3 virtual environment using [pipenv](https://docs.pipenv.org):
   ```bash
   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:
   ```bash
   python3 -m cleanup.cleanup -h
   ```

### Test

Make sure you're in the root directory of the project. You can then run the test using:
```bash
python3 -m tests.test
```

## License

This project is licensed under the terms of the [MIT license][license-link].


[gh-actions-shield]: https://img.shields.io/github/actions/workflow/status/faheel/cleanup/ci.yml?style=for-the-badge&logo=github
[gh-actions-link]: https://github.com/faheel/cleanup/actions/workflows/ci.yml
[pypi-shield]: https://img.shields.io/pypi/v/cleanup.svg?style=for-the-badge
[pypi-link]: https://pypi.org/project/cleanup
[license-shield]: https://img.shields.io/github/license/faheel/cleanup.svg?style=for-the-badge
[license-link]: https://github.com/faheel/cleanup/blob/master/LICENSE

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/faheel/cleanup",
    "name": "cleanup",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "cleanup file-organiser file-organisation file-management hue docopt",
    "author": "Syed Faheel Ahmad",
    "author_email": "faheel@live.in",
    "download_url": "https://files.pythonhosted.org/packages/e2/37/14b7da1821230485310f04dd636f5134848f57910777b96398b5136ce3f2/cleanup-1.0.4.tar.gz",
    "platform": null,
    "description": "# CleanUp\n\n[![GitHub Actions][gh-actions-shield]][gh-actions-link]\n[![PyPI][pypi-shield]][pypi-link]\n[![License][license-shield]][license-link]\n\nA simple command line utility that organises files in a directory into subdirectories based on the files' extensions.\n\n## Usage\n\n![Usage](https://i.imgur.com/iATfu3Y.png)\n\nWhen run without any option, it organises the files in the specified directory into subdirectories based on the files' extensions.\n\n### Options\n\n* #### `-d`, `--dry-run`\n  \n  Just displays the changes that would be made, without actually doing anything.\n  \n  ```bash\n  cleanup -d path/to/dir        # dry run the cleanup\n  cleanup -dr path/to/dir       # dry run the reverting a cleanup\n  ```\n\n* #### `-s`, `--silent`\n  \n  Prevents displaying any information while performing operations. Errors, however, are displayed irrespective of whether this option is enabled or not.\n\n  ```bash\n  cleanup -s path/to/dir        # silently cleanup\n  cleanup -sr path/to/dir       # silently revert a cleanup\n  ```\n\n* #### `-r`, `--revert`\n  \n  Reverts the cleanup of a directory. Note that for this to work, the specified directory should have been cleaned up before.\n\n  ```bash\n  cleanup -r path/to/dir        # revert the cleanup of a directory\n  ```\n\n* #### `-h`, `--help`\n  \n  Displays the help text.\n\n  ```bash\n  cleanup -h\n  ```\n\n## Development\n\n### Setup\n\n1. Clone the repo and `cd` into it.\n\n2. Set up a Python 3 virtual environment using [pipenv](https://docs.pipenv.org):\n   ```bash\n   pipenv --three         # create Python 3 virtual environment\n   pipenv install --dev   # install all dependencies\n   pipenv shell           # activate virtual environment shell\n   ```\n\n3. The cleanup script can now be run from the root directory of the project:\n   ```bash\n   python3 -m cleanup.cleanup -h\n   ```\n\n### Test\n\nMake sure you're in the root directory of the project. You can then run the test using:\n```bash\npython3 -m tests.test\n```\n\n## License\n\nThis project is licensed under the terms of the [MIT license][license-link].\n\n\n[gh-actions-shield]: https://img.shields.io/github/actions/workflow/status/faheel/cleanup/ci.yml?style=for-the-badge&logo=github\n[gh-actions-link]: https://github.com/faheel/cleanup/actions/workflows/ci.yml\n[pypi-shield]: https://img.shields.io/pypi/v/cleanup.svg?style=for-the-badge\n[pypi-link]: https://pypi.org/project/cleanup\n[license-shield]: https://img.shields.io/github/license/faheel/cleanup.svg?style=for-the-badge\n[license-link]: https://github.com/faheel/cleanup/blob/master/LICENSE\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A simple command line utility that organises files in a directory into subdirectories.",
    "version": "1.0.4",
    "project_urls": {
        "Bug Reports": "https://github.com/faheel/cleanup/issues",
        "Homepage": "https://github.com/faheel/cleanup",
        "Source": "https://github.com/faheel/cleanup"
    },
    "split_keywords": [
        "cleanup",
        "file-organiser",
        "file-organisation",
        "file-management",
        "hue",
        "docopt"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d111fd257e347f07829c1d544737b4c756cfb52bf3f9fe295b1d068bde16b6ed",
                "md5": "1fad0737a80b532b0c88c9ae98297abc",
                "sha256": "08486a9e3bf6e13f1c1f8694ea7d73970715515eebb3956adf02734b4ac3057a"
            },
            "downloads": -1,
            "filename": "cleanup-1.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1fad0737a80b532b0c88c9ae98297abc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 39691,
            "upload_time": "2023-12-04T07:46:42",
            "upload_time_iso_8601": "2023-12-04T07:46:42.020593Z",
            "url": "https://files.pythonhosted.org/packages/d1/11/fd257e347f07829c1d544737b4c756cfb52bf3f9fe295b1d068bde16b6ed/cleanup-1.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e23714b7da1821230485310f04dd636f5134848f57910777b96398b5136ce3f2",
                "md5": "bb1c3fac3c0b22727556151f2549e5d8",
                "sha256": "805f2763ec5c0bee392e3d087690503379d5bd7d1e0dada405f27a299e5a03a2"
            },
            "downloads": -1,
            "filename": "cleanup-1.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "bb1c3fac3c0b22727556151f2549e5d8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 40469,
            "upload_time": "2023-12-04T07:46:44",
            "upload_time_iso_8601": "2023-12-04T07:46:44.674387Z",
            "url": "https://files.pythonhosted.org/packages/e2/37/14b7da1821230485310f04dd636f5134848f57910777b96398b5136ce3f2/cleanup-1.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-04 07:46:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "faheel",
    "github_project": "cleanup",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cleanup"
}
        
Elapsed time: 0.14921s