I' m trying to repetetive presentation with Google Slides starting from the events on Google Calendar using an API.
I was able to replace some text, but I'd like to delete all the text after the last text replacement. I've tried with replacing all the remaining text with a blank space, but i exceeded the quota limit, so maybe it's easier to just delete it.
(I hope it's understandable even in my broken english).
I hope you'll help me-
This is the function i use to replace the text (and it works fine):
def text_replace(old: str, new: str, presentation_id: str, pages: list = []):
slides_service = build('slides', 'v1', credentials=creds)
slides_service.presentations().batchUpdate(
body={
"requests": [
{
"replaceAllText": {
"containsText": {
"text": '{{' + old + '}}'
},
"replaceText": new,
"pageObjectIds": pages,
}
}
]
},
presentationId=presentation_id
).execute()
this is one of the slides i want to change
In the slide there's a single text box, and i wanted to know if it was possible to delete automatically some text
but I'd like to delete all the text after the last text replacement.. Can I ask you about the detail of the current issue of your script and your goal?I created a presentation on Google slide in which I replace the text, but not all text get replaced, and I want to eliminate the remaining text. But I would like to try to understand it. When I could correctly understand it, I would like to think of a solution. I would be grateful if you can forgive my poor English skill.