Package: redh
RedhandRedhand (redh) is a command line tool for managing files and directories. This is my first project to build a command line tool, which is supposed to be more advanced in the next versions. I would greatly appreciate your participation on this project.Table of Contents:How to installQuick lookCommandsscan - Find files and directories in the systemgrab - Getting files and directories from a specific locationopen - Show captured contentdrop - Drop the collected contents in a specified placethrow - Remove the contents collected by their indexwash - Delete all collected content.org - Sort and organize files and folders as desiredContributeResourcesHow to installYou can download and install this tool directly frompypirepository bypipmodule. (Make sure you are using Python3)python3 -m pip install redhQuick lookRed Hand is a simple but useful tool for moving files and directories, which is very easy to work with. This tool also uses regex to filter contents.You can ask anything you need to know from the --help option. Just write --help after each command to provide you with information about each command. You can also do this to get a general guide:redh --helpoutput:Usage: redh [OPTIONS] COMMAND [ARGS]...

  Redhand is a command line tool for managing files and directories.

  To access the help of each command, use the --help option after
  writing the command.

  Github repo: https://github.com/mimseyedi/redh

Options:
  --version  Version of Redhand.
  --help     Show this message and exit.

Commands:
  drop   The Redhand leaves the files and directories it took in...
  grab   The Redhand takes the files and directories you specified.
  open   The contents of the hand will be displayed.
  org    Arranges and organizes the selected contents.
  scan   Search and check the desired files and directories.
  throw  It discards the contents of the hand by their index.
  wash   All contents in the hand are completely erased.Also, to find out about the Redhand version, you can do as follows:redh --versionoutput:1.0.0CommandsThe Redhand has very simple commands that you can easily learn how to use with the help of this guide.scanWith the help of this command, you can find the files or directories you are looking for with the help of regex. Also, this command gives you a safe space to create regex patterns.The scan command accepts only one argument from you, which must be between two single quotes and follow a regex expression.redh scan 'txt$'output:1 - f - /home/user/Desktop/homeworks.txt
2 - f - /home/user/Desktop/about.txt
3 - f - /home/user/Desktop/note.txtThe output shows us 3 things:Theindexof each file or directory found.Type the content found.fmeans file anddmeans directory.Thefull addressof the content found.grabWith the help of this command, you can ask the Redhand to take files and directories for you and carry them anywhere you want. Of course, you should consider that he only remembers theaddressesand copies them when moving. Therefore, if you take a content by hand and then delete it on the spot, the Redhand willnot considerit anymore.You can directly point to what you wantone by oneor group them with the help ofregex.Note:To use regex here, you must use two single quotes between two double quotes.redh grab about.txt "'^Big+.+mkv$'" homeworks.txtoutput:'/home/user/Desktop/about.txt' successfully grabbed by hand!
'/home/user/Desktop/Big_bang_theory_S1_E1.mkv' successfully grabbed by hand!
'/home/user/Desktop/Big_bang_theory_S1_E2.mkv' successfully grabbed by hand!
'/home/user/Desktop/Big_bang_theory_S1_E3.mkv' successfully grabbed by hand!
'/home/user/Desktop/homeworks.txt' successfully grabbed by hand!openWith this command, all the contents of the hand that have already been taken will be displayed.The output shows us 3 things:Theindexof each file or directory.Type the content.fmeans file anddmeans directory.Thefull addressof the content.Just enter the open command:redh openoutput:1 - f - /home/user/Desktop/about.txt
2 - f - /home/user/Desktop/Big_bang_theory_S1_E1.mkv
3 - f - /home/user/Desktop/Big_bang_theory_S1_E2.mkv
4 - f - /home/user/Desktop/Big_bang_theory_S1_E3.mkv
5 - f - /home/user/Desktop/homeworks.txtAlso, the open command has an option called-f, which you can search among the contents with the help of regex:redh open -f 'mkv$'output1 - f - /home/user/Desktop/Big_bang_theory_S1_E1.mkv
2 - f - /home/user/Desktop/Big_bang_theory_S1_E2.mkv
3 - f - /home/user/Desktop/Big_bang_theory_S1_E3.mkvdropWith this command, you can copy the contents of the Redhand to the place you choose.Using the -a option, you can copy all the contents:redh drop -aoutput:'/home/user/Desktop/about.txt' was copied successfully!
'/home/user/Desktop/Big_bang_theory_S1_E1.mkv' was copied successfully!
'/home/user/Desktop/Big_bang_theory_S1_E2.mkv' was copied successfully!
'/home/user/Desktop/Big_bang_theory_S1_E3.mkv' was copied successfully!
'/home/user/Desktop/homeworks.txt' was copied successfully!Or you can directly copy them by referring to the content index:redh drop 1 5output:'about.txt' was copied successfully!
'homeworks.txt' was copied successfully!throwWith this command, you can delete files or directories from the red hand by referring to the content index.redh throw 2 3 4output:'/home/user/Desktop/Big_bang_theory_S1_E1.mkv' was successfully thrown away!
'/home/user/Desktop/Big_bang_theory_S1_E2.mkv' was successfully thrown away!
'/home/user/Desktop/Big_bang_theory_S1_E3.mkv' was successfully thrown away!And then:redh openoutput:1 - f - /home/user/Desktop/about.txt
2 - f - /home/user/Desktop/homeworks.txtwashWith this command, all contents inside the red hand will be deleted.redh washoutput:The Hand washed successfully!And then:redh openoutput:The Hand is empty!orgWith this command, you can transfer the desired contents that you specified with the help of regex to the directory you want:redh org 'py$' PythonThis command means to move all Python files to a directory called Python. If a directory with this name already exists, the files will be moved there, and if not, a directory with this name will be created.ContributeI welcome your ideas to develop this tool. The options that I thought about for the next version include:An option for the grab command to make areal copyof a file or directory to preserve if it is deleted.Add an option for the drop command to usecutinstead of copy.Addingfilteringwith the help ofregexto thedropandthrowcommands.Add alog systemto record and review all activities performed.And ...ResourcesI used theclickmodule to make this tool command.I also got help from the link below to convert thisscriptinto acommand line tool:https://towardsdatascience.com/how-to-build-and-publish-command-line-applications-with-python-96065049abc1Thanks.