Compare commits

4 Commits

Author SHA1 Message Date
dfcffb19e4 Folder restructure 2025-11-10 13:04:02 +00:00
b221fa3534 Release bump to 0.2.0 2025-11-09 11:15:42 +00:00
a24cc8f2b9 remove CONTRIBUTING.md 2025-11-09 11:13:42 +00:00
Marco D'Aleo
d7330933bc Merge pull request #7 from mdaleo404/remove_actions
Remove actions/workflows
2025-11-09 11:11:32 +00:00
9 changed files with 1 additions and 165 deletions

View File

@@ -1,95 +0,0 @@
# How to Contribute to `resrm`
Thanks for your interest in contributing to `resrm`! This guide walks you through the process step by step so you can send contributions with confidence.
### For external contributors
1. **Fork the repository** via GitHub: click *Fork* at the top right.
2. **Clone your fork**:
```bash
git clone https://github.com/<your-username>/resrm.git
cd resrm
```
3. **Add the upstream repo** so you can sync later:
```bash
git remote add upstream https://github.com/mdaleo404/resrm.git
```
4. **Create a feature branch**:
```bash
git checkout -b feature/my-new-thing
```
5. Make your changes and test them locally.
6. **Push to your fork**:
```bash
git push -u origin feature/my-new-thing
```
7. Open a **Pull Request** targeting the `main` branch of the upstream repo.
### For maintainers
You may create branches directly in the main repository without forking.
## Commit Message Style Commit Message Style
To keep the automated changelog clean, follow this commit style:
**Format:**
```
type: short description
```
**Accepted types:**
* `feat:` new features
* `fix:` bug fixes
* `refactor:` internal improvements
* `perf:` performance changes
* `docs:` documentation updates
* `chore:` maintenance
* `test:` test-only changes
**Examples:**
```
feat: add --dry-run flag
fix: handle unicode paths
refactor: simplify cleanup logic
```
Dont overthink it — the maintainer can adjust commit types during merge if needed.
## What Happens After You Submit a PR?
After reviewing your changes, your PR (hopefully) gets merged. Then:
* **Release Please** automatically creates a **release PR** summarizing changes
* The maintainer merges that release PR
* A GitHub Release is created
* The package is published to PyPI
* Wheels, source tarballs, and checksums are attached to the GitHub Release
No need to bump versions manually (unless needed).
## Code Style
* Follow standard Python formatting
* Add type hints when possible
* Keep functions small and readable
* Stick to clear naming
## Need Help, Found a Bug, Have a Request?
If you're unsure about anything:
* **Open an issue**
* Start a discussion
* Ask questions before writing lots of code
## Thank You
Your contributions — large or small — help make `resrm` better for everyone. Thanks for being part of the project!

View File

View File

@@ -1,6 +1,6 @@
[tool.poetry]
name = "resrm"
version = "0.1.1"
version = "0.2.0"
description = "drop-in replacement for rm with undo/restore built-in."
authors = ["Marco D'Aleo <marco@marcodaleo.com>"]
license = "GPL-3.0-or-later"

View File

@@ -1,69 +0,0 @@
# resrm
**resrm** is a safe, drop-in replacement for the Linux `rm` command with **undo/restore support**.
It moves files to a per-user _trash_ instead of permanently deleting them, while still allowing full `sudo` support for root-owned files.
---
## Features
- Move files and directories to a **trash folder** instead of permanent deletion
- Restore deleted files by **short ID or exact basename**
- Empty trash safely
- Supports `-r`, `-f`, `-i`, `--perma` options
- Works with `sudo` for root-owned files
---
## Installation
**NOTE:** To use `resrm` with `sudo`, the path to `resrm` must be in the `$PATH` seen by `root`.\
Either install `resrm` as `root` (_preferred_), use `sudo -E resrm`, or add the `$PATH` to `/etc/sudoers` using its `Defaults secure_path` parameter.
Install via PyPI (_preferred_):
```bash
pip install resrm
```
Or clone the repo and install locally:
```bash
git clone https://github.com/mdaleo404/resrm.git
cd resrm/resrm
poetry install
```
## Usage
```bash
# Move files to trash
resrm file1 file2
# Recursive remove of a directory
resrm -r mydir
# Force remove (ignore nonexistent)
resrm -f file
# Interactive remove
resrm -i file
# Permanent delete (bypass trash)
resrm --perma file
# List trash entries
resrm -l
# Restore a file by ID or basename
resrm --restore <id|name>
# Empty the trash permanently
resrm --empty
```
## Trash Location
Normal users: `~/.local/share/resrm/files`
Root user: `/root/.local/share/resrm/files`