You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/ppt_gen/YAML_CONFIG_GUIDE.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,13 @@
4
4
5
5
This document explains how to describe PPT templates with YAML so that the `ppt_gen` example can generate consistent slides across different topics and layouts.
6
6
7
+
## Overview
8
+
9
+
There are two types of YAML configuration files:
10
+
11
+
1.[`yaml_example.yaml`](./yaml_example.yaml) or [`yaml_example2.yaml`](./yaml_example2.yaml) - YAML configurations shared across multiple templates.
12
+
2. Individual YAML configuration files for each specific PPT project, used to define project-specific slide types, override shared YAML slide types, and modify the page order in the template (`type_map`). These YAML files are placed in the same folder as the template's pptx file.
13
+
7
14
## YAML file layout
8
15
9
16
A template YAML file (see [`yaml_example.yaml`](./yaml_example.yaml)) is composed of two sections:
@@ -14,6 +21,8 @@ A template YAML file (see [`yaml_example.yaml`](./yaml_example.yaml)) is compose
14
21
-`type`: the logical slide type (must exist in `type_map`).
15
22
- One or more **field specifications** that describe the expected payload for each placeholder.
16
23
24
+
It is recommended to place `type_map` in the YAML configuration file for a specific PPT template. `type_map` should only list the pages supported by the template. For pages not listed in `type_map`, the `gen_schema.py` script will remove them from the final schema.
25
+
17
26
### Field specification keys
18
27
19
28
Each field under a page block can use the following attributes:
0 commit comments