#restore #delete #directories #safely #txt #settings #trash

app tman

Safely delete and restore files and directories

1 stable release

1.0.0 Jan 21, 2020

#13 in #trash

MIT license

33KB
513 lines

TMAN Build Status

Safely delete and restore files and directories.

BUILD

If you've got rust installed with rustup then just:

git clone https://github.com/kove-w-o-salter/tman
cd ./tman
cargo build --release
cp ./target/release/tman ~/.local/bin/tman

and you're good to go.

USAGE

$ tman --help
USAGE:
    tman <ACTION>

ACTIONS:
    --delete             -D    <FILE_1>...    Delete specified files
    --restore            -R    <FILE>         Restore specified file
        --origin         -o    <PATH>         Set the origin
        --version        -v                   Set the revision
            <VERSION>                         Use a specific version
            latest                            Use the newest version (default)
            all                               Use all versions
    --list               -L                   List items in the trash
        --pattern        -p    <REGEX>        Set the search pattern
        --simple         -p                   Set the simple mode
    --empty              -E                   Permenantly delete trash content

EXAMPLES

  • Move test.txt, test1.txt, test2.txt and test3.txt to the trash run:
    tman -D test{,1,2,3}.txt
    
  • Restore test.txt, test1.txt, test2.txt and test3.txt to the trash run:
    tman -R test{,1,2,3}.txt
    

SETTINGS

Settings are stored in ~/.tman/settings.json. The current available settings are:

  • use_unicode: set to true if you want to see unicode characters in your output, otherwise set to false. Defaults to false.
  • use_colors: set to true if you want to see ANSI formatting in your output, otherwise set to false. Defaults to false.

CONTRIBUTING

I would love to hear what you think.

Any feedback or contributions will be examined and potentially accepted A.S.A.P. So feel free to open issues or PRs.

I am not an experienced develper.

I'm simply a high-school student with an enjoyment of coding and computer science. As such, I cannot guarentee the code quality of this repo.

TODO

  • File/directory restoration.
  • Regex searching
  • Propper error messages.
  • Configuration file.
  • Colored error messages.
  • Progress bars.
  • Custom trash directory.
  • Debug output.
  • Error logging.

Dependencies

~5.5–8.5MB
~141K SLoC