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

fixes to allow proper parsing of data tables #56

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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: 2 additions & 0 deletions keynote_parser/codec.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ def to_buffer(self):
# Each message_info as part of the header needs to be updated
# so that its length matches the object contained within.
for obj, message_info in zip(self.objects, self.header.message_infos):
if (obj.DESCRIPTOR.full_name == "TST.GroupByArchive"):
obj.is_enabled = True
try:
object_length = len(obj.SerializeToString())
provided_length = message_info.length
Expand Down
2 changes: 2 additions & 0 deletions keynote_parser/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ def compute_maps():
for file in PROTO_FILES:
for message_name in file.DESCRIPTOR.message_types_by_name:
message_type = getattr(file, message_name)
for m in message_type.DESCRIPTOR.nested_types:
name_class_map[m.full_name] = message_type
name_class_map[message_type.DESCRIPTOR.full_name] = message_type

id_name_map = {}
Expand Down