licos-dev-cli 0.2.7__tar.gz → 0.2.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {licos_dev_cli-0.2.7 → licos_dev_cli-0.2.8}/.gitignore +3 -0
- {licos_dev_cli-0.2.7 → licos_dev_cli-0.2.8}/PKG-INFO +2 -2
- {licos_dev_cli-0.2.7 → licos_dev_cli-0.2.8}/pyproject.toml +2 -2
- {licos_dev_cli-0.2.7 → licos_dev_cli-0.2.8}/src/licos_dev_cli/main.py +56 -56
- {licos_dev_cli-0.2.7 → licos_dev_cli-0.2.8}/src/licos_dev_cli/__init__.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: licos-dev-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.8
|
|
4
4
|
Summary: LICOS Dev CLI - generate files and call model capabilities
|
|
5
5
|
Requires-Python: >=3.10
|
|
6
6
|
Requires-Dist: click>=8.1
|
|
7
|
-
Requires-Dist: licos-dev-sdk>=0.2.
|
|
7
|
+
Requires-Dist: licos-dev-sdk>=0.2.9
|
|
@@ -4,11 +4,11 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "licos-dev-cli"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.8"
|
|
8
8
|
description = "LICOS Dev CLI - generate files and call model capabilities"
|
|
9
9
|
requires-python = ">=3.10"
|
|
10
10
|
dependencies = [
|
|
11
|
-
"licos-dev-sdk>=0.2.
|
|
11
|
+
"licos-dev-sdk>=0.2.9",
|
|
12
12
|
"click>=8.1",
|
|
13
13
|
]
|
|
14
14
|
|
|
@@ -76,34 +76,34 @@ def pdf(input_path, content, filename, output_dir, content_type, page_size):
|
|
|
76
76
|
@click.option("--format", "content_type", default="markdown")
|
|
77
77
|
@click.option("--font", default="Arial")
|
|
78
78
|
@click.option("--font-size", default=11, type=int)
|
|
79
|
-
def docx(input_path, content, filename, output_dir, content_type, font, font_size):
|
|
80
|
-
"""Generate DOCX from Markdown or HTML."""
|
|
81
|
-
from licos_dev_sdk import create_docx
|
|
82
|
-
text = _read_input(input_path, content)
|
|
83
|
-
path = create_docx(text, filename, content_type=content_type, output_dir=output_dir, font_name=font, font_size=font_size)
|
|
84
|
-
click.echo(path)
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
@cli.command("docx-template")
|
|
88
|
-
@click.option("-t", "--template", "template_path", required=True, help="DOCX template path")
|
|
89
|
-
@click.option("-i", "--input", "input_path", help="JSON data file")
|
|
90
|
-
@click.option("-d", "--data", "data_content", help="JSON data")
|
|
91
|
-
@click.option("-f", "--filename", required=True)
|
|
92
|
-
@click.option("-o", "--output-dir", default=None)
|
|
93
|
-
def docx_template(template_path, input_path, data_content, filename, output_dir):
|
|
94
|
-
"""Generate DOCX by rendering a DOCX template with JSON data."""
|
|
95
|
-
from licos_dev_sdk import create_docx_from_template
|
|
96
|
-
data = _read_json(input_path, data_content)
|
|
97
|
-
if not isinstance(data, dict):
|
|
98
|
-
raise click.BadParameter("template data must be a JSON object")
|
|
99
|
-
path = create_docx_from_template(template_path, data, filename, output_dir=output_dir)
|
|
100
|
-
click.echo(path)
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
# ── XLSX ─────────────────────────────────────────────────────────────────────
|
|
104
|
-
|
|
105
|
-
@cli.command()
|
|
106
|
-
@click.option("-i", "--input", "input_path")
|
|
79
|
+
def docx(input_path, content, filename, output_dir, content_type, font, font_size):
|
|
80
|
+
"""Generate DOCX from Markdown or HTML."""
|
|
81
|
+
from licos_dev_sdk import create_docx
|
|
82
|
+
text = _read_input(input_path, content)
|
|
83
|
+
path = create_docx(text, filename, content_type=content_type, output_dir=output_dir, font_name=font, font_size=font_size)
|
|
84
|
+
click.echo(path)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
@cli.command("docx-template")
|
|
88
|
+
@click.option("-t", "--template", "template_path", required=True, help="DOCX template path")
|
|
89
|
+
@click.option("-i", "--input", "input_path", help="JSON data file")
|
|
90
|
+
@click.option("-d", "--data", "data_content", help="JSON data")
|
|
91
|
+
@click.option("-f", "--filename", required=True)
|
|
92
|
+
@click.option("-o", "--output-dir", default=None)
|
|
93
|
+
def docx_template(template_path, input_path, data_content, filename, output_dir):
|
|
94
|
+
"""Generate DOCX by rendering a DOCX template with JSON data."""
|
|
95
|
+
from licos_dev_sdk import create_docx_from_template
|
|
96
|
+
data = _read_json(input_path, data_content)
|
|
97
|
+
if not isinstance(data, dict):
|
|
98
|
+
raise click.BadParameter("template data must be a JSON object")
|
|
99
|
+
path = create_docx_from_template(template_path, data, filename, output_dir=output_dir)
|
|
100
|
+
click.echo(path)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
# ── XLSX ─────────────────────────────────────────────────────────────────────
|
|
104
|
+
|
|
105
|
+
@cli.command()
|
|
106
|
+
@click.option("-i", "--input", "input_path")
|
|
107
107
|
@click.option("-c", "--content", help="JSON data")
|
|
108
108
|
@click.option("-f", "--filename", required=True)
|
|
109
109
|
@click.option("-o", "--output-dir", default=None)
|
|
@@ -113,34 +113,34 @@ def xlsx(input_path, content, filename, output_dir, sheet_name, header_color):
|
|
|
113
113
|
"""Generate XLSX from JSON data."""
|
|
114
114
|
from licos_dev_sdk import create_xlsx
|
|
115
115
|
data = _read_json(input_path, content)
|
|
116
|
-
path = create_xlsx(data, filename, output_dir=output_dir, sheet_name=sheet_name, header_color=header_color)
|
|
117
|
-
click.echo(path)
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
@cli.command("xlsx-workbook")
|
|
121
|
-
@click.option("-i", "--input", "input_path")
|
|
122
|
-
@click.option("-c", "--content", help="JSON workbook data")
|
|
123
|
-
@click.option("-f", "--filename", required=True)
|
|
124
|
-
@click.option("-o", "--output-dir", default=None)
|
|
125
|
-
@click.option("--header-color", default="4472C4")
|
|
126
|
-
@click.option("--freeze-header/--no-freeze-header", default=True)
|
|
127
|
-
@click.option("--autofilter/--no-autofilter", default=True)
|
|
128
|
-
def xlsx_workbook(input_path, content, filename, output_dir, header_color, freeze_header, autofilter):
|
|
129
|
-
"""Generate multi-sheet XLSX from JSON workbook data."""
|
|
130
|
-
from licos_dev_sdk import create_xlsx_workbook
|
|
131
|
-
data = _read_json(input_path, content)
|
|
132
|
-
path = create_xlsx_workbook(
|
|
133
|
-
data,
|
|
134
|
-
filename,
|
|
135
|
-
output_dir=output_dir,
|
|
136
|
-
header_color=header_color,
|
|
137
|
-
freeze_header=freeze_header,
|
|
138
|
-
autofilter=autofilter,
|
|
139
|
-
)
|
|
140
|
-
click.echo(path)
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
# ── CSV ──────────────────────────────────────────────────────────────────────
|
|
116
|
+
path = create_xlsx(data, filename, output_dir=output_dir, sheet_name=sheet_name, header_color=header_color)
|
|
117
|
+
click.echo(path)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
@cli.command("xlsx-workbook")
|
|
121
|
+
@click.option("-i", "--input", "input_path")
|
|
122
|
+
@click.option("-c", "--content", help="JSON workbook data")
|
|
123
|
+
@click.option("-f", "--filename", required=True)
|
|
124
|
+
@click.option("-o", "--output-dir", default=None)
|
|
125
|
+
@click.option("--header-color", default="4472C4")
|
|
126
|
+
@click.option("--freeze-header/--no-freeze-header", default=True)
|
|
127
|
+
@click.option("--autofilter/--no-autofilter", default=True)
|
|
128
|
+
def xlsx_workbook(input_path, content, filename, output_dir, header_color, freeze_header, autofilter):
|
|
129
|
+
"""Generate multi-sheet XLSX from JSON workbook data."""
|
|
130
|
+
from licos_dev_sdk import create_xlsx_workbook
|
|
131
|
+
data = _read_json(input_path, content)
|
|
132
|
+
path = create_xlsx_workbook(
|
|
133
|
+
data,
|
|
134
|
+
filename,
|
|
135
|
+
output_dir=output_dir,
|
|
136
|
+
header_color=header_color,
|
|
137
|
+
freeze_header=freeze_header,
|
|
138
|
+
autofilter=autofilter,
|
|
139
|
+
)
|
|
140
|
+
click.echo(path)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
# ── CSV ──────────────────────────────────────────────────────────────────────
|
|
144
144
|
|
|
145
145
|
@cli.command()
|
|
146
146
|
@click.option("-i", "--input", "input_path")
|
|
File without changes
|