debrief / ppt_renderer

Development project to produce body of scripts for manipulating PPT slide
Eclipse Public License 2.0
2 stars 0 forks source link

Script for finding dimensions and location of rectangle map #10

Closed purvil12c closed 6 years ago

purvil12c commented 6 years ago

Fixes #4 Added script for finding location and dimensions of a rectangle shape named "map"

IanMayo commented 6 years ago

Ok. The script currently outputs the coords.

Could you refactor it, so you declare a function that retrieves the coords, then your script outputs those coords?

We will exploit this function in a future step.

IanMayo commented 6 years ago

It's a shame we're having the O/S related issues. To overcome them, please switch the two "sensitive" values to fields, then define the fields as below:

# idiosyncracies on Macos, so we need alternate mechanisms
if os.name == "posix":
    parser = "lxml-xml"
    match = "p:cNvPr"
else:
    parser = "lxml"
    match = "p:cnvpr"

Does that seem an acceptable workaround?

purvil12c commented 6 years ago

As a matter of fact, I am also using macOS.

IanMayo commented 6 years ago
As a matter of fact, I am also using macOS.

Bugger. Can you suggest an alternate strategy?

purvil12c commented 6 years ago

We can first use lxml, if the code fails to find the shapes, we use lxml-xml.