A daemon-based file deletion utility
Project description
Dswell
A daemon-based file deletion utility that allows you to schedule files or directories for deletion after a specified time period.
Why did I create this?
- I often end up writing temporary scripts and then forgetting to delete them, so they clutter my workspace.
What does it do?
- It automatically removes files after a specified age—you just pass the duration in hours, minutes, and seconds (for example, 1h30m3s), and it deletes the file after the specified time period.
dswell
Usage: dswell [OPTIONS] COMMAND [ARGS]...
dswell - Delayed file deletion utility
Options:
--help Show this message and exit.
Commands:
create Create a file or directory and schedule it for deletion.
list List all pending file/directory deletions.
Installation
# Install from source
git clone https://github.com/Agent-Hellboy/dswell.git
cd dswell
pip install -e .
# Or install directly from PyPI (current source is not updated)
pip install dswell
Usage
Create a file or directory that will be automatically deleted after a specified time:
# Create a file that will be deleted after 1 hour
dswell create --file test.txt --time 1h
# Create a directory that will be deleted after 30 minutes
dswell create --dir test_dir --time 30m
Time format supports:
- Hours (h)
- Minutes (m)
- Seconds (s)
Development
Setup Development Environment
# Clone the repository
git clone https://github.com/Agent-Hellboy/dswell.git
cd dswell
# Install development dependencies
pip install -e ".[dev]"
# Install pre-commit hooks
pre-commit install
Running Tests
# Run all tests
python -m pytest tests/
# Run tests with coverage
python -m pytest tests/ --cov=src/dswell
Code Quality
The project uses several tools to maintain code quality:
- black: Code formatting
- ruff: Linting
- isort: Import sorting
- pytest: Testing
Run all checks:
tox
Or run individual checks:
tox -e black # Run black
tox -e ruff # Run ruff
tox -e isort # Run isort
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Author
Prince Roshan - princekrroshan01@gmail.com
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dswell-0.1.0.tar.gz.
File metadata
- Download URL: dswell-0.1.0.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2393317ccc08f29f02dbeb6b45d7e38a5a422e49a8e8b5fbfbbb2e183d54d08
|
|
| MD5 |
e1204da9e69fad970f32915f59fe5377
|
|
| BLAKE2b-256 |
44f145fcee0d138489857ba2bba631aa61605c754d4fe2621021eb24937f5e79
|
File details
Details for the file dswell-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dswell-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a89b5e0deed850a3034cbfeeac888490b64780bef85889d88244655edeacd4e
|
|
| MD5 |
9dbfd39503690107cc39e26fcee8d3a9
|
|
| BLAKE2b-256 |
edd34853492679a2a290812d76c6625b23a229f8f0c9275ab7f2ab3152a2177c
|