This console application is intended for PNG image generation
based on Excel spreadsheet.
For each cell, except those contained in the zero columns
and rows, an image is created with transliterated text
from this cell.
For each column a folder is created with the name from the
zero row. File name for each image matches to text in zero
column of corresponding row. Files, which created for each
column, are placed in the folder of matched column. Aligning
text in an image - centered.
It is assumed that you have installed Python
and the
package manager pip
.
Install necessary dependencies:
pip install requirements.txt
All parameters are optional. You can specify parameters in any order.
- Help -h, --help
Brief parameters description. - Path to table -n, --name
Specify the path to the table with which you plan to work. The default spreadsheet istest_table.xlsx
from this repository. - Sheet -sh, --sheet
Specify the number of the required sheet (starting from 0) or its title. - Font -f, --font
Specify the path to the font file. In Windows 10, it is enough to specify name (for preinstalled fonts). Times New Roman is used by default. - Background colour -b, --back
Specify background colour inRGB
orhex
. White is used by default. - Text colour -t, --text
Specify background colour inRGB
orhex
. Black is used by default. - Text size -s, --size
Enter integer number, 80 by default. - Width padding -w, --wpad
Enter integer number, 20 by default. - Height indent -hp, --hpad
Enter integer number, 10 by default. - Path to the folder -p, --path
Specify path to the folder in which you want to save the result of application work. If the specified folder exists, the files will be written to it. By defaultimages
is created.
Example of using parameters:
main_file.py -n new_table.xlsx -sh 0 -f BOOKOS.TTF -b '#d5b59c' -t rgb'(13, 33, 79)' -s 90 -w 30 -hp 20 -p 'new_example'