{"id":14065940,"url":"https://github.com/faheel/cleanup","last_synced_at":"2025-03-16T22:32:03.086Z","repository":{"id":62562541,"uuid":"121103531","full_name":"faheel/cleanup","owner":"faheel","description":"A simple command line utility that organises files in a directory into subdirectories","archived":false,"fork":false,"pushed_at":"2023-12-04T07:34:11.000Z","size":14205,"stargazers_count":51,"open_issues_count":0,"forks_count":13,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-13T08:27:32.981Z","etag":null,"topics":["clean","cleaner","cleanup","cli","command-line","command-line-tool","docopt","file-management","file-organiser","file-organization","hue","pipenv","python","python3","utility"],"latest_commit_sha":null,"homepage":"https://faheel.github.io/cleanup","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/faheel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-11T08:42:48.000Z","updated_at":"2024-09-10T05:38:23.000Z","dependencies_parsed_at":"2022-11-03T15:30:59.159Z","dependency_job_id":null,"html_url":"https://github.com/faheel/cleanup","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faheel%2Fcleanup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faheel%2Fcleanup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faheel%2Fcleanup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faheel%2Fcleanup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/faheel","download_url":"https://codeload.github.com/faheel/cleanup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221668784,"owners_count":16860728,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clean","cleaner","cleanup","cli","command-line","command-line-tool","docopt","file-management","file-organiser","file-organization","hue","pipenv","python","python3","utility"],"created_at":"2024-08-13T07:04:51.580Z","updated_at":"2024-10-27T11:29:45.650Z","avatar_url":"https://github.com/faheel.png","language":"Python","readme":"# 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\u0026logo=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","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaheel%2Fcleanup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffaheel%2Fcleanup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaheel%2Fcleanup/lists"}