Skip to content

Slices a pre-defined range into n equal parts or in given chunk size

License

Notifications You must be signed in to change notification settings

citb0in/range_slicer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

range_slicer by citb0in

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

This small tool was created as a result of this discussion on bitcointalk.org.

(back to top)

Built With

Python3 on GNU/Linux

Python3

(back to top)

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

Note: Python2 is not supported.

  • Python3 libs sys, pprint, argparse

Installation

  1. Ensure you are running Python3

    python3 -V
  2. Clone this repository

    git clone https://github.com/citb0in/range_slicer.git
  3. Either make the python program executable

    chmod +x ./range_slicer.py

    and run it by

    ./range_slicer.py

    or just execute it by

    python3 range_slicer.py

(back to top)

Usage

Current version allows two ways of execution. The range is mandatory and must always be entered as a parameter so that the program has something to do. By default, the program will use the "n slices" mode, where n is the number of slices desired. If no input is made for 'n', the default value 2 is used.

However, there are also cases where the user wants a certain size of the slices to be generated and doesn't care about the total number of slices to be generated. I integrated this "chunks" mode that can be used with the command line switch -c (for chunks).

Examples:

Range 20 - 90 will be sliced into 15 equal parts

./range_slicer.py -r 20 90 -n 15

Range 20 - 90 will be sliced into 15 equal parts with non-overlapping range edges

./range_slicer.py -r 20 90 -n 15 -nov

Range 20 - 95 will be sliced into chunks with size of 10

./range_slicer.py -r 20 95 -c -n 10

Display version

./range_slicer.py -V

(back to top)

Roadmap

  • Add Changelog
  • Add back to top links
  • Implement input validation
  • Add "non-overlapping range edges" function to n-slices mode
  • Add hex support
  • Multi-language Support
    • Spanish
    • French
    • Chinese

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the GPLv3 License. See LICENSE.txt for more information.

(back to top)

Contact

@citb0in

Project Link: https://github.com/citb0in/range_slicer

(back to top)

Acknowledgments

Helpful ressources and credits to:

(back to top)

About

Slices a pre-defined range into n equal parts or in given chunk size

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages