Skip to content
forked from haxzie-xx/stackby

Simple python CLI to stack files in a directory based on type, date and extension

License

Notifications You must be signed in to change notification settings

chaman-k/stackby

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StackBy

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.

Installation

Install the package from PyPI

$ pip3 install stackby

If you encounter any permission error, use

$ sudo -H pip3 install stackby

Usage

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.

Stack files by their extension

CD into the directory to clean up.

$ stackby ext

or simply specify the directory path to clean up.

$ stackby ext DIRECTORY_PATH

stack by creation date

$ stackby date

or simply specify the directory path to clean up.

$ stackby date DIRECTORY_PATH

stack by predefined type

$ stackby type

or simply specify the directory path to clean up.

$ stackby type DIRECTORY_PATH

Undo stacking in a directory

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.

Contributing

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.

Instructions

  • 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 the master, run git status to know which branch you are working on, run git branch, your branch will be highlighted with an *. If you are not in your branch or want to move to another branch use git 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.

About

Simple python CLI to stack files in a directory based on type, date and extension

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%