pdfgen-juanipis 0.1.3__py3-none-any.whl → 0.1.4__py3-none-any.whl

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.
Files changed (38) hide show
  1. pdfgen_juanipis/__init__.py +18 -0
  2. {pdfgen → pdfgen_juanipis}/api.py +33 -1
  3. {pdfgen → pdfgen_juanipis}/cli.py +14 -3
  4. {pdfgen → pdfgen_juanipis}/render.py +9 -2
  5. pdfgen_juanipis/schema.json +272 -0
  6. {pdfgen → pdfgen_juanipis}/validator.py +1 -1
  7. {pdfgen_juanipis-0.1.3.dist-info → pdfgen_juanipis-0.1.4.dist-info}/METADATA +35 -10
  8. pdfgen_juanipis-0.1.4.dist-info/RECORD +33 -0
  9. pdfgen_juanipis-0.1.4.dist-info/entry_points.txt +2 -0
  10. pdfgen_juanipis-0.1.4.dist-info/top_level.txt +1 -0
  11. pdfgen/__init__.py +0 -17
  12. pdfgen/schema.json +0 -126
  13. pdfgen_juanipis-0.1.3.dist-info/RECORD +0 -33
  14. pdfgen_juanipis-0.1.3.dist-info/entry_points.txt +0 -2
  15. pdfgen_juanipis-0.1.3.dist-info/top_level.txt +0 -1
  16. {pdfgen → pdfgen_juanipis}/assets/banner-clean.png +0 -0
  17. {pdfgen → pdfgen_juanipis}/assets/banner.png +0 -0
  18. {pdfgen → pdfgen_juanipis}/assets/fonts/BCDEEE_Calibri_5.ttf +0 -0
  19. {pdfgen → pdfgen_juanipis}/assets/fonts/BCDFEE_CenturyGothic-Bold_9.ttf +0 -0
  20. {pdfgen → pdfgen_juanipis}/assets/fonts/BCDGEE_CenturyGothic-Bold_14.ttf +0 -0
  21. {pdfgen → pdfgen_juanipis}/assets/fonts/BCDHEE_Calibri-Bold_20.ttf +0 -0
  22. {pdfgen → pdfgen_juanipis}/assets/fonts/BCDIEE_Calibri-Bold_25.ttf +0 -0
  23. {pdfgen → pdfgen_juanipis}/assets/fonts/BCDJEE_Calibri_27.ttf +0 -0
  24. {pdfgen → pdfgen_juanipis}/assets/fonts/BCDKEE_Calibri-Italic_33.ttf +0 -0
  25. {pdfgen → pdfgen_juanipis}/assets/fonts/BCDLEE_Calibri-Italic_52.ttf +0 -0
  26. {pdfgen → pdfgen_juanipis}/assets/fonts/BCDMEE_SegoeUI_54.ttf +0 -0
  27. {pdfgen → pdfgen_juanipis}/assets/fonts/BCDNEE_SegoeUI_60.ttf +0 -0
  28. {pdfgen → pdfgen_juanipis}/assets/fonts/BCDOEE_Aptos Narrow,Bold_142.ttf +0 -0
  29. {pdfgen → pdfgen_juanipis}/assets/fonts/BCDPEE_Aptos Narrow,Bold_144.ttf +0 -0
  30. {pdfgen → pdfgen_juanipis}/assets/fonts/BCEAEE_Aptos Narrow_149.ttf +0 -0
  31. {pdfgen → pdfgen_juanipis}/assets/fonts/BCEBEE_Aptos Narrow_154.ttf +0 -0
  32. {pdfgen → pdfgen_juanipis}/assets/fonts/TimesNewRomanPS-BoldMT_38.ttf +0 -0
  33. {pdfgen → pdfgen_juanipis}/assets/logo.png +0 -0
  34. {pdfgen → pdfgen_juanipis}/pagination.py +0 -0
  35. {pdfgen → pdfgen_juanipis}/templates/boletin.css +0 -0
  36. {pdfgen → pdfgen_juanipis}/templates/boletin_template.html.jinja +0 -0
  37. {pdfgen_juanipis-0.1.3.dist-info → pdfgen_juanipis-0.1.4.dist-info}/WHEEL +0 -0
  38. {pdfgen_juanipis-0.1.3.dist-info → pdfgen_juanipis-0.1.4.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,18 @@
1
+ """PDF generation package."""
2
+
3
+ from pdfgen_juanipis.render import render_pdf, build_sample_data
4
+ from pdfgen_juanipis.validator import validate_and_normalize
5
+ from pdfgen_juanipis.pagination import LayoutConfig, Paginator
6
+ from pdfgen_juanipis.api import PDFGen, PDFGenConfig, render_with_defaults, render_with_defaults_bytes
7
+
8
+ __all__ = [
9
+ "render_pdf",
10
+ "build_sample_data",
11
+ "validate_and_normalize",
12
+ "LayoutConfig",
13
+ "Paginator",
14
+ "PDFGen",
15
+ "PDFGenConfig",
16
+ "render_with_defaults",
17
+ "render_with_defaults_bytes",
18
+ ]
@@ -2,7 +2,7 @@ import pathlib
2
2
  from dataclasses import dataclass
3
3
  from typing import Any, Dict, Optional
4
4
 
5
- from pdfgen.render import render_pdf
5
+ from pdfgen_juanipis.render import render_pdf
6
6
 
7
7
 
8
8
  @dataclass
@@ -55,6 +55,26 @@ class PDFGen:
55
55
  root_dir=self.config.root_dir,
56
56
  )
57
57
 
58
+ def render_bytes(
59
+ self,
60
+ data: Dict[str, Any],
61
+ paginate: bool = True,
62
+ validate: bool = True,
63
+ css_extra: Optional[str] = None,
64
+ ) -> bytes:
65
+ return render_pdf(
66
+ data,
67
+ output_path=None,
68
+ paginate=paginate,
69
+ validate=validate,
70
+ css_extra=css_extra,
71
+ template_dir=self.config.template_dir,
72
+ css_path=self.config.css_path,
73
+ fonts_conf=self.config.fonts_conf,
74
+ root_dir=self.config.root_dir,
75
+ output_bytes=True,
76
+ )
77
+
58
78
 
59
79
  def render_with_defaults(
60
80
  data: Dict[str, Any],
@@ -67,3 +87,15 @@ def render_with_defaults(
67
87
  root = pathlib.Path(root_dir) if root_dir else pathlib.Path.cwd()
68
88
  config = PDFGenConfig.from_root(root)
69
89
  PDFGen(config).render(data, output_path, paginate=paginate, validate=validate, css_extra=css_extra)
90
+
91
+
92
+ def render_with_defaults_bytes(
93
+ data: Dict[str, Any],
94
+ root_dir: Optional[pathlib.Path] = None,
95
+ paginate: bool = True,
96
+ validate: bool = True,
97
+ css_extra: Optional[str] = None,
98
+ ) -> bytes:
99
+ root = pathlib.Path(root_dir) if root_dir else pathlib.Path.cwd()
100
+ config = PDFGenConfig.from_root(root)
101
+ return PDFGen(config).render_bytes(data, paginate=paginate, validate=validate, css_extra=css_extra)
@@ -4,7 +4,7 @@ import pathlib
4
4
  import sys
5
5
  import tempfile
6
6
 
7
- from pdfgen.api import PDFGen, PDFGenConfig
7
+ from pdfgen_juanipis.api import PDFGen, PDFGenConfig
8
8
 
9
9
 
10
10
  def _build_fonts_conf(fonts_dir: pathlib.Path) -> pathlib.Path:
@@ -45,7 +45,7 @@ def _load_data(path: pathlib.Path, fmt: str | None = None):
45
45
 
46
46
 
47
47
  def main(argv=None) -> int:
48
- parser = argparse.ArgumentParser(description="pdfgen CLI")
48
+ parser = argparse.ArgumentParser(description="pdfgen-juanipis CLI")
49
49
  sub = parser.add_subparsers(dest="command", required=True)
50
50
 
51
51
  render = sub.add_parser("render", help="Render a PDF from JSON/YAML")
@@ -60,6 +60,7 @@ def main(argv=None) -> int:
60
60
  render.add_argument("--format", dest="fmt", default=None, help="Input format: json|yaml")
61
61
  render.add_argument("--no-validate", action="store_true")
62
62
  render.add_argument("--no-paginate", action="store_true")
63
+ render.add_argument("--stdout", action="store_true", help="Write PDF bytes to stdout")
63
64
 
64
65
  validate = sub.add_parser("validate", help="Validate JSON/YAML input against schema")
65
66
  validate.add_argument("input", help="Path to JSON/YAML data (or - for stdin)")
@@ -69,7 +70,7 @@ def main(argv=None) -> int:
69
70
  args = parser.parse_args(argv)
70
71
 
71
72
  if args.command == "validate":
72
- from pdfgen.validator import validate_and_normalize
73
+ from pdfgen_juanipis.validator import validate_and_normalize
73
74
 
74
75
  root_dir = pathlib.Path(args.root_dir)
75
76
  data = _load_data(pathlib.Path(args.input), fmt=args.fmt)
@@ -92,6 +93,16 @@ def main(argv=None) -> int:
92
93
 
93
94
  data = _load_data(pathlib.Path(args.input), fmt=args.fmt)
94
95
 
96
+ if args.stdout:
97
+ pdf_bytes = PDFGen(config).render_bytes(
98
+ data,
99
+ paginate=not args.no_paginate,
100
+ validate=not args.no_validate,
101
+ css_extra=args.css_extra,
102
+ )
103
+ sys.stdout.buffer.write(pdf_bytes)
104
+ return 0
105
+
95
106
  PDFGen(config).render(
96
107
  data,
97
108
  output_path=pathlib.Path(args.output),
@@ -8,8 +8,8 @@ from weasyprint import HTML, CSS
8
8
  if __name__ == "__main__" and __package__ is None:
9
9
  sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[2] / "src"))
10
10
 
11
- from pdfgen.pagination import LayoutConfig, Paginator
12
- from pdfgen.validator import validate_and_normalize
11
+ from pdfgen_juanipis.pagination import LayoutConfig, Paginator
12
+ from pdfgen_juanipis.validator import validate_and_normalize
13
13
 
14
14
  ROOT = pathlib.Path(__file__).resolve().parents[2]
15
15
  PACKAGE_ROOT = pathlib.Path(__file__).resolve().parent
@@ -303,6 +303,7 @@ def render_pdf(
303
303
  fonts_conf=None,
304
304
  css_extra=None,
305
305
  root_dir=None,
306
+ output_bytes=False,
306
307
  ):
307
308
  root_dir = pathlib.Path(root_dir) if root_dir else ROOT
308
309
  template_dir = pathlib.Path(template_dir) if template_dir else TEMPLATE_DIR
@@ -334,7 +335,13 @@ def render_pdf(
334
335
  if css_extra:
335
336
  stylesheets.append(CSS(string=str(css_extra)))
336
337
 
338
+ if output_bytes or output_path is None:
339
+ return HTML(string=html, base_url=str(root_dir)).write_pdf(
340
+ stylesheets=stylesheets
341
+ )
342
+
337
343
  HTML(string=html, base_url=str(root_dir)).write_pdf(output_path, stylesheets=stylesheets)
344
+ return None
338
345
 
339
346
  print(f"Wrote {output_path}")
340
347
 
@@ -0,0 +1,272 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "PDFGenJuanipisDocument",
4
+ "type": "object",
5
+ "additionalProperties": true,
6
+ "properties": {
7
+ "title": {
8
+ "type": "string"
9
+ },
10
+ "refs_catalog": {
11
+ "type": "object",
12
+ "additionalProperties": {
13
+ "type": "string"
14
+ }
15
+ },
16
+ "theme": {
17
+ "type": "object",
18
+ "properties": {
19
+ "header_banner_path": {
20
+ "type": "string"
21
+ },
22
+ "header_banner_path_cont": {
23
+ "type": "string"
24
+ },
25
+ "header_logo_path": {
26
+ "type": "string"
27
+ },
28
+ "title_line1": {
29
+ "type": "string"
30
+ },
31
+ "title_line2": {
32
+ "type": "string"
33
+ },
34
+ "footer_site": {
35
+ "type": "string"
36
+ },
37
+ "footer_phone": {
38
+ "type": "string"
39
+ },
40
+ "show_header_titles": {
41
+ "type": "boolean"
42
+ }
43
+ },
44
+ "additionalProperties": true
45
+ },
46
+ "sections": {
47
+ "type": "array",
48
+ "items": {
49
+ "$ref": "#/definitions/section"
50
+ }
51
+ },
52
+ "pages": {
53
+ "type": "array",
54
+ "items": {
55
+ "$ref": "#/definitions/page"
56
+ }
57
+ }
58
+ },
59
+ "anyOf": [
60
+ {
61
+ "required": [
62
+ "sections"
63
+ ]
64
+ },
65
+ {
66
+ "required": [
67
+ "pages"
68
+ ]
69
+ }
70
+ ],
71
+ "definitions": {
72
+ "section": {
73
+ "type": "object",
74
+ "properties": {
75
+ "title": {
76
+ "type": "string"
77
+ },
78
+ "subtitle": {
79
+ "type": "string"
80
+ },
81
+ "content": {
82
+ "type": "array",
83
+ "items": {
84
+ "$ref": "#/definitions/block"
85
+ }
86
+ },
87
+ "refs": {
88
+ "type": "array",
89
+ "items": {
90
+ "type": "string"
91
+ }
92
+ },
93
+ "footer_notes": {
94
+ "type": "array",
95
+ "items": {
96
+ "type": "string"
97
+ }
98
+ }
99
+ },
100
+ "required": [
101
+ "content"
102
+ ],
103
+ "additionalProperties": true
104
+ },
105
+ "page": {
106
+ "type": "object",
107
+ "properties": {
108
+ "blocks": {
109
+ "type": "array",
110
+ "items": {
111
+ "$ref": "#/definitions/block"
112
+ }
113
+ },
114
+ "refs": {
115
+ "type": "array",
116
+ "items": {
117
+ "type": "string"
118
+ }
119
+ },
120
+ "footer_notes": {
121
+ "type": "array",
122
+ "items": {
123
+ "type": "string"
124
+ }
125
+ }
126
+ },
127
+ "required": [
128
+ "blocks"
129
+ ],
130
+ "additionalProperties": true
131
+ },
132
+ "block": {
133
+ "type": "object",
134
+ "properties": {
135
+ "type": {
136
+ "type": "string",
137
+ "enum": [
138
+ "text",
139
+ "table",
140
+ "figure",
141
+ "map_grid",
142
+ "html"
143
+ ]
144
+ },
145
+ "text": {
146
+ "type": [
147
+ "string",
148
+ "array"
149
+ ],
150
+ "items": {
151
+ "type": "string"
152
+ }
153
+ },
154
+ "html": {
155
+ "type": "string"
156
+ },
157
+ "refs": {
158
+ "type": "array",
159
+ "items": {
160
+ "type": "string"
161
+ }
162
+ },
163
+ "footer_notes": {
164
+ "type": "array",
165
+ "items": {
166
+ "type": "string"
167
+ }
168
+ },
169
+ "table": {
170
+ "$ref": "#/definitions/table"
171
+ },
172
+ "path": {
173
+ "type": "string"
174
+ },
175
+ "caption": {
176
+ "type": "string"
177
+ },
178
+ "wide": {
179
+ "type": "boolean"
180
+ },
181
+ "items": {
182
+ "type": "array",
183
+ "items": {
184
+ "type": "object",
185
+ "properties": {
186
+ "path": {
187
+ "type": "string"
188
+ },
189
+ "label": {
190
+ "type": "string"
191
+ }
192
+ },
193
+ "required": [
194
+ "path"
195
+ ],
196
+ "additionalProperties": true
197
+ }
198
+ },
199
+ "source": {
200
+ "type": "string"
201
+ }
202
+ },
203
+ "required": [
204
+ "type"
205
+ ],
206
+ "additionalProperties": true
207
+ },
208
+ "table": {
209
+ "type": "object",
210
+ "properties": {
211
+ "groups": {
212
+ "type": "array",
213
+ "items": {
214
+ "type": "object",
215
+ "properties": {
216
+ "title": {
217
+ "type": "string"
218
+ },
219
+ "months": {
220
+ "type": "array",
221
+ "items": {
222
+ "type": "string"
223
+ }
224
+ }
225
+ },
226
+ "required": [
227
+ "title",
228
+ "months"
229
+ ],
230
+ "additionalProperties": true
231
+ }
232
+ },
233
+ "rows": {
234
+ "type": "array",
235
+ "items": {
236
+ "type": "object",
237
+ "properties": {
238
+ "dep": {
239
+ "type": "string"
240
+ },
241
+ "vals": {
242
+ "type": "array",
243
+ "items": {
244
+ "type": "string"
245
+ }
246
+ }
247
+ },
248
+ "required": [
249
+ "dep",
250
+ "vals"
251
+ ],
252
+ "additionalProperties": true
253
+ }
254
+ },
255
+ "total_width": {
256
+ "type": "number"
257
+ },
258
+ "dep_width": {
259
+ "type": "number"
260
+ },
261
+ "show_header": {
262
+ "type": "boolean"
263
+ }
264
+ },
265
+ "required": [
266
+ "groups",
267
+ "rows"
268
+ ],
269
+ "additionalProperties": true
270
+ }
271
+ }
272
+ }
@@ -220,7 +220,7 @@ def _extract_ref_ids(text: str) -> List[str]:
220
220
 
221
221
  def _validate_schema(data: Dict[str, Any], root_dir: pathlib.Path) -> List[str]:
222
222
  warnings: List[str] = []
223
- schema_path = root_dir / "src" / "pdfgen" / "schema.json"
223
+ schema_path = root_dir / "src" / "pdfgen_juanipis" / "schema.json"
224
224
  if not schema_path.exists():
225
225
  schema_path = pathlib.Path(__file__).resolve().parent / "schema.json"
226
226
  if not schema_path.exists():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pdfgen-juanipis
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: HTML-to-PDF generator with pagination and validation
5
5
  Author-email: Juan Pablo Díaz Correa <juanipis@gmail.com>
6
6
  License-Expression: MIT
@@ -19,7 +19,7 @@ Requires-Dist: jsonschema==4.23.0
19
19
  Requires-Dist: PyYAML==6.0.2
20
20
  Dynamic: license-file
21
21
 
22
- # pdfgen
22
+ # pdfgen-juanipis
23
23
 
24
24
  Librería para generar PDFs a partir de data estructurada (HTML + WeasyPrint), con paginación, validación y soporte JSON/YAML.
25
25
 
@@ -29,12 +29,18 @@ Desde el repo:
29
29
 
30
30
  ```bash
31
31
  pip install -e .
32
+
33
+ Desde PyPI:
34
+
35
+ ```bash
36
+ pip install pdfgen-juanipis
37
+ ```
32
38
  ```
33
39
 
34
40
  ## Uso básico (Python)
35
41
 
36
42
  ```python
37
- from pdfgen.api import PDFGenConfig, PDFGen
43
+ from pdfgen_juanipis.api import PDFGenConfig, PDFGen
38
44
 
39
45
  config = PDFGenConfig.from_root("/ruta/a/tu/proyecto")
40
46
  pdf = PDFGen(config)
@@ -45,30 +51,40 @@ pdf.render(data, output_path="salida.pdf", paginate=True, validate=True)
45
51
  Atajo:
46
52
 
47
53
  ```python
48
- from pdfgen.api import render_with_defaults
54
+ from pdfgen_juanipis.api import render_with_defaults
49
55
 
50
56
  render_with_defaults(data, output_path="salida.pdf", root_dir="/ruta/a/tu/proyecto")
51
57
  ```
52
58
 
59
+ ## Salida en bytes
60
+
61
+ Si no quieres escribir a disco:
62
+
63
+ ```python
64
+ from pdfgen_juanipis.api import render_with_defaults_bytes
65
+
66
+ pdf_bytes = render_with_defaults_bytes(data, root_dir="/ruta/a/tu/proyecto")
67
+ ```
68
+
53
69
  ## CLI
54
70
 
55
71
  Render (JSON o YAML):
56
72
 
57
73
  ```bash
58
- pdfgen render data.json salida.pdf --root /ruta/proyecto
59
- pdfgen render data.yaml salida.pdf
74
+ pdfgen-juanipis render data.json salida.pdf --root /ruta/proyecto
75
+ pdfgen-juanipis render data.yaml salida.pdf
60
76
  ```
61
77
 
62
78
  Validar (sin generar PDF):
63
79
 
64
80
  ```bash
65
- pdfgen validate data.yaml
81
+ pdfgen-juanipis validate data.yaml
66
82
  ```
67
83
 
68
84
  Desde stdin (YAML por defecto):
69
85
 
70
86
  ```bash
71
- cat data.yaml | pdfgen render - salida.pdf
87
+ cat data.yaml | pdfgen-juanipis render - salida.pdf
72
88
  ```
73
89
 
74
90
  Opciones útiles:
@@ -79,6 +95,7 @@ Opciones útiles:
79
95
  - `--css-extra` inyectar CSS adicional
80
96
  - `--no-validate` desactivar validación
81
97
  - `--no-paginate` desactivar paginación
98
+ - `--stdout` escribir bytes a stdout
82
99
 
83
100
  ## Personalización
84
101
 
@@ -95,7 +112,7 @@ PDFGen(config).render(data, "salida.pdf")
95
112
  Opción B: directorio con `.ttf` desde CLI:
96
113
 
97
114
  ```bash
98
- pdfgen render data.json salida.pdf --fonts-dir /ruta/a/mis/fuentes
115
+ pdfgen-juanipis render data.json salida.pdf --fonts-dir /ruta/a/mis/fuentes
99
116
  ```
100
117
 
101
118
  ### Colores/estilos rápidos
@@ -110,9 +127,13 @@ render_with_defaults(data, "salida.pdf", root_dir="/ruta", css_extra=css_extra)
110
127
  ### Template y CSS propios
111
128
 
112
129
  ```bash
113
- pdfgen render data.json salida.pdf --template-dir /ruta/template --css /ruta/template/boletin.css
130
+ pdfgen-juanipis render data.json salida.pdf --template-dir /ruta/template --css /ruta/template/boletin.css
114
131
  ```
115
132
 
133
+ ### Assets
134
+
135
+ El usuario debe proveer `banner.png` y `logo.png` (o rutas absolutas). Si no usas `assets/` en tu proyecto, indica rutas absolutas en `theme`.
136
+
116
137
  ## Estructura mínima del data
117
138
 
118
139
  ```python
@@ -147,6 +168,10 @@ Los bloques de texto aceptan HTML:
147
168
  ## Ejemplos
148
169
 
149
170
  - `examples/minimal.yaml`
171
+ - `examples/minimal.json`
172
+ - `notebooks/usage.ipynb`
173
+ - `notebooks/bytes.ipynb`
174
+ - `notebooks/advanced.ipynb`
150
175
 
151
176
  ## Validación
152
177
 
@@ -0,0 +1,33 @@
1
+ pdfgen_juanipis/__init__.py,sha256=uYBNZbfQ3L6Kdy5tAPBn44rrnIhSYxkVuTRWmLYKmNc,544
2
+ pdfgen_juanipis/api.py,sha256=bazycKZMd_zFcGht-N0_Y86H5zdWkWDmaYCwjSXv9T0,3065
3
+ pdfgen_juanipis/cli.py,sha256=52LNwDcyZ0la4eOH4_BZWHj1fU9qiMdBWZnEzqoc1yo,4182
4
+ pdfgen_juanipis/pagination.py,sha256=8A-mtFM_tMOUH5jZT7fojpItxDGu1vSUIVmcAOT1Ezk,39027
5
+ pdfgen_juanipis/render.py,sha256=1jw44A29z3g1TuMNkclAsg--0h3xoMraGNWo5_8jlvo,15112
6
+ pdfgen_juanipis/schema.json,sha256=wgoxtgPWfNCjImHwae_5AA3TPRLzA4Dyo8QUUIweknY,5470
7
+ pdfgen_juanipis/validator.py,sha256=wpMOF7DycBF2g9oDnQSno4Cv55SsTY1Xgm85jc8J9Zk,8519
8
+ pdfgen_juanipis/assets/banner-clean.png,sha256=mNJeBFUS1EPWYPN74u_1nHLl7moerw-NmkvYuzUuFzo,1023
9
+ pdfgen_juanipis/assets/banner.png,sha256=0qvxaK2MTvRF7zk_vqzkge_zUPWr9BU8NdFFLdhH5uo,1543
10
+ pdfgen_juanipis/assets/logo.png,sha256=mdlP4nHd67W5iaaIJetBLNWbbchkcMe7X0FrbiIw34A,1124
11
+ pdfgen_juanipis/assets/fonts/BCDEEE_Calibri_5.ttf,sha256=p_g3mkSqeuHzYku1RQeJbB0u4ObVLFrFXw9OK8jBKdc,166944
12
+ pdfgen_juanipis/assets/fonts/BCDFEE_CenturyGothic-Bold_9.ttf,sha256=nnSa8BTxjLyjHKPvwWIcKj0n-1v7GPyx1hFm7wzpIc0,25004
13
+ pdfgen_juanipis/assets/fonts/BCDGEE_CenturyGothic-Bold_14.ttf,sha256=nnSa8BTxjLyjHKPvwWIcKj0n-1v7GPyx1hFm7wzpIc0,25004
14
+ pdfgen_juanipis/assets/fonts/BCDHEE_Calibri-Bold_20.ttf,sha256=fucZ-DSOZKk1zeOR1SRpXpXvTiUz43x94ng4jMWbtE4,123256
15
+ pdfgen_juanipis/assets/fonts/BCDIEE_Calibri-Bold_25.ttf,sha256=fucZ-DSOZKk1zeOR1SRpXpXvTiUz43x94ng4jMWbtE4,123256
16
+ pdfgen_juanipis/assets/fonts/BCDJEE_Calibri_27.ttf,sha256=p_g3mkSqeuHzYku1RQeJbB0u4ObVLFrFXw9OK8jBKdc,166944
17
+ pdfgen_juanipis/assets/fonts/BCDKEE_Calibri-Italic_33.ttf,sha256=RLWG91jghcpaYURNRQUlaMaUZdbGKaLa037peB1PbaM,117848
18
+ pdfgen_juanipis/assets/fonts/BCDLEE_Calibri-Italic_52.ttf,sha256=RLWG91jghcpaYURNRQUlaMaUZdbGKaLa037peB1PbaM,117848
19
+ pdfgen_juanipis/assets/fonts/BCDMEE_SegoeUI_54.ttf,sha256=w0Ksdnsp8yvwx8LwzybaBX6NuITVJWS8l0XTm9-xQtc,68880
20
+ pdfgen_juanipis/assets/fonts/BCDNEE_SegoeUI_60.ttf,sha256=w0Ksdnsp8yvwx8LwzybaBX6NuITVJWS8l0XTm9-xQtc,68880
21
+ "pdfgen_juanipis/assets/fonts/BCDOEE_Aptos Narrow,Bold_142.ttf",sha256=hrK2c59rBQ4lkX9_-nFHbBMfoDikd9M47hRxiMw3at8,23896
22
+ "pdfgen_juanipis/assets/fonts/BCDPEE_Aptos Narrow,Bold_144.ttf",sha256=hrK2c59rBQ4lkX9_-nFHbBMfoDikd9M47hRxiMw3at8,23896
23
+ pdfgen_juanipis/assets/fonts/BCEAEE_Aptos Narrow_149.ttf,sha256=mg-JKL3wHgRd_qVRAXXn6IKGnl_PJZnx5j95WAl6VB8,30924
24
+ pdfgen_juanipis/assets/fonts/BCEBEE_Aptos Narrow_154.ttf,sha256=mg-JKL3wHgRd_qVRAXXn6IKGnl_PJZnx5j95WAl6VB8,30924
25
+ pdfgen_juanipis/assets/fonts/TimesNewRomanPS-BoldMT_38.ttf,sha256=CAyIzST1vKiE9DhZriELQ_OzNeBrnWFQmAdRu4Qdoz0,90100
26
+ pdfgen_juanipis/templates/boletin.css,sha256=lCiCNkCcHrUepmm3JnnbQxSf_UZBYCqGBiIYFXlk2t8,6244
27
+ pdfgen_juanipis/templates/boletin_template.html.jinja,sha256=aWdeFc-1VkynxGSe4WaL3SqkEKLOQz63K28SMmQ_qOI,4550
28
+ pdfgen_juanipis-0.1.4.dist-info/licenses/LICENSE,sha256=ESYyLizI0WWtxMeS7rGVcX3ivMezm-HOd5WdeOh-9oU,1056
29
+ pdfgen_juanipis-0.1.4.dist-info/METADATA,sha256=QbvohYtsccrb1x6Kc6DagMJWaYUR-CrGkscHNDzdZR4,4358
30
+ pdfgen_juanipis-0.1.4.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
31
+ pdfgen_juanipis-0.1.4.dist-info/entry_points.txt,sha256=TOp1xUDB1G1DmfbC0LDHhJrDrv88xC8Gk710SYjto70,61
32
+ pdfgen_juanipis-0.1.4.dist-info/top_level.txt,sha256=4teFXBF7B3mlDrMlJRprflw5l4I_qNkSXPk8C1z8yCU,16
33
+ pdfgen_juanipis-0.1.4.dist-info/RECORD,,
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ pdfgen-juanipis = pdfgen_juanipis.cli:main
@@ -0,0 +1 @@
1
+ pdfgen_juanipis
pdfgen/__init__.py DELETED
@@ -1,17 +0,0 @@
1
- """PDF generation package."""
2
-
3
- from pdfgen.render import render_pdf, build_sample_data
4
- from pdfgen.validator import validate_and_normalize
5
- from pdfgen.pagination import LayoutConfig, Paginator
6
- from pdfgen.api import PDFGen, PDFGenConfig, render_with_defaults
7
-
8
- __all__ = [
9
- "render_pdf",
10
- "build_sample_data",
11
- "validate_and_normalize",
12
- "LayoutConfig",
13
- "Paginator",
14
- "PDFGen",
15
- "PDFGenConfig",
16
- "render_with_defaults",
17
- ]
pdfgen/schema.json DELETED
@@ -1,126 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "title": "PDFGenDocument",
4
- "type": "object",
5
- "additionalProperties": true,
6
- "properties": {
7
- "title": {"type": "string"},
8
- "refs_catalog": {
9
- "type": "object",
10
- "additionalProperties": {"type": "string"}
11
- },
12
- "theme": {
13
- "type": "object",
14
- "properties": {
15
- "header_banner_path": {"type": "string"},
16
- "header_banner_path_cont": {"type": "string"},
17
- "header_logo_path": {"type": "string"},
18
- "title_line1": {"type": "string"},
19
- "title_line2": {"type": "string"},
20
- "footer_site": {"type": "string"},
21
- "footer_phone": {"type": "string"},
22
- "show_header_titles": {"type": "boolean"}
23
- },
24
- "additionalProperties": true
25
- },
26
- "sections": {
27
- "type": "array",
28
- "items": {"$ref": "#/definitions/section"}
29
- },
30
- "pages": {
31
- "type": "array",
32
- "items": {"$ref": "#/definitions/page"}
33
- }
34
- },
35
- "anyOf": [
36
- {"required": ["sections"]},
37
- {"required": ["pages"]}
38
- ],
39
- "definitions": {
40
- "section": {
41
- "type": "object",
42
- "properties": {
43
- "title": {"type": "string"},
44
- "subtitle": {"type": "string"},
45
- "content": {"type": "array", "items": {"$ref": "#/definitions/block"}},
46
- "refs": {"type": "array", "items": {"type": "string"}},
47
- "footer_notes": {"type": "array", "items": {"type": "string"}}
48
- },
49
- "required": ["content"],
50
- "additionalProperties": true
51
- },
52
- "page": {
53
- "type": "object",
54
- "properties": {
55
- "blocks": {"type": "array", "items": {"$ref": "#/definitions/block"}},
56
- "refs": {"type": "array", "items": {"type": "string"}},
57
- "footer_notes": {"type": "array", "items": {"type": "string"}}
58
- },
59
- "required": ["blocks"],
60
- "additionalProperties": true
61
- },
62
- "block": {
63
- "type": "object",
64
- "properties": {
65
- "type": {"type": "string", "enum": ["text", "table", "figure", "map_grid", "html"]},
66
- "text": {"type": ["string", "array"], "items": {"type": "string"}},
67
- "html": {"type": "string"},
68
- "refs": {"type": "array", "items": {"type": "string"}},
69
- "footer_notes": {"type": "array", "items": {"type": "string"}},
70
- "table": {"$ref": "#/definitions/table"},
71
- "path": {"type": "string"},
72
- "caption": {"type": "string"},
73
- "wide": {"type": "boolean"},
74
- "items": {
75
- "type": "array",
76
- "items": {
77
- "type": "object",
78
- "properties": {
79
- "path": {"type": "string"},
80
- "label": {"type": "string"}
81
- },
82
- "required": ["path"],
83
- "additionalProperties": true
84
- }
85
- },
86
- "source": {"type": "string"}
87
- },
88
- "required": ["type"],
89
- "additionalProperties": true
90
- },
91
- "table": {
92
- "type": "object",
93
- "properties": {
94
- "groups": {
95
- "type": "array",
96
- "items": {
97
- "type": "object",
98
- "properties": {
99
- "title": {"type": "string"},
100
- "months": {"type": "array", "items": {"type": "string"}}
101
- },
102
- "required": ["title", "months"],
103
- "additionalProperties": true
104
- }
105
- },
106
- "rows": {
107
- "type": "array",
108
- "items": {
109
- "type": "object",
110
- "properties": {
111
- "dep": {"type": "string"},
112
- "vals": {"type": "array", "items": {"type": "string"}}
113
- },
114
- "required": ["dep", "vals"],
115
- "additionalProperties": true
116
- }
117
- },
118
- "total_width": {"type": "number"},
119
- "dep_width": {"type": "number"},
120
- "show_header": {"type": "boolean"}
121
- },
122
- "required": ["groups", "rows"],
123
- "additionalProperties": true
124
- }
125
- }
126
- }
@@ -1,33 +0,0 @@
1
- pdfgen/__init__.py,sha256=4jtt7D6NgNMRk-UO_UXrtn17gjir-RDulcptgOmp56Y,446
2
- pdfgen/api.py,sha256=d9cJ-Seu9EwgIqCeityHgchsMUWcaczwd554njSkISM,2051
3
- pdfgen/cli.py,sha256=QTWF6-xYG7IE61vj39P59rlLu9ValcZtGsxmFd9GO4I,3782
4
- pdfgen/pagination.py,sha256=8A-mtFM_tMOUH5jZT7fojpItxDGu1vSUIVmcAOT1Ezk,39027
5
- pdfgen/render.py,sha256=qUqfhUFFAks76rjicgmC3MQqfelde-KF7Ewri4nyfx4,14895
6
- pdfgen/schema.json,sha256=vzpefhYtHW7cQj9zQaPmgBYSr6JvsYK45XB5PoISVu4,3863
7
- pdfgen/validator.py,sha256=FmnMZjb-CcZeyTicJlevigk8awXd0tMFkRFa85HSPt8,8510
8
- pdfgen/assets/banner-clean.png,sha256=mNJeBFUS1EPWYPN74u_1nHLl7moerw-NmkvYuzUuFzo,1023
9
- pdfgen/assets/banner.png,sha256=0qvxaK2MTvRF7zk_vqzkge_zUPWr9BU8NdFFLdhH5uo,1543
10
- pdfgen/assets/logo.png,sha256=mdlP4nHd67W5iaaIJetBLNWbbchkcMe7X0FrbiIw34A,1124
11
- pdfgen/assets/fonts/BCDEEE_Calibri_5.ttf,sha256=p_g3mkSqeuHzYku1RQeJbB0u4ObVLFrFXw9OK8jBKdc,166944
12
- pdfgen/assets/fonts/BCDFEE_CenturyGothic-Bold_9.ttf,sha256=nnSa8BTxjLyjHKPvwWIcKj0n-1v7GPyx1hFm7wzpIc0,25004
13
- pdfgen/assets/fonts/BCDGEE_CenturyGothic-Bold_14.ttf,sha256=nnSa8BTxjLyjHKPvwWIcKj0n-1v7GPyx1hFm7wzpIc0,25004
14
- pdfgen/assets/fonts/BCDHEE_Calibri-Bold_20.ttf,sha256=fucZ-DSOZKk1zeOR1SRpXpXvTiUz43x94ng4jMWbtE4,123256
15
- pdfgen/assets/fonts/BCDIEE_Calibri-Bold_25.ttf,sha256=fucZ-DSOZKk1zeOR1SRpXpXvTiUz43x94ng4jMWbtE4,123256
16
- pdfgen/assets/fonts/BCDJEE_Calibri_27.ttf,sha256=p_g3mkSqeuHzYku1RQeJbB0u4ObVLFrFXw9OK8jBKdc,166944
17
- pdfgen/assets/fonts/BCDKEE_Calibri-Italic_33.ttf,sha256=RLWG91jghcpaYURNRQUlaMaUZdbGKaLa037peB1PbaM,117848
18
- pdfgen/assets/fonts/BCDLEE_Calibri-Italic_52.ttf,sha256=RLWG91jghcpaYURNRQUlaMaUZdbGKaLa037peB1PbaM,117848
19
- pdfgen/assets/fonts/BCDMEE_SegoeUI_54.ttf,sha256=w0Ksdnsp8yvwx8LwzybaBX6NuITVJWS8l0XTm9-xQtc,68880
20
- pdfgen/assets/fonts/BCDNEE_SegoeUI_60.ttf,sha256=w0Ksdnsp8yvwx8LwzybaBX6NuITVJWS8l0XTm9-xQtc,68880
21
- "pdfgen/assets/fonts/BCDOEE_Aptos Narrow,Bold_142.ttf",sha256=hrK2c59rBQ4lkX9_-nFHbBMfoDikd9M47hRxiMw3at8,23896
22
- "pdfgen/assets/fonts/BCDPEE_Aptos Narrow,Bold_144.ttf",sha256=hrK2c59rBQ4lkX9_-nFHbBMfoDikd9M47hRxiMw3at8,23896
23
- pdfgen/assets/fonts/BCEAEE_Aptos Narrow_149.ttf,sha256=mg-JKL3wHgRd_qVRAXXn6IKGnl_PJZnx5j95WAl6VB8,30924
24
- pdfgen/assets/fonts/BCEBEE_Aptos Narrow_154.ttf,sha256=mg-JKL3wHgRd_qVRAXXn6IKGnl_PJZnx5j95WAl6VB8,30924
25
- pdfgen/assets/fonts/TimesNewRomanPS-BoldMT_38.ttf,sha256=CAyIzST1vKiE9DhZriELQ_OzNeBrnWFQmAdRu4Qdoz0,90100
26
- pdfgen/templates/boletin.css,sha256=lCiCNkCcHrUepmm3JnnbQxSf_UZBYCqGBiIYFXlk2t8,6244
27
- pdfgen/templates/boletin_template.html.jinja,sha256=aWdeFc-1VkynxGSe4WaL3SqkEKLOQz63K28SMmQ_qOI,4550
28
- pdfgen_juanipis-0.1.3.dist-info/licenses/LICENSE,sha256=ESYyLizI0WWtxMeS7rGVcX3ivMezm-HOd5WdeOh-9oU,1056
29
- pdfgen_juanipis-0.1.3.dist-info/METADATA,sha256=jjHPP5RK_WOpVw8HPkuBjOOrEwXZaFT4yIh6cIeUdOg,3718
30
- pdfgen_juanipis-0.1.3.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
31
- pdfgen_juanipis-0.1.3.dist-info/entry_points.txt,sha256=k94J3IsuMlLw09pyLYkVqXq3rhbUusR_oblgNBD8Qfk,43
32
- pdfgen_juanipis-0.1.3.dist-info/top_level.txt,sha256=j-KjOvwSSJxIWLnr7bjvZj2JiCMp-_DCKA0rGQl89e4,7
33
- pdfgen_juanipis-0.1.3.dist-info/RECORD,,
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- pdfgen = pdfgen.cli:main
@@ -1 +0,0 @@
1
- pdfgen
File without changes
File without changes
File without changes
File without changes
File without changes