Skip to content

spicylemonade/punch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


Logo

punch

πŸ—‚οΈ file and folder management written in rust πŸ“„

About punch πŸ’‘

It can be kind of easy to forget which bash command does what, for folder creation, we have mkdir, for files cat and touch , and for deletion we have rm, each of them has its own flags and ways to append multiple, so why not just have one command do it all.

Name inspired by the touch command

commands:

πŸ“’ NOTE: all commands can't be joined together any number of times

  • ex: punch <flag(optional)> <file or directory_name> <file or directory_name> ...
  • punch ./folder1/ file1.txt file2.txt ./folder2 ./folder3 "to create multiple files and folders"

all directories must start with "./" and end with "/"

  • punch --help "to bring up help"
  • punch <file_name>... "to create file" or directory
  • punch -r <file1> <file2> "to rename a file"
  • punch -d <file_name> "or"  punch -d ./<directory_name>/ "to delete"
  • πŸ””(bonus)

  • punch -in ./<target_directory_name>/ <file or directory_name> "creates files inside target directory"
  • punch -din ./<target_directory_name>/ <file or directory_name> "deletes files inside target directory"
  • punch -t <file or directory_name> "trashed the specified file or directory"
  • punch -m <file names separated by spaces e.g. test.txt test1.txt> <./<directory_name>/ or number_of_moves: number>
  • punch -l "Lists the sub-directories and files in the current working directory"
  • punch -o "opens file with default application"
  • punch -u "undoes the last create or trash command"
  • punch --sizeof "returns the size of a file/folder"
  • punch -s "displays a table of file creation/deletion/trash history"

Built With

Rust Bash

Downloading ⬇️

  1. Download zip corresponding release for your os (linux-punch.zip, windows-punch.zip)
  2. Extract the zip file into home directory

Linux:

  • go into folder and run source config.sh or . ./config.sh
  • also available in the aur "punch-git"

Windows:

  • rename the folder to ".punch" then go into the folder and run .\config.ps1

Building from Source 🎁

  1. Clone the repo
    git clone https://github.com/spicylemonade/punch.git
  2. CD into the project
    cd ./punch
  3. Run the build script
    source build.sh
    or
     . ./build.sh

    For Windows ->

     ./build.ps1

If the build ends in an error you may not have the c libraries installed:

for debian based systems ->

  sudo apt-get install build-essential

for arch based

  sudo pacman -Sy base-devel

for windows ->

run .\vs_BuildTools.exe in the punch clone directory then click on "Desktop Development with c++" and install

{To top}

Examples

image

image

{To top}

contributions:eyes:

contributions are welcome, just fork and pull request