Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/docs/dev-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ layout: docs
1. Make a PR as described [here](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) against the 'development' branch.

1. Wait for a review and address any feedback.
While we try and stay on top of all issues and PRs it might take a few days for someone to respond. Politely pinging the PR after a few days with no response is OK, we'll try and respond with a timeline as soon as we are able.
While we try and stay on top of all issues and PRs, this isn't under active development so it might take a while for someone to respond. Politely pinging the PR after a few days with no response is OK, we'll try and respond with a timeline as soon as we are able.

1. That's it! When the PR has received :rocket:'s from members of the core team they will merge the PR

Expand Down
22 changes: 20 additions & 2 deletions tableaudocumentapi/workbook.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ def __init__(self, filename):
self._datasource_index = self._prepare_datasource_index(self._datasources)

self._worksheets = self._prepare_worksheets(
self._workbookRoot, self._datasource_index
)
self._workbookRoot, self._datasource_index)

self._shapes = self._prepare_shapes(self._workbookRoot)

@property
def datasources(self):
Expand All @@ -42,6 +43,10 @@ def worksheets(self):
def filename(self):
return self._filename

@property
def shapes(self):
return self._shapes

def save(self):
"""
Call finalization code and save file.
Expand Down Expand Up @@ -116,3 +121,16 @@ def _prepare_worksheets(xml_root, ds_index):
datasource.fields[column_name].add_used_in(worksheet_name)

return worksheets

@staticmethod
def _prepare_shapes(xml_root):
shapes = []
worksheets_element = xml_root.find('.//external/shapes')
if worksheets_element is None:
return shapes

for worksheet_element in worksheets_element:
shape_name = worksheet_element.attrib['name']
shapes.append(shape_name)

return shapes
Loading