Python CLI to stack files in a directory based on type, date and extension.
StackBy uses Google's Fire module to make the command line interface. Refer their docs for mode info.
Install the package from PyPI
$ pip3 install stackby
If you encounter any permission error, use
$ sudo -H pip3 install stackby
StackBy is a handy CLI tool to make your life easier to clean up your folder with random files. Stack by can create separate subdirectories for files based on their extension, type or created date.
CD into the directory to clean up.
$ stackby ext
or simply specify the directory path to clean up.
$ stackby ext DIRECTORY_PATH
$ stackby date
or simply specify the directory path to clean up.
$ stackby date DIRECTORY_PATH
$ stackby type
or simply specify the directory path to clean up.
$ stackby type DIRECTORY_PATH
You can undo the last stacking inside a directory. CD into the directory where files has been stacked from. Make sure there exists the .stackby
file.
$ stackby undo
or simply supply the DIRECTORY_PATH where the .stackby
file resides
$ stackby undo DIRECTORY_PATH
Default DIRECTORY_PATH is the present working directory and by default it reverts all the stacked files in the directory.
To contribute to the project, Please take up the tasks specified in the issues. Add a comment in the issues if you are taking up one.
- Fork the repository to your account.
- Copy the clone url of your repository.
- Clone the repository to your machine
git clone https://github.com/YOUR_USER_NAME/stackby.git
- Make sure you create a branch with the name as the issue you are working on
git checkout -b YOUR_BRANCH_NAME
, and make sure you are working on the same branch and not themaster
, rungit status
to know which branch you are working on, rungit branch
, your branch will be highlighted with an*
. If you are not in your branch or want to move to another branch usegit checkout BRANCH_NAME
. a good branch name should explain what this branch is about eg.stackby_type
,stackby_date
,feature_undo
etc. - Add the upstream url of original repository, follow the instructions here
- Make sure your repository is in sync with the original repository's master branch. Follow the instruction here to know how to keep your local repository in sync.
- Finally when you have made the changes, submit a pull request through github from the original repository, choose your branch against the master of original or create a new branch.