licos-dev-cli 0.2.6__tar.gz → 0.2.7__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.
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: licos-dev-cli
3
- Version: 0.2.6
3
+ Version: 0.2.7
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
7
+ Requires-Dist: licos-dev-sdk>=0.2.8
@@ -4,11 +4,11 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "licos-dev-cli"
7
- version = "0.2.6"
7
+ version = "0.2.7"
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.7",
11
+ "licos-dev-sdk>=0.2.8",
12
12
  "click>=8.1",
13
13
  ]
14
14
 
@@ -76,18 +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
- # ── XLSX ─────────────────────────────────────────────────────────────────────
88
-
89
- @cli.command()
90
- @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")
91
107
  @click.option("-c", "--content", help="JSON data")
92
108
  @click.option("-f", "--filename", required=True)
93
109
  @click.option("-o", "--output-dir", default=None)
@@ -97,11 +113,34 @@ def xlsx(input_path, content, filename, output_dir, sheet_name, header_color):
97
113
  """Generate XLSX from JSON data."""
98
114
  from licos_dev_sdk import create_xlsx
99
115
  data = _read_json(input_path, content)
100
- path = create_xlsx(data, filename, output_dir=output_dir, sheet_name=sheet_name, header_color=header_color)
101
- click.echo(path)
102
-
103
-
104
- # ── 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 ──────────────────────────────────────────────────────────────────────
105
144
 
106
145
  @cli.command()
107
146
  @click.option("-i", "--input", "input_path")
File without changes