Images from the input directory will crop on top and bottom and be saved to
the output directory, according to the config.ini file.
Step 1. Install python
Step 2. Open the application's directory in a terminal or command line.
Step 3. To install requirements, run this command: pip install -r requirements.txt
-
You can simply run program by the command
python path\to\project\directory\main.pyforwindows, andpython3 path\to\project\directory\main.pyforLinuxorMacOs.
Then you will see text interface with text fields for all necessarry data. -
You can add additional
argumentswhile running program.- Arguments will separate by:
existing paths,number, andother text. - First
existing pathwill be considered asdirectory with uncropped images; - Second
existing pathwill be used asdirectory for saving cropped images; - First
numberwill use asnumber of pixels for crop; - First
other textwill use asfirst part of new file names; - All next
other textwill use asextentions of filesyou want to crop.
All arguments that are not included in this list will be ignored.
- Arguments will separate by:
-
Copy 'config.ini' from program directory into working directory, and edit
config.inias you need to.
First of all, run pip install -r requirements.txt in the module's directory to install requirements.
Then you can use the module just like in the test.py example file.
- Revrite with OOP.
A lot of small programs like this don't require OOP. This project isn't so big. It has only about 200 lines of code, but I already had some problems with development. OOP will make code a lot clearer and easier to work with.
- Number converter work wrong
number_converter is ok.
- Add float support
-
diverse_inputwork wrong with incorect config data.
I used wrong variable.
- Add support of iterables as data into
diverse_input.