Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find/Replace text, Get list of slides containing some text #94

Open
oset-bschuhma opened this issue Jun 10, 2022 · 0 comments
Open

Find/Replace text, Get list of slides containing some text #94

oset-bschuhma opened this issue Jun 10, 2022 · 0 comments

Comments

@oset-bschuhma
Copy link

I have a presentation with a lot of variable placeholders that look like this: {some_variable}

I'd like to find those and replace them with the proper values (from a JSON file). I'm doing this now with docxtemplater, but I'd rather use node-pptx.

In addition, I'd like to search the presentation for the remaining instances of a variable that were not filled in - this is an indication that there's no data for that slide and it should be removed. I'd like to search for, say, "{remove_slide}" and remove that slide. I could do it with a list of slides containing that variable, then I'd sort it in descending order, then use node-pptx to delete the slides. Sorting the list descending seems like the proper path so you don't screw up the slide ordering while you're deleting slides. Maybe there's a simpler way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant