Implement CLI commands for batch extraction and PDF generation
- Added command-line interface using Click for `batch_extractor.py` to handle extraction from ZIP and PDF files. - Enhanced `save_to_excel` function to create parent directories for output files. - Updated `build_pdf.py` to include a CLI for generating PDF labels from Excel data. - Improved README.md with detailed usage instructions for the new CLI commands. - Added `click` to requirements.txt for command-line functionality.
This commit is contained in:
@@ -12,6 +12,7 @@ os.environ['PATH'] = gs_path + os.pathsep + os.environ.get('PATH', '')
|
||||
# Мы устанавливаем имя бинарника ДО того, как Pillow начнет его искать
|
||||
PIL.EpsImagePlugin.gs_binary = "gswin32c"
|
||||
|
||||
'''
|
||||
from PIL import Image
|
||||
|
||||
file_path = './data/d46349f7-148a-4301-b6b5-f9a3c70fdf19_04639970975115_2000.eps'
|
||||
@@ -22,4 +23,5 @@ try:
|
||||
img.save('./data/output.png', 'PNG')
|
||||
print("Успех! Файл сохранен в ./data/output.png")
|
||||
except Exception as e:
|
||||
print(f"Опять ошибка: {e}")
|
||||
print(f"Опять ошибка: {e}")
|
||||
'''
|
||||
Reference in New Issue
Block a user