https://github.com/theimpossibleastronaut/rmwrs
Rust port of rmw
https://github.com/theimpossibleastronaut/rmwrs
cli filemanagement rmw rust utilities wip
Last synced: 3 months ago
JSON representation
Rust port of rmw
- Host: GitHub
- URL: https://github.com/theimpossibleastronaut/rmwrs
- Owner: theimpossibleastronaut
- License: apache-2.0
- Created: 2020-07-22T04:53:40.000Z (over 5 years ago)
- Default Branch: trunk
- Last Pushed: 2022-01-17T20:51:44.000Z (almost 4 years ago)
- Last Synced: 2025-10-10T15:32:02.658Z (3 months ago)
- Topics: cli, filemanagement, rmw, rust, utilities, wip
- Language: Rust
- Homepage:
- Size: 101 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# rmwrs
[](https://github.com/theimpossibleastronaut/rmwrs/actions/workflows/rust.yml)
**Not ready for use**
[rust](https://www.rust-lang.org/) port of [rmw](https://remove-to-waste.info/)
## Current state
*rmwrs* is in a very early development state and may change rapidly.
Running `cargo run -- ` will ReMove a file to a waste folder
(which is specified in the test configuration file) and create a
corresponding `.trashinfo` file into a `waste_parent_info` directory (see
source code for details). Because there's no restore feature yet, if
you'd like to demo or test the program, you should only use files as
arguments that are not essential. For example:
touch foo bar
cargo run -- foo bar
Example 2:
mkdir tmp
touch tmp/foo tmp/bar
cargo run -- tmp/*
You'll see that the files were removed to ~/.rmwrs-Trash-test/files
and corresponding .trashinfo files were created in
~/.rmwrs-Trash-test/info. The .trashinfo file uses the
[FreeDesktop.org Trash specification](https://specifications.freedesktop.org/trash-spec/trashspec-latest.html).
When rmw'ing an item, if a file or directory with the same name already
exists in the waste (or trash) directory, it will not be overwritten;
instead, the current file being rmw'ed will have a time/date string
(formatted as "_%H%M%S-%y%m%d") appended to it (e.g.
'foo_164353-210508').
## -z, --restore FILE(s)
To restore items, specify the path to them in the /files
directory (wildcards ok).
When restoring an item, if a file or directory with the same name
already exists at the destination, the item being restored will
have a time/date string (formatted as "_%H%M%S-%y%m%d") appended
to it (e.g. 'foo_164353-210508').
## Configuration file
*rmwrs* will automatically create a configuration file (rmwrsrc) in
$XDG_CONFIG_HOME (if the environmental variable is set) or `~/.config`.
You can specify an alternate/custom configuration file.
cargo run -- tmp/* -c
## Most Recent List (mrl) file
The names of files that you "remove" will be stored in an mrl file in
$XDG_DATA_HOME/rmwrs (if the environmental variable is set) or
~/.local/share/rmwrs. Each time you run it, the file gets overwritten
with the new filenames.
The mrl file isn't used for anything yet. Later it will be used by the
restore and undo function.
## More Info
To learn more about the design goals for this program, see the
[rmw](https://remove-to-waste.info/) website. The goal of this rust
port is to mimic the features of the C version.