Skip to content

Configuration Guide

Preview Version

This documentation is currently being worked on and may be incomplete or subject to change. If you spot any mistakes or have suggestions, please contact one of the maintainers.

Learn how to configure the Effectual Report Generator for your specific reporting needs. PowerAutomate uses this configuration file to run the report generation process.

Configuration Methods

The toolkit supports two primary configuration approaches: 1. Inline Configuration: Directly within your Python scripts or Jupyter notebooks 2. TOML Configuration File: Using an external .toml file for easier management and reuse

For inline configuration, refer to the code examples in the Slide Types & Features documentation.

TOML Configuration File

Basic Structure

The repository includes a sample configuration file named config.toml. If you are missing this file, create one in your project root:

# Project paths
excel_path = "input-path"
template_path = "template-path"
output_dir = "output-path"

Loading Configuration

To load the configuration file in your Python code, use the following snippet:

from prptl_pptx.core.config import TOMLConfig

config = TOMLConfig("config.toml")

# Access top-level values
excel_path = config.get("excel_path")
template_path = config.get("template_path")
output_dir = config.get("output_dir")

Configuration Sections

Paths Configuration

Define file and directory paths:

[paths]
resources_dir = "resources"
excel_file = "resources/data.xlsx"
template_file = "resources/template.pptx"
output_dir = "output"
data_dir = "data"
log_dir = "logs"

Usage:

from pathlib import Path
from prptl_pptx.core.config import TOMLConfig

config = TOMLConfig("config.toml")
paths = config.get_select("paths")

excel_path = Path(paths["excel_file"])
template_path = Path(paths["template_file"])
output_dir = Path(paths["output_dir"])

Formatting Configuration