fixed for basic plots, filter active

This commit is contained in:
2026-02-03 02:19:47 +01:00
parent 5c39bbb23a
commit 38f6d8a87c
2 changed files with 23 additions and 19 deletions

View File

@@ -24,12 +24,16 @@ def _():
TAG_SOURCE = Path('data/reports/Perception-Research-Report_2-2.pptx')
TAG_TARGET = Path('data/reports/Perception-Research-Report_2-2_tagged.pptx')
TAG_IMAGE_DIR = Path('figures/2-2-26')
return TAG_IMAGE_DIR, TAG_SOURCE, TAG_TARGET
return TAG_IMAGE_DIR, TAG_SOURCE
@app.cell
def _(TAG_IMAGE_DIR, TAG_SOURCE, TAG_TARGET):
utils.update_ppt_alt_text(ppt_path=TAG_SOURCE, image_source_dir=TAG_IMAGE_DIR, output_path=TAG_TARGET)
def _(TAG_IMAGE_DIR, TAG_SOURCE):
utils.update_ppt_alt_text(
ppt_path=TAG_SOURCE,
image_source_dir=TAG_IMAGE_DIR,
# output_path=TAG_TARGET
)
return
@@ -43,20 +47,20 @@ def _():
@app.cell
def _():
REPLACE_SOURCE = Path('data/reports/Perception-Research-Report_2-2_tagged.pptx')
REPLACE_TARGET = Path('data/reports/Perception-Research-Report_2-2.pptx')
REPLACE_SOURCE = Path('data/reports/Perception-Research-Report_2-2.pptx')
REPLACE_TARGET = Path('data/reports/Perception-Research-Report_2-2_updated.pptx')
NEW_IMAGES_DIR = Path('figures/2-2-26')
return NEW_IMAGES_DIR, REPLACE_SOURCE, REPLACE_TARGET
return NEW_IMAGES_DIR, REPLACE_SOURCE
@app.cell
def _(NEW_IMAGES_DIR, REPLACE_SOURCE, REPLACE_TARGET):
def _(NEW_IMAGES_DIR, REPLACE_SOURCE):
# get all files in the image source directory and subdirectories
results = utils.pptx_replace_images_from_directory(
REPLACE_SOURCE, # Source presentation path,
NEW_IMAGES_DIR, # Source directory with new images
REPLACE_TARGET # Output path (optional, defaults to overwrite)
# REPLACE_TARGET # Output path (optional, defaults to overwrite)
)
return