From 7df5bea0f0bee0663fe6d2fd59e39c2c0b4b65a6 Mon Sep 17 00:00:00 2001 From: Peter Sobot Date: Sun, 13 Apr 2025 10:49:29 -0500 Subject: [PATCH 1/2] Update to Keynote v14.4. --- dumper/Makefile | 33 ++- dumper/extract_mapping.py | 190 ++++++++++---- dumper/generate_mapping.py | 15 +- dumper/protodump.py | 145 ++++++----- dumper/rename_proto_files.py | 2 +- keynote_parser/__init__.py | 7 +- keynote_parser/mapping.py | 6 +- protos/KNArchives.proto | 11 +- protos/KNCommandArchives.proto | 11 +- protos/TSAArchives.proto | 47 +++- protos/TSCEArchives.proto | 74 +++++- protos/TSCHArchives.proto | 24 +- protos/TSCKArchives.proto | 435 +++++++++++++++++++++++++++++++ protos/TSCKArchives_sos.proto | 21 ++ protos/TSDArchives.proto | 4 +- protos/TSDCommandArchives.proto | 7 +- protos/TSKArchives.proto | 433 +----------------------------- protos/TSPMessages.proto | 12 + protos/TSSArchives.proto | 5 + protos/TSTArchives.proto | 30 +-- protos/TSWPArchives.proto | 28 +- protos/TSWPArchives_sos.proto | 84 +++--- protos/TSWPCommandArchives.proto | 14 +- 23 files changed, 978 insertions(+), 660 deletions(-) create mode 100644 protos/TSCKArchives.proto create mode 100644 protos/TSCKArchives_sos.proto diff --git a/dumper/Makefile b/dumper/Makefile index ea79095..88e50ce 100644 --- a/dumper/Makefile +++ b/dumper/Makefile @@ -1,24 +1,39 @@ .PHONY=clean all -LLDB_PYTHON_PATH := /opt/homebrew/opt/llvm//libexec/python3.11/site-packages/ -LLDB_PYTHON := python3.11 -IDENTITY := $(shell security find-identity -v -p codesigning | head -n 1 | python -c 'import sys; print(sys.stdin.read().split("\"")[1])') +# Find whichever version of Python is installed in the LLVM directory: +LLVM_DIR := /opt/homebrew/opt/llvm/ +# Error if LLVM_DIR is not set: +ifeq ($(LLVM_DIR),) +$(error LLVM_DIR is not set) +endif +LLVM_PYTHON_PATH := $(shell find $(LLVM_DIR) -name "python3.*" | head -n 1) +ifeq ($(LLVM_PYTHON_PATH),) +$(error LLVM_PYTHON_PATH is not set) +endif +LLVM_PYTHON := $(shell basename $(LLVM_PYTHON_PATH)) +ifeq ($(LLVM_PYTHON),) +$(error LLVM_PYTHON is not set) +endif + +# TODO: Verify that this identity is valid and not expired; this causes silent failures. +IDENTITY := $(shell security find-identity -v -p codesigning | head -n 1 | uv run python -c 'import sys; print(sys.stdin.read().split("\"")[1])') all: mapping.py proto mapping.json: Keynote.unsigned.app/Contents/MacOS/Keynote ./extract_mapping.py - PYTHONPATH=${LLDB_PYTHON_PATH} xcrun $(LLDB_PYTHON) ./extract_mapping.py Keynote.unsigned.app/Contents/MacOS/Keynote > $@ + PYTHONPATH=${LLVM_PYTHON_PATH}/site-packages xcrun $(LLVM_PYTHON) ./extract_mapping.py Keynote.unsigned.app/Contents/MacOS/Keynote --output $@ rm -rf Keynote.unsigned.app proto: /Applications/Keynote.app - python3 protodump.py /Applications/Keynote.app ./proto/ + uv run protodump.py /Applications/Keynote.app ./proto/ # Note that if any of the incoming Protobuf definitions contain periods, # protoc will put them into their own Python packages. This is not desirable # for import rules in Python, so we replace non-final period characters with # underscores. - python3 ./rename_proto_files.py proto + uv run ./rename_proto_files.py proto cp ./proto/*.proto ../protos/ + rm -rfv proto Keynote.unsigned.app/Contents/MacOS/Keynote: /Applications/Keynote.app cp -r /Applications/Keynote.app ./Keynote.unsigned.app @@ -26,8 +41,10 @@ Keynote.unsigned.app/Contents/MacOS/Keynote: /Applications/Keynote.app codesign --sign "${IDENTITY}" --verbose ./Keynote.unsigned.app/Contents/MacOS/Keynote mapping.py: mapping.json - python3 generate_mapping.py - cp mapping.py ../keynote_parser/mapping.py + uv run generate_mapping.py + mv mapping.py ../keynote_parser/mapping.py + echo "mapping.py generated (size: $(shell wc -c < mapping.py) bytes); the dumper worked!" + rm -rf mapping.json clean: rm -rf Keynote.unsigned.app diff --git a/dumper/extract_mapping.py b/dumper/extract_mapping.py index 31391b0..cf9ac96 100755 --- a/dumper/extract_mapping.py +++ b/dumper/extract_mapping.py @@ -8,64 +8,140 @@ Copyright 2020 Peter Sobot (psobot.com). """ -import os -import sys +import argparse +import enum import json +import os +import time + import lldb -exe = sys.argv[-1] -debugger = lldb.SBDebugger.Create() -debugger.SetAsync(False) -target = debugger.CreateTargetWithFileAndArch(exe, None) -target.BreakpointCreateByName("_sendFinishLaunchingNotification") -target.BreakpointCreateByName("_handleAEOpenEvent:") -# To get around the fact that we don't have iCloud entitlements when running re-signed code, -# let's break in the CloudKit code and early exit the function before it can raise an exception: -target.BreakpointCreateByName("[CKContainer containerWithIdentifier:]") -# In later Keynote versions, 'containerWithIdentifier' isn't called directly, but we can break on similar methods: -# Note: this __lldb_unnamed_symbol hack was determined by painstaking experimentation. It will break again for sure. -target.BreakpointCreateByRegex("___lldb_unnamed_symbol[0-9]+", "CloudKit") - -process = target.LaunchSimple(None, None, os.getcwd()) - -if not process: - raise ValueError("Failed to launch process: " + exe) -try: - while process.GetState() == lldb.eStateStopped: - thread = process.GetThreadAtIndex(0) - if thread.GetStopReason() == lldb.eStopReasonBreakpoint: - if any([x in str(thread.GetSelectedFrame()) for x in ["CKContainer", "CloudKit"]]): - # Skip the code in CKContainer, avoiding a crash due to missing entitlements: - thread.ReturnFromFrame(thread.GetSelectedFrame(), lldb.SBValue().CreateValueFromExpression("0", "")) - process.Continue() - else: - break - elif thread.GetStopReason() == lldb.eStopReasonException: - sys.stderr.write(repr(thread) + "\n") - raise NotImplementedError(f"LLDB caught exception, {__file__} needs to be updated to handle.") - if process.GetState() == lldb.eStateStopped: - if thread: - frame = thread.GetFrameAtIndex(0) - if frame: - registry = frame.EvaluateExpression('[TSPRegistry sharedRegistry]').description - split = [ - x.strip().split(" -> ") - for x in registry.split("{")[1].split("}")[0].split("\n") - if x.strip() - ] - print( - json.dumps( - dict( - sorted( - [(int(a), b.split(" ")[-1]) for a, b in split if 'null' not in b] - ) - ), - indent=2, + +class StateType(enum.Enum): + Invalid = 0 + Unloaded = 1 + Connected = 2 + Attaching = 3 + Launching = 4 + Stopped = 5 + Running = 6 + Stepping = 7 + + +class StopReason(enum.Enum): + Invalid = 0 + _None = 1 + Trace = 2 + Breakpoint = 3 + Watchpoint = 4 + Signal = 5 + Exception = 6 + Exec = 7 + PlanComplete = 8 + ThreadExiting = 9 + Instrumentation = 10 + ProcessorTrace = 11 + Fork = 12 + VFork = 13 + VForkDone = 14 + Interrupt = 15 + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument("exe", type=str, help="Path to the executable to debug.") + parser.add_argument( + "--output", + type=str, + required=True, + help="Path to the output file to write to. Will be overwritten.", + ) + args = parser.parse_args() + + if os.path.exists(args.output): + print(f"Removing output file {args.output}...") + os.remove(args.output) + + print("Creating debugger...") + debugger = lldb.SBDebugger.Create() + debugger.SetAsync(False) + print(f"Creating target of {args.exe}...") + target = debugger.CreateTargetWithFileAndArch(args.exe, None) + print("Setting breakpoint for _sendFinishLaunchingNotification...") + target.BreakpointCreateByName("_sendFinishLaunchingNotification") + + print("Setting breakpoint for _handleAEOpenEvent:...") + target.BreakpointCreateByName("_handleAEOpenEvent:") + + print("Setting breakpoint for [CKContainer containerWithIdentifier:]...") + # let's break in the CloudKit code and early exit the function before it can raise an exception: + target.BreakpointCreateByName("[CKContainer containerWithIdentifier:]") + + print("Setting breakpoint for ___lldb_unnamed_symbol[0-9]+...") + # In later Keynote versions, 'containerWithIdentifier' isn't called directly, but we can break on similar methods: + # Note: this __lldb_unnamed_symbol hack was determined by painstaking experimentation. It will break again for sure. + target.BreakpointCreateByRegex("___lldb_unnamed_symbol[0-9]+", "CloudKit") + + print("Launching process...") + process = target.LaunchSimple(None, None, os.getcwd()) + + if not process: + raise ValueError("Failed to launch process: " + args.exe) + try: + print("Waiting for process to stop on a breakpoint...") + while process.GetState() != lldb.eStateStopped: + print(f"Current state: {StateType(process.GetState())}") + time.sleep(0.1) + + while process.GetState() == lldb.eStateStopped: + thread = process.GetThreadAtIndex(0) + print(f"Thread: {thread} stopped at: {StopReason(thread.GetStopReason())}") + match thread.GetStopReason(): + case lldb.eStopReasonBreakpoint: + if any( + [ + x in str(thread.GetSelectedFrame()) + for x in ["CKContainer", "CloudKit"] + ] + ): + # Skip the code in CKContainer, avoiding a crash due to missing entitlements: + thread.ReturnFromFrame( + thread.GetSelectedFrame(), + lldb.SBValue().CreateValueFromExpression("0", ""), + ) + process.Continue() + else: + break + case lldb.eStopReasonException: + print(repr(thread) + "\n") + raise NotImplementedError( + f"LLDB caught exception, {__file__} needs to be updated to handle." ) - ) - else: - raise ValueError("Could not get frame to print out registry!") - else: - raise ValueError("LLDB was unable to stop process! " + str(process)) -finally: - process.Kill() + case _: + process.Continue() + + if process.GetState() != lldb.eStateStopped: + raise ValueError("LLDB was unable to stop process! " + str(process)) + if not thread: + raise ValueError("Could not get thread to print out registry!") + frame = thread.GetFrameAtIndex(0) + if not frame: + raise ValueError("Could not get frame to print out registry!") + registry = frame.EvaluateExpression("[TSPRegistry sharedRegistry]").description + split = [ + x.strip().split(" -> ") + for x in registry.split("{")[1].split("}")[0].split("\n") + if x.strip() + ] + mapping = [(int(a), b.split(" ")[-1]) for a, b in split if "null" not in b] + print(f"Extracted mapping with {len(mapping):,} elements.") + results = json.dumps(dict(sorted(mapping)), indent=2) + with open(args.output, "w") as f: + f.write(results) + print(f"Wrote {len(results):,} bytes of mapping to {args.output}.") + finally: + process.Kill() + + +if __name__ == "__main__": + main() diff --git a/dumper/generate_mapping.py b/dumper/generate_mapping.py index fe69387..594686e 100644 --- a/dumper/generate_mapping.py +++ b/dumper/generate_mapping.py @@ -1,6 +1,6 @@ -import os -import json import glob +import json +import os RUNTIME_CODE = """ @@ -35,7 +35,10 @@ def main(): f.write("\n") proto_files = sorted( - [os.path.basename(path) for path in glob.glob(os.path.join("..", "protos", "*.proto"))] + [ + os.path.basename(path) + for path in glob.glob(os.path.join("..", "protos", "*.proto")) + ] ) for proto_file in proto_files: @@ -53,7 +56,11 @@ def main(): f.write("\n") with open(mapping_filename) as mapping_file: - f.write(f"TSPRegistryMapping = {repr(json.load(mapping_file))}\n") + mapping_file_contents = mapping_file.read() + if mapping_file_contents == "": + raise ValueError(f"Mapping file {mapping_filename} is empty.") + mapping_file_contents = json.loads(mapping_file_contents) + f.write(f"TSPRegistryMapping = {repr(mapping_file_contents)}\n") f.write(RUNTIME_CODE) diff --git a/dumper/protodump.py b/dumper/protodump.py index 6960c41..57e4534 100644 --- a/dumper/protodump.py +++ b/dumper/protodump.py @@ -1,67 +1,68 @@ +# /// script +# dependencies = [ +# "protobuf>=3.20.0rc1,<4", +# "rich", +# ] +# /// """ Super hacky script to parse compiled Protobuf definitions out of one or more binary files in a directory tree. -Requires `pip install 'protobuf>=3.20.0rc1'`. Example usage: - python3 protodump.py /Applications/SomeAppBundle.app ./proto_files_go_here/ + uv run protodump.py /Applications/SomeAppBundle.app ./proto_files_go_here/ (c) Peter Sobot (@psobot), March 13, 2022 Inspired by Sean Patrick O'Brien (@obriensp)'s 2013 "proto-dump": https://github.com/obriensp/proto-dump """ -import sys +from collections import defaultdict from pathlib import Path -from tqdm import tqdm from typing import List -from collections import defaultdict -from google.protobuf.internal.decoder import _DecodeVarint, SkipField from google.protobuf import descriptor_pb2 from google.protobuf.descriptor_pool import DescriptorPool +from google.protobuf.internal.decoder import SkipField, _DecodeVarint from google.protobuf.message import DecodeError - +from rich import print +from rich.progress import track PROTO_TYPES = { - 1: 'double', - 2: 'float', - 3: 'int64', - 4: 'uint64', - 5: 'int32', - 6: 'fixed64', - 7: 'fixed32', - 8: 'bool', - 9: 'string', - 12: 'bytes', - 13: 'uint32', - 15: 'sfixed32', - 16: 'sfixed64', - 17: 'sint32', - 18: 'sint64', + 1: "double", + 2: "float", + 3: "int64", + 4: "uint64", + 5: "int32", + 6: "fixed64", + 7: "fixed32", + 8: "bool", + 9: "string", + 12: "bytes", + 13: "uint32", + 15: "sfixed32", + 16: "sfixed64", + 17: "sint32", + 18: "sint64", } + def to_proto_file(fds: descriptor_pb2.FileDescriptorSet) -> str: if len(fds.file) != 1: raise NotImplementedError("Only one file per fds.") f = fds.file[0] - lines = [ - "syntax = \"proto2\";", - "" - ] + lines = ['syntax = "proto2";', ""] for dependency in f.dependency: lines.append(f'import "{dependency}";') - lines.append(f'package {f.package};') + lines.append(f"package {f.package};") lines.append("") def generate_enum_lines(f, lines: List[str], indent: int = 0): prefix = " " * indent for enum in f.enum_type: - lines.append(prefix + f"enum {enum.name} " + '{') + lines.append(prefix + f"enum {enum.name} " + "{") for value in enum.value: lines.append(prefix + f" {value.name} = {value.number};") - lines.append(prefix + '}') - + lines.append(prefix + "}") def generate_field_line(field, in_oneof: bool = False) -> str: line = [] @@ -77,14 +78,14 @@ def generate_field_line(field, in_oneof: bool = False) -> str: if field.type in PROTO_TYPES: line.append(PROTO_TYPES[field.type]) - elif field.type == 11 or field.type == 14: # MESSAGE + elif field.type == 11 or field.type == 14: # MESSAGE line.append(field.type_name) else: raise NotImplementedError(f"Unknown field type {field.type}!") line.append(field.name) line.append("=") - line.append(str(field.number)); + line.append(str(field.number)) options = [] if field.default_value: options.append(f"default = {field.default_value}") @@ -112,12 +113,12 @@ def generate_extension_lines(message, lines: List[str], indent: int = 0): def generate_message_lines(f, lines: List[str], indent: int = 0): prefix = " " * indent - submessages = f.message_type if hasattr(f, 'message_type') else f.nested_type + submessages = f.message_type if hasattr(f, "message_type") else f.nested_type for message in submessages: # if message.name == "ContainedObjectsCommandArchive": # breakpoint() - lines.append(prefix + f"message {message.name} " + '{') + lines.append(prefix + f"message {message.name} " + "{") generate_enum_lines(message, lines, indent + 1) generate_message_lines(message, lines, indent + 1) @@ -131,22 +132,29 @@ def generate_message_lines(f, lines: List[str], indent: int = 0): for oneof_index, oneof in enumerate(message.oneof_decl): lines.append(next_prefix + f"oneof {oneof.name} {{") for field in message.field: - if field.HasField("oneof_index") and field.oneof_index == oneof_index: - lines.append(next_prefix + generate_field_line(field, in_oneof=True)) + if ( + field.HasField("oneof_index") + and field.oneof_index == oneof_index + ): + lines.append( + next_prefix + generate_field_line(field, in_oneof=True) + ) lines.append(next_prefix + "}") if len(message.extension_range): if len(message.extension_range) > 1: - raise NotImplementedError("Not sure how to handle multiple extension ranges!") + raise NotImplementedError( + "Not sure how to handle multiple extension ranges!" + ) start, end = ( message.extension_range[0].start, - min(message.extension_range[0].end, 536870911) + min(message.extension_range[0].end, 536870911), ) lines.append(next_prefix + f"extensions {start} to {end};") generate_extension_lines(message, lines, indent + 1) - lines.append(prefix + '}') - lines.append('') + lines.append(prefix + "}") + lines.append("") generate_enum_lines(f, lines) generate_message_lines(f, lines) @@ -170,13 +178,16 @@ def __hash__(self): def __eq__(self, other): return isinstance(other, ProtoFile) and self.data == other.data - def attempt_to_load(self): + def attempt_to_load(self) -> descriptor_pb2.FileDescriptorProto | None: # This method will fail if this file is missing dependencies (imports) try: - return self.pool.Add(self.file_descriptor_proto) + self.pool.Add(self.file_descriptor_proto) + return self.pool.FindFileByName(self.path) except Exception as e: if "duplicate file name" in str(e): - return self.pool.FindFileByName(e.args[0].split("duplicate file name")[1].strip()) + return self.pool.FindFileByName( + e.args[0].split("duplicate file name")[1].strip() + ) return None @property @@ -230,7 +241,7 @@ def extract_proto_from_file(filename, descriptor_pool): if suffix_position == -1: break - marker_start = data.rfind(b"\x0A", offset, suffix_position) + marker_start = data.rfind(b"\x0a", offset, suffix_position) if marker_start == -1: # Doesn't look like a proto descriptor offset = suffix_position + len(PROTO_MARKER) @@ -274,7 +285,7 @@ def extract_proto_from_file(filename, descriptor_pool): offset = marker_start + descriptor_length -def find_missing_dependencies(all_files, source_file): +def find_missing_dependencies(all_files: list[ProtoFile], source_file: str) -> set[str]: matches = [f for f in all_files if f.path == source_file] if not matches: return {source_file} @@ -282,7 +293,7 @@ def find_missing_dependencies(all_files, source_file): missing = set() for match in matches: if not match.attempt_to_load(): - missing.update(set(match.imports)) + missing.update(match.imports) to_return = set() for dep in missing: @@ -300,20 +311,26 @@ def main(): " printing usable .proto files to a given directory." ) ) - parser.add_argument("input_path", help="Input path to scan. May be a file or directory.") - parser.add_argument("output_path", help="Output directory to dump .protoc files to.") + parser.add_argument( + "input_path", help="Input path to scan. May be a file or directory." + ) + parser.add_argument( + "output_path", help="Output directory to dump .protoc files to." + ) args = parser.parse_args() GLOBAL_DESCRIPTOR_POOL = DescriptorPool() - all_filenames = [str(path) for path in Path(args.input_path).rglob("*") if not path.is_dir()] + all_filenames = [ + str(path) for path in Path(args.input_path).rglob("*") if not path.is_dir() + ] print( f"Scanning {len(all_filenames):,} files under {args.input_path} for protobuf definitions..." ) proto_files_found = set() - for path in tqdm(all_filenames): + for path in track(all_filenames): for proto in extract_proto_from_file(path, GLOBAL_DESCRIPTOR_POOL): proto_files_found.add(proto) @@ -322,20 +339,30 @@ def main(): missing_deps = set() for found in proto_files_found: if not found.attempt_to_load(): - missing_deps.update(find_missing_dependencies(proto_files_found, found.path)) + missing_deps.update( + find_missing_dependencies(proto_files_found, found.path) + ) for found in proto_files_found: if not found.attempt_to_load(): missing_deps.add(found) if missing_deps: - print( - f"Unable to print out all Protobuf definitions; {len(missing_deps):,} proto files could" - f" not be found:\n{missing_deps}" - ) - sys.exit(1) + missing_deps = sorted(missing_deps, key=str) + if not proto_files_found: + print( + f"All {len(missing_deps):,} proto files could not be found:\n" + + "\n".join(f"\t{d}" for d in missing_deps) + ) + else: + all_possible = set(proto_files_found) | set(missing_deps) + print( + f"Unable to print out {len(missing_deps):,} of {len(all_possible):,} " + f"Protobuf definitions:\n" + "\n".join(f"\t{d}" for d in missing_deps) + ) + raise SystemExit(1) else: - for proto_file in tqdm(proto_files_found): + for proto_file in track(proto_files_found): Path(args.output_path).mkdir(parents=True, exist_ok=True) with open(Path(args.output_path) / proto_file.path, "w") as f: source = proto_file.source @@ -343,7 +370,9 @@ def main(): f.write(source) else: print(f"Warning: no source available for {proto_file}") - print(f"Done! Wrote {len(proto_files_found):,} proto files to {args.output_path}.") + print( + f"Done! Wrote {len(proto_files_found):,} proto files to {args.output_path}." + ) if __name__ == "__main__": diff --git a/dumper/rename_proto_files.py b/dumper/rename_proto_files.py index a194a94..3137307 100644 --- a/dumper/rename_proto_files.py +++ b/dumper/rename_proto_files.py @@ -19,7 +19,7 @@ def rename_proto_files(_dir): for old, new in replacements.items(): contents = contents.replace('import "%s";' % old, 'import "%s";' % new) if contents != original_contents: - with open(proto_file, 'w') as f: + with open(proto_file, "w") as f: f.write(contents) print("Updated %s." % proto_file) print("Done!") diff --git a/keynote_parser/__init__.py b/keynote_parser/__init__.py index 2e8a9bc..4091c1a 100644 --- a/keynote_parser/__init__.py +++ b/keynote_parser/__init__.py @@ -1,5 +1,6 @@ -# Copyright 2020-2022 Peter Sobot +# Copyright 2020-2025 Peter Sobot """Unpack and repack Apple Keyote files.""" + __author__ = "Peter Sobot" import keynote_parser.macos_app_version @@ -7,7 +8,7 @@ __major_version__ = 1 __patch_version__ = 0 __supported_keynote_version__ = keynote_parser.macos_app_version.MacOSAppVersion( - "13.1", "7037.0.101", "1A98" + "14.4", "7043.0.93", "1A89s" ) __version_tuple__ = ( __major_version__, @@ -18,7 +19,7 @@ __version__ = ".".join([str(x) for x in __version_tuple__]) __email__ = "github@petersobot.com" -__description__ = 'A tool for manipulating Apple Keynote presentation files.' +__description__ = "A tool for manipulating Apple Keynote presentation files." __url__ = "https://github.com/psobot/keynote-parser" __new_issue_url__ = "https://github.com/psobot/keynote-parser/issues/new" __command_line_invocation__ = False diff --git a/keynote_parser/mapping.py b/keynote_parser/mapping.py index 641c7f5..6eb5b1c 100644 --- a/keynote_parser/mapping.py +++ b/keynote_parser/mapping.py @@ -17,6 +17,8 @@ from .generated import TSCHArchives_sos_pb2 as TSCHArchives_sos from .generated import TSCHCommandArchives_pb2 as TSCHCommandArchives from .generated import TSCHPreUFFArchives_pb2 as TSCHPreUFFArchives +from .generated import TSCKArchives_pb2 as TSCKArchives +from .generated import TSCKArchives_sos_pb2 as TSCKArchives_sos from .generated import TSDArchives_pb2 as TSDArchives from .generated import TSDArchives_sos_pb2 as TSDArchives_sos from .generated import TSDCommandArchives_pb2 as TSDCommandArchives @@ -52,6 +54,8 @@ TSCHArchives_sos, TSCHCommandArchives, TSCHPreUFFArchives, + TSCKArchives, + TSCKArchives_sos, TSDArchives, TSDArchives_sos, TSDCommandArchives, @@ -71,7 +75,7 @@ TSWPCommandArchives, ] -TSPRegistryMapping = {'1': 'KN.DocumentArchive', '2': 'KN.ShowArchive', '3': 'KN.UIStateArchive', '4': 'KN.SlideNodeArchive', '5': 'KN.SlideArchive', '6': 'KN.SlideArchive', '7': 'KN.PlaceholderArchive', '8': 'KN.BuildArchive', '9': 'KN.SlideStyleArchive', '10': 'KN.ThemeArchive', '11': 'KN.PasteboardNativeStorageArchive', '12': 'KN.PlaceholderArchive', '14': 'TSWP.TextualAttachmentArchive', '15': 'KN.NoteArchive', '16': 'KN.RecordingArchive', '17': 'KN.RecordingEventTrackArchive', '18': 'KN.RecordingMovieTrackArchive', '19': 'KN.ClassicStylesheetRecordArchive', '20': 'KN.ClassicThemeRecordArchive', '21': 'KN.Soundtrack', '22': 'KN.SlideNumberAttachmentArchive', '23': 'KN.DesktopUILayoutArchive', '24': 'KN.CanvasSelectionArchive', '25': 'KN.SlideCollectionSelectionArchive', '26': 'KN.MotionBackgroundStyleArchive', '100': 'KN.CommandBuildSetValueArchive', '101': 'KN.CommandShowInsertSlideArchive', '102': 'KN.CommandShowMoveSlideArchive', '103': 'KN.CommandShowRemoveSlideArchive', '104': 'KN.CommandSlideInsertDrawablesArchive', '105': 'KN.CommandSlideRemoveDrawableArchive', '106': 'KN.CommandSlideNodeSetPropertyArchive', '107': 'KN.CommandSlideInsertBuildArchive', '109': 'KN.CommandSlideRemoveBuildArchive', '110': 'KN.CommandSlideInsertBuildChunkArchive', '111': 'KN.CommandSlideMoveBuildChunksArchive', '112': 'KN.CommandSlideRemoveBuildChunkArchive', '114': 'KN.CommandTransitionSetValueArchive', '118': 'KN.CommandSlideMoveDrawableZOrderArchive', '119': 'KN.CommandChangeTemplateSlideArchive', '123': 'KN.CommandShowSetSlideNumberVisibilityArchive', '124': 'KN.CommandShowSetValueArchive', '128': 'KN.CommandShowMarkOutOfSyncRecordingArchive', '129': 'KN.CommandShowRemoveRecordingArchive', '130': 'KN.CommandShowReplaceRecordingArchive', '131': 'KN.CommandShowSetSoundtrack', '132': 'KN.CommandSoundtrackSetValue', '134': 'KN.CommandMoveTemplatesArchive', '135': 'KN.CommandInsertTemplateArchive', '136': 'KN.CommandSlideSetStyleArchive', '137': 'KN.CommandSlideSetPlaceholdersForTagsArchive', '138': 'KN.CommandBuildChunkSetValueArchive', '140': 'KN.CommandRemoveTemplateArchive', '142': 'KN.CommandTemplateSetThumbnailTextArchive', '143': 'KN.CommandShowChangeThemeArchive', '144': 'KN.CommandSlidePrimitiveSetTemplateArchive', '145': 'KN.CommandTemplateSetBodyStylesArchive', '146': 'KNSOS.CommandSlideReapplyTemplateSlideArchive', '148': 'KN.ChartInfoGeometryCommandArchive', '150': 'KN.CommandSlideUpdateTemplateDrawables', '152': 'KN.CommandSlideSetBackgroundFillArchive', '153': 'KN.BuildChunkArchive', '156': 'KN.CommandSlideNodeSetViewStatePropertyArchive', '157': 'KN.CommandBuildUpdateChunkCountArchive', '158': 'KN.CommandBuildUpdateChunkReferentsArchive', '159': 'KN.BuildAttributeTupleArchive', '160': 'KN.CommandSetThemeCustomEffectTimingCurveArchive', '161': 'KN.CommandShowChangeSlideSizeArchive', '162': 'KN.InsertBuildDescriptionArchive', '163': 'KN.RemoveBuildDescriptionArchive', '164': 'KN.DocumentSelectionTransformerArchive', '165': 'KN.SlideCollectionSelectionTransformerArchive', '166': 'KN.OutlineCanvasSelectionTransformerArchive', '167': 'KN.NoteCanvasSelectionTransformerArchive', '168': 'KN.CanvasSelectionTransformerArchive', '169': 'KN.OutlineSelectionTransformerArchive', '170': 'KN.UndoObjectArchive', '172': 'KN.PrototypeForUndoTemplateChangeArchive', '173': 'KN.CommandShowMarkOutOfSyncRecordingIfNeededArchive', '174': 'KNSOS.InducedVerifyDocumentWithServerCommandArchive', '175': 'KNSOS.InducedVerifyDrawableZOrdersWithServerCommandArchive', '176': 'KN.CommandPrimitiveInsertTemplateArchive', '177': 'KN.CommandPrimitiveRemoveTemplateArchive', '178': 'KN.CommandTemplateSlideSetPlaceholderForTagArchive', '179': 'KN.CommandSlidePropagateSetPlaceholderForTagArchive', '180': 'KN.ActionGhostSelectionArchive', '181': 'KN.ActionGhostSelectionTransformerArchive', '182': 'KN.CommandSlideResetTemplateBackgroundObjectsArchive', '184': 'KN.LiveVideoSource', '185': 'KN.LiveVideoSourceCollection', '186': 'KN.CommandLiveVideoInfoApplyPreset', '187': 'KN.CommandLiveVideoInfoSetSource', '188': 'KN.CommandLiveVideoInfoSetValue', '189': 'KN.CommandLiveVideoSourceSetValue', '190': 'KN.CommandLiveVideoStyleSetValue', '191': 'KN.CommandThemeAddLiveVideoSource', '192': 'KN.CommandThemeRemoveLiveVideoSource', '194': 'KN.CommandMotionBackgroundStyleSetValueArchive', '195': 'KN.CommandMotionBackgroundStyleUpdatePosterFrameDataArchive', '200': 'TSK.DocumentArchive', '201': 'TSK.LocalCommandHistory', '202': 'TSK.CommandGroupArchive', '203': 'TSK.CommandContainerArchive', '205': 'TSK.TreeNode', '210': 'TSK.ViewStateArchive', '211': 'TSK.DocumentSupportArchive', '212': 'TSK.AnnotationAuthorArchive', '213': 'TSK.AnnotationAuthorStorageArchive', '215': 'TSK.SetAnnotationAuthorColorCommandArchive', '218': 'TSK.CollaborationCommandHistory', '219': 'TSK.DocumentSelectionArchive', '220': 'TSK.CommandSelectionBehaviorArchive', '221': 'TSK.NullCommandArchive', '222': 'TSK.CustomFormatListArchive', '223': 'TSK.GroupCommitCommandArchive', '224': 'TSK.InducedCommandCollectionArchive', '225': 'TSK.InducedCommandCollectionCommitCommandArchive', '226': 'TSK.CollaborationDocumentSessionState', '227': 'TSK.CollaborationCommandHistoryCoalescingGroup', '228': 'TSK.CollaborationCommandHistoryCoalescingGroupNode', '229': 'TSK.CollaborationCommandHistoryOriginatingCommandAcknowledgementObserver', '230': 'TSK.DocumentSupportCollaborationState', '231': 'TSK.ChangeDocumentPackageTypeCommandArchive', '232': 'TSK.UpgradeDocPostProcessingCommandArchive', '233': 'TSK.FinalCommandPairArchive', '234': 'TSK.OutgoingCommandQueueItem', '235': 'TSK.TransformerEntry', '238': 'TSK.CreateLocalStorageSnapshotCommandArchive', '240': 'TSK.SelectionPathTransformerArchive', '241': 'TSK.NativeContentDescription', '242': 'TSD.PencilAnnotationStorageArchive', '245': 'TSK.OperationStorage', '246': 'TSK.OperationStorageEntryArray', '247': 'TSK.OperationStorageEntryArraySegment', '248': 'TSK.BlockDiffsAtCurrentRevisionCommand', '249': 'TSK.OutgoingCommandQueue', '250': 'TSK.OutgoingCommandQueueSegment', '251': 'TSK.PropagatedCommandCollectionArchive', '252': 'TSK.LocalCommandHistoryItem', '253': 'TSK.LocalCommandHistoryArray', '254': 'TSK.LocalCommandHistoryArraySegment', '255': 'TSK.CollaborationCommandHistoryItem', '256': 'TSK.CollaborationCommandHistoryArray', '257': 'TSK.CollaborationCommandHistoryArraySegment', '258': 'TSK.PencilAnnotationUIState', '259': 'TSKSOS.FixCorruptedDataCommandArchive', '260': 'TSK.CommandAssetChunkArchive', '261': 'TSK.AssetUploadStatusCommandArchive', '262': 'TSK.AssetUnmaterializedOnServerCommandArchive', '263': 'TSK.CommandBehaviorArchive', '264': 'TSK.CommandBehaviorSelectionPathStorageArchive', '265': 'TSK.CommandActivityBehaviorArchive', '273': 'TSK.ActivityOnlyCommandArchive', '275': 'TSK.SetActivityAuthorShareParticipantIDCommandArchive', '279': 'TSK.ActivityAuthorCacheArchive', '280': 'TSK.ActivityStreamArchive', '281': 'TSK.ActivityArchive', '282': 'TSK.ActivityCommitCommandArchive', '283': 'TSK.ActivityStreamActivityArray', '284': 'TSK.ActivityStreamActivityArraySegment', '285': 'TSK.ActivityStreamRemovedAuthorAuditorPendingStateArchive', '286': 'TSK.ActivityAuthorArchive', '287': 'TSKSOS.ResetActivityStreamCommandArchive', '288': 'TSKSOS.RemoveAuthorIdentifiersCommandArchive', '289': 'TSK.ActivityCursorCollectionPersistenceWrapperArchive', '400': 'TSS.StyleArchive', '401': 'TSS.StylesheetArchive', '402': 'TSS.ThemeArchive', '412': 'TSS.StyleUpdatePropertyMapCommandArchive', '413': 'TSS.ThemeReplacePresetCommandArchive', '414': 'TSS.ThemeAddStylePresetCommandArchive', '415': 'TSS.ThemeRemoveStylePresetCommandArchive', '416': 'TSS.ThemeReplaceColorPresetCommandArchive', '417': 'TSS.ThemeMovePresetCommandArchive', '419': 'TSS.ThemeReplaceStylePresetAndDisconnectStylesCommandArchive', '600': 'TSA.DocumentArchive', '601': 'TSA.FunctionBrowserStateArchive', '602': 'TSA.PropagatePresetCommandArchive', '603': 'TSA.ShortcutControllerArchive', '604': 'TSA.ShortcutCommandArchive', '605': 'TSA.AddCustomFormatCommandArchive', '606': 'TSA.UpdateCustomFormatCommandArchive', '607': 'TSA.ReplaceCustomFormatCommandArchive', '611': 'TSASOS.VerifyObjectsWithServerCommandArchive', '612': 'TSA.InducedVerifyObjectsWithServerCommandArchive', '613': 'TSASOS.VerifyDocumentWithServerCommandArchive', '614': 'TSASOS.VerifyDrawableZOrdersWithServerCommandArchive', '615': 'TSASOS.InducedVerifyDrawableZOrdersWithServerCommandArchive', '616': 'TSA.NeedsMediaCompatibilityUpgradeCommandArchive', '617': 'TSA.ChangeDocumentLocaleCommandArchive', '618': 'TSA.StyleUpdatePropertyMapCommandArchive', '619': 'TSA.RemoteDataChangeCommandArchive', '623': 'TSA.GalleryItem', '624': 'TSA.GallerySelectionTransformer', '625': 'TSA.GalleryItemSelection', '626': 'TSA.GalleryItemSelectionTransformer', '627': 'TSA.GalleryInfoSetValueCommandArchive', '628': 'TSA.GalleryItemSetGeometryCommand', '629': 'TSA.GalleryItemSetValueCommand', '630': 'TSA.InducedVerifyTransformHistoryWithServerCommandArchive', '631': 'TSASOS.CommandReapplyMasterArchive', '632': 'TSASOS.PropagateMasterChangeCommandArchive', '633': 'TSA.CaptionInfoArchive', '634': 'TSA.CaptionPlacementArchive', '635': 'TSA.TitlePlacementCommandArchive', '636': 'TSA.GalleryInfoInsertItemsCommandArchive', '637': 'TSA.GalleryInfoRemoveItemsCommandArchive', '638': 'TSASOS.VerifyActivityStreamWithServerCommandArchive', '639': 'TSASOS.InducedVerifyActivityStreamWithServerCommandArchive', '640': 'TSASOS.VerifyTransformHistoryWithServerCommandArchive', '2001': 'TSWP.StorageArchive', '2002': 'TSWP.SelectionArchive', '2003': 'TSWP.DrawableAttachmentArchive', '2004': 'TSWP.TextualAttachmentArchive', '2005': 'TSWP.StorageArchive', '2006': 'TSWP.UIGraphicalAttachment', '2007': 'TSWP.TextualAttachmentArchive', '2008': 'TSWP.FootnoteReferenceAttachmentArchive', '2009': 'TSWP.TextualAttachmentArchive', '2010': 'TSWP.TSWPTOCPageNumberAttachmentArchive', '2011': 'TSWP.ShapeInfoArchive', '2013': 'TSWP.HighlightArchive', '2014': 'TSWP.CommentInfoArchive', '2015': 'TSWP.EquationInfoArchive', '2016': 'TSWP.PencilAnnotationArchive', '2021': 'TSWP.CharacterStyleArchive', '2022': 'TSWP.ParagraphStyleArchive', '2023': 'TSWP.ListStyleArchive', '2024': 'TSWP.ColumnStyleArchive', '2025': 'TSWP.ShapeStyleArchive', '2026': 'TSWP.TOCEntryStyleArchive', '2031': 'TSWP.PlaceholderSmartFieldArchive', '2032': 'TSWP.HyperlinkFieldArchive', '2033': 'TSWP.FilenameSmartFieldArchive', '2034': 'TSWP.DateTimeSmartFieldArchive', '2035': 'TSWP.BookmarkFieldArchive', '2036': 'TSWP.MergeSmartFieldArchive', '2037': 'TSWP.CitationRecordArchive', '2038': 'TSWP.CitationSmartFieldArchive', '2039': 'TSWP.UnsupportedHyperlinkFieldArchive', '2040': 'TSWP.BibliographySmartFieldArchive', '2041': 'TSWP.TOCSmartFieldArchive', '2042': 'TSWP.RubyFieldArchive', '2043': 'TSWP.NumberAttachmentArchive', '2050': 'TSWP.TextStylePresetArchive', '2051': 'TSWP.TOCSettingsArchive', '2052': 'TSWP.TOCEntryInstanceArchive', '2053': 'TSWPSOS.StyleDiffArchive', '2060': 'TSWP.ChangeArchive', '2061': 'TSK.DeprecatedChangeAuthorArchive', '2062': 'TSWP.ChangeSessionArchive', '2101': 'TSWP.TextCommandArchive', '2107': 'TSWP.ApplyPlaceholderTextCommandArchive', '2116': 'TSWP.ApplyRubyTextCommandArchive', '2118': 'TSWP.ModifyRubyTextCommandArchive', '2119': 'TSWP.UpdateDateTimeFieldCommandArchive', '2120': 'TSWP.ModifyTOCSettingsBaseCommandArchive', '2121': 'TSWP.ModifyTOCSettingsForTOCInfoCommandArchive', '2123': 'TSWP.SetObjectPropertiesCommandArchive', '2124': 'TSWP.UpdateFlowInfoCommandArchive', '2125': 'TSWP.AddFlowInfoCommandArchive', '2126': 'TSWP.RemoveFlowInfoCommandArchive', '2127': 'TSWP.ContainedObjectsCommandArchive', '2128': 'TSWP.EquationInfoGeometryCommandArchive', '2206': 'TSWP.AnchorAttachmentCommandArchive', '2217': 'TSWP.TextCommentReplyCommandArchive', '2231': 'TSWP.ShapeApplyPresetCommandArchive', '2240': 'TSWP.TOCInfoArchive', '2241': 'TSWP.TOCAttachmentArchive', '2242': 'TSWP.TOCLayoutHintArchive', '2400': 'TSWP.StyleBaseCommandArchive', '2401': 'TSWP.StyleCreateCommandArchive', '2402': 'TSWP.StyleRenameCommandArchive', '2404': 'TSWP.StyleDeleteCommandArchive', '2405': 'TSWP.StyleReorderCommandArchive', '2406': 'TSWP.StyleUpdatePropertyMapCommandArchive', '2407': 'TSWP.StorageActionCommandArchive', '2408': 'TSWP.ShapeStyleSetValueCommandArchive', '2409': 'TSWP.HyperlinkSelectionArchive', '2410': 'TSWP.FlowInfoArchive', '2411': 'TSWP.FlowInfoContainerArchive', '2412': 'TSWP.PencilAnnotationSelectionTransformerArchive', '2413': 'TSWP.DateTimeSelectionArchive', '3002': 'TSD.DrawableArchive', '3003': 'TSD.ContainerArchive', '3004': 'TSD.ShapeArchive', '3005': 'TSD.ImageArchive', '3006': 'TSD.MaskArchive', '3007': 'TSD.MovieArchive', '3008': 'TSD.GroupArchive', '3009': 'TSD.ConnectionLineArchive', '3015': 'TSD.ShapeStyleArchive', '3016': 'TSD.MediaStyleArchive', '3021': 'TSD.InfoGeometryCommandArchive', '3022': 'TSD.DrawablePathSourceCommandArchive', '3024': 'TSD.ImageMaskCommandArchive', '3025': 'TSD.ImageMediaCommandArchive', '3026': 'TSD.ImageReplaceCommandArchive', '3027': 'TSD.MediaOriginalSizeCommandArchive', '3028': 'TSD.ShapeStyleSetValueCommandArchive', '3030': 'TSD.MediaStyleSetValueCommandArchive', '3031': 'TSD.ShapeApplyPresetCommandArchive', '3032': 'TSD.MediaApplyPresetCommandArchive', '3034': 'TSD.MovieSetValueCommandArchive', '3036': 'TSD.ExteriorTextWrapCommandArchive', '3037': 'TSD.MediaFlagsCommandArchive', '3040': 'TSD.DrawableHyperlinkCommandArchive', '3041': 'TSD.ConnectionLineConnectCommandArchive', '3042': 'TSD.InstantAlphaCommandArchive', '3043': 'TSD.DrawableLockCommandArchive', '3044': 'TSD.ImageNaturalSizeCommandArchive', '3045': 'TSD.CanvasSelectionArchive', '3047': 'TSD.GuideStorageArchive', '3048': 'TSD.StyledInfoSetStyleCommandArchive', '3049': 'TSD.DrawableInfoCommentCommandArchive', '3050': 'TSD.GuideCommandArchive', '3051': 'TSD.DrawableAspectRatioLockedCommandArchive', '3052': 'TSD.ContainerRemoveChildrenCommandArchive', '3053': 'TSD.ContainerInsertChildrenCommandArchive', '3054': 'TSD.ContainerReorderChildrenCommandArchive', '3055': 'TSD.ImageAdjustmentsCommandArchive', '3056': 'TSD.CommentStorageArchive', '3057': 'TSD.ThemeReplaceFillPresetCommandArchive', '3058': 'TSD.DrawableAccessibilityDescriptionCommandArchive', '3059': 'TSD.PasteStyleCommandArchive', '3061': 'TSD.DrawableSelectionArchive', '3062': 'TSD.GroupSelectionArchive', '3063': 'TSD.PathSelectionArchive', '3064': 'TSD.CommentInvalidatingCommandSelectionBehaviorArchive', '3065': 'TSD.ImageInfoAbstractGeometryCommandArchive', '3066': 'TSD.ImageInfoGeometryCommandArchive', '3067': 'TSD.ImageInfoMaskGeometryCommandArchive', '3068': 'TSD.UndoObjectArchive', '3070': 'TSD.ReplaceAnnotationAuthorCommandArchive', '3071': 'TSD.DrawableSelectionTransformerArchive', '3072': 'TSD.GroupSelectionTransformerArchive', '3073': 'TSD.ShapeSelectionTransformerArchive', '3074': 'TSD.PathSelectionTransformerArchive', '3080': 'TSD.MediaInfoGeometryCommandArchive', '3082': 'TSD.GroupUngroupInformativeCommandArchive', '3083': 'TSD.DrawableContentDescription', '3084': 'TSD.ContainerRemoveDrawablesCommandArchive', '3085': 'TSD.ContainerInsertDrawablesCommandArchive', '3086': 'TSD.PencilAnnotationArchive', '3087': 'TSD.FreehandDrawingOpacityCommandArchive', '3088': 'TSD.DrawablePencilAnnotationCommandArchive', '3089': 'TSD.PencilAnnotationSelectionArchive', '3090': 'TSD.FreehandDrawingContentDescription', '3091': 'TSD.FreehandDrawingToolkitUIState', '3092': 'TSD.PencilAnnotationSelectionTransformerArchive', '3094': 'TSD.FreehandDrawingAnimationCommandArchive', '3095': 'TSD.InsertCaptionOrTitleCommandArchive', '3096': 'TSD.RemoveCaptionOrTitleCommandArchive', '3097': 'TSD.StandinCaptionArchive', '3098': 'TSD.SetCaptionOrTitleVisibilityCommandArchive', '4000': 'TSCE.CalculationEngineArchive', '4001': 'TSCE.FormulaRewriteCommandArchive', '4003': 'TSCE.NamedReferenceManagerArchive', '4004': 'TSCE.TrackedReferenceStoreArchive', '4005': 'TSCE.TrackedReferenceArchive', '4007': 'TSCE.RemoteDataStoreArchive', '4008': 'TSCE.FormulaOwnerDependenciesArchive', '4009': 'TSCE.CellRecordTileArchive', '4010': 'TSCE.RangePrecedentsTileArchive', '4011': 'TSCE.ReferencesToDirtyArchive', '5000': 'TSCH.PreUFF.ChartInfoArchive', '5002': 'TSCH.PreUFF.ChartGridArchive', '5004': 'TSCH.ChartMediatorArchive', '5010': 'TSCH.PreUFF.ChartStyleArchive', '5011': 'TSCH.PreUFF.ChartSeriesStyleArchive', '5012': 'TSCH.PreUFF.ChartAxisStyleArchive', '5013': 'TSCH.PreUFF.LegendStyleArchive', '5014': 'TSCH.PreUFF.ChartNonStyleArchive', '5015': 'TSCH.PreUFF.ChartSeriesNonStyleArchive', '5016': 'TSCH.PreUFF.ChartAxisNonStyleArchive', '5017': 'TSCH.PreUFF.LegendNonStyleArchive', '5020': 'TSCH.ChartStylePreset', '5021': 'TSCH.ChartDrawableArchive', '5022': 'TSCH.ChartStyleArchive', '5023': 'TSCH.ChartNonStyleArchive', '5024': 'TSCH.LegendStyleArchive', '5025': 'TSCH.LegendNonStyleArchive', '5026': 'TSCH.ChartAxisStyleArchive', '5027': 'TSCH.ChartAxisNonStyleArchive', '5028': 'TSCH.ChartSeriesStyleArchive', '5029': 'TSCH.ChartSeriesNonStyleArchive', '5030': 'TSCH.ReferenceLineStyleArchive', '5031': 'TSCH.ReferenceLineNonStyleArchive', '5103': 'TSCH.CommandSetChartTypeArchive', '5104': 'TSCH.CommandSetSeriesNameArchive', '5105': 'TSCH.CommandSetCategoryNameArchive', '5107': 'TSCH.CommandSetScatterFormatArchive', '5108': 'TSCH.CommandSetLegendFrameArchive', '5109': 'TSCH.CommandSetGridValueArchive', '5110': 'TSCH.CommandSetGridDirectionArchive', '5115': 'TSCH.CommandAddGridRowsArchive', '5116': 'TSCH.CommandAddGridColumnsArchive', '5118': 'TSCH.CommandMoveGridRowsArchive', '5119': 'TSCH.CommandMoveGridColumnsArchive', '5122': 'TSCH.CommandSetPieWedgeExplosion', '5123': 'TSCH.CommandStyleSwapArchive', '5125': 'TSCH.CommandChartApplyPreset', '5126': 'TSCH.ChartCommandArchive', '5127': 'TSCH.CommandReplaceGridValuesArchive', '5129': 'TSCH.StylePasteboardDataArchive', '5130': 'TSCH.CommandSetMultiDataSetIndexArchive', '5131': 'TSCH.CommandReplaceThemePresetArchive', '5132': 'TSCH.CommandInvalidateWPCaches', '5135': 'TSCH.CommandMutatePropertiesArchive', '5136': 'TSCH.CommandScaleAllTextArchive', '5137': 'TSCH.CommandSetFontFamilyArchive', '5138': 'TSCH.CommandApplyFillSetArchive', '5139': 'TSCH.CommandReplaceCustomFormatArchive', '5140': 'TSCH.CommandAddReferenceLineArchive', '5141': 'TSCH.CommandDeleteReferenceLineArchive', '5142': 'TSCH.CommandDeleteGridColumnsArchive', '5143': 'TSCH.CommandDeleteGridRowsArchive', '5145': 'TSCH.ChartSelectionArchive', '5146': 'TSCH.ChartTextSelectionTransformerArchive', '5147': 'TSCH.ChartSubselectionTransformerArchive', '5148': 'TSCH.ChartDrawableSelectionTransformerArchive', '5149': 'TSCH.ChartSubselectionTransformerHelperArchive', '5150': 'TSCH.ChartRefLineSubselectionTransformerHelperArchive', '5151': 'TSCH.CDESelectionTransformerArchive', '5152': 'TSCH.ChartSubselectionIdentityTransformerHelperArchive', '5154': 'TSCH.CommandPasteStyleArchive', '5155': 'TSCH.CommandInducedReplaceChartGrid', '5156': 'TSCH.CommandReplaceImageDataArchive', '5157': 'TSCH.CommandInduced3DChartGeometry', '6000': 'TST.TableInfoArchive', '6001': 'TST.TableModelArchive', '6002': 'TST.Tile', '6003': 'TST.TableStyleArchive', '6004': 'TST.CellStyleArchive', '6005': 'TST.TableDataList', '6006': 'TST.HeaderStorageBucket', '6007': 'TST.WPTableInfoArchive', '6008': 'TST.TableStylePresetArchive', '6009': 'TST.TableStrokePresetArchive', '6010': 'TST.ConditionalStyleSetArchive', '6011': 'TST.TableDataListSegment', '6030': 'TST.SelectionArchive', '6031': 'TST.CellMapArchive', '6032': 'TST.DeathhawkRdar39989167CellSelectionArchive', '6033': 'TST.ConcurrentCellMapArchive', '6034': 'TST.ConcurrentCellListArchive', '6100': 'TST.TableCommandArchive', '6101': 'TST.CommandDeleteCellsArchive', '6102': 'TST.CommandInsertColumnsOrRowsArchive', '6103': 'TST.CommandRemoveColumnsOrRowsArchive', '6104': 'TST.CommandResizeColumnOrRowArchive', '6107': 'TST.CommandSetTableNameArchive', '6111': 'TST.CommandChangeFreezeHeaderStateArchive', '6114': 'TST.CommandSetTableNameEnabledArchive', '6117': 'TST.CommandApplyTableStylePresetArchive', '6120': 'TST.CommandSetRepeatingHeaderEnabledArchive', '6123': 'TST.CommandSortArchive', '6125': 'TST.CommandStyleTableArchive', '6126': 'TST.CommandSetNumberOfDecimalPlacesArchive', '6127': 'TST.CommandSetShowThousandsSeparatorArchive', '6128': 'TST.CommandSetNegativeNumberStyleArchive', '6129': 'TST.CommandSetFractionAccuracyArchive', '6131': 'TST.CommandSetCurrencyCodeArchive', '6132': 'TST.CommandSetUseAccountingStyleArchive', '6136': 'TST.CommandSetTableFontNameArchive', '6137': 'TST.CommandSetTableFontSizeArchive', '6142': 'TST.CommandSetTableNameHeightArchive', '6144': 'TST.MergeRegionMapArchive', '6145': 'TST.CommandHideShowArchive', '6146': 'TST.CommandSetBaseArchive', '6147': 'TST.CommandSetBasePlacesArchive', '6148': 'TST.CommandSetBaseUseMinusSignArchive', '6149': 'TST.CommandSetTextStylePropertiesArchive', '6150': 'TST.CommandCategoryChangeSummaryAggregateType', '6152': 'TST.CommandCategoryResizeColumnOrRowArchive', '6153': 'TST.CommandCategoryMoveRowsArchive', '6156': 'TST.CommandSetPencilAnnotationsArchive', '6157': 'TST.CommandCategoryWillChangeGroupValue', '6158': 'TST.CommandApplyConcurrentCellMapArchive', '6159': 'TST.CommandSetGroupSortOrderArchive', '6179': 'TST.FormulaEqualsTokenAttachmentArchive', '6181': 'TST.TokenAttachmentArchive', '6182': 'TST.ExpressionNodeArchive', '6183': 'TST.BooleanNodeArchive', '6184': 'TST.NumberNodeArchive', '6185': 'TST.StringNodeArchive', '6186': 'TST.ArrayNodeArchive', '6187': 'TST.ListNodeArchive', '6188': 'TST.OperatorNodeArchive', '6189': 'TST.FunctionNodeArchive', '6190': 'TST.DateNodeArchive', '6191': 'TST.ReferenceNodeArchive', '6192': 'TST.DurationNodeArchive', '6193': 'TST.ArgumentPlaceholderNodeArchive', '6194': 'TST.PostfixOperatorNodeArchive', '6195': 'TST.PrefixOperatorNodeArchive', '6196': 'TST.FunctionEndNodeArchive', '6197': 'TST.EmptyExpressionNodeArchive', '6198': 'TST.LayoutHintArchive', '6199': 'TST.CompletionTokenAttachmentArchive', '6201': 'TST.TableDataList', '6204': 'TST.HiddenStateFormulaOwnerArchive', '6205': 'TST.CommandSetAutomaticDurationUnitsArchive', '6206': 'TST.PopUpMenuModel', '6218': 'TST.RichTextPayloadArchive', '6220': 'TST.FilterSetArchive', '6221': 'TST.CommandSetFiltersEnabledArchive', '6224': 'TST.CommandRewriteFilterFormulasForTableResizeArchive', '6226': 'TST.CommandTextPreflightInsertCellArchive', '6228': 'TST.CommandDeleteCellContentsArchive', '6229': 'TST.CommandPostflightSetCellArchive', '6235': 'TST.IdentifierNodeArchive', '6238': 'TST.CommandSetDateTimeFormatArchive', '6239': 'TST.TableCommandSelectionBehaviorArchive', '6244': 'TST.CommandApplyCellCommentArchive', '6246': 'TST.CommandSetFormulaTokenizationArchive', '6247': 'TST.TableStyleNetworkArchive', '6250': 'TST.CommandSetFilterSetTypeArchive', '6255': 'TST.CommandSetTextStyleArchive', '6256': 'TST.CommandJustForNotifyingArchive', '6258': 'TST.CommandSetSortOrderArchive', '6262': 'TST.CommandAddTableStylePresetArchive', '6264': 'TST.CellDiffMapArchive', '6265': 'TST.CommandApplyCellContentsArchive', '6266': 'TST.CommandRemoveTableStylePresetArchive', '6267': 'TST.ColumnRowUIDMapArchive', '6268': 'TST.CommandMoveColumnsOrRowsArchive', '6269': 'TST.CommandReplaceCustomFormatArchive', '6270': 'TST.CommandReplaceTableStylePresetArchive', '6271': 'TST.FormulaSelectionArchive', '6273': 'TST.CellListArchive', '6275': 'TST.CommandApplyCellDiffMapArchive', '6276': 'TST.CommandSetFilterSetArchive', '6277': 'TST.CommandMutateCellFormatArchive', '6278': 'TST.CommandSetStorageLanguageArchive', '6280': 'TST.CommandMergeArchive', '6281': 'TST.CommandUnmergeArchive', '6282': 'TST.CommandApplyCellMapArchive', '6283': 'TST.ControlCellSelectionArchive', '6284': 'TST.TableNameSelectionArchive', '6285': 'TST.CommandRewriteFormulasForTransposeArchive', '6287': 'TST.CommandTransposeTableArchive', '6289': 'TST.CommandSetDurationStyleArchive', '6290': 'TST.CommandSetDurationUnitSmallestLargestArchive', '6291': 'TST.CommandRewriteTableFormulasForRewriteSpecArchive', '6292': 'TST.CommandRewriteConditionalStylesForRewriteSpecArchive', '6293': 'TST.CommandRewriteFilterFormulasForRewriteSpecArchive', '6294': 'TST.CommandRewriteSortOrderForRewriteSpecArchive', '6295': 'TST.StrokeSelectionArchive', '6297': 'TST.LetNodeArchive', '6298': 'TST.VariableNodeArchive', '6299': 'TST.InNodeArchive', '6300': 'TST.CommandInverseMergeArchive', '6301': 'TST.CommandMoveCellsArchive', '6302': 'TST.DefaultCellStylesContainerArchive', '6303': 'TST.CommandRewriteMergeFormulasArchive', '6304': 'TST.CommandChangeTableAreaForColumnOrRowArchive', '6305': 'TST.StrokeSidecarArchive', '6306': 'TST.StrokeLayerArchive', '6307': 'TST.CommandChooseTableIdRemapperArchive', '6310': 'TST.CommandSetWasCutArchive', '6311': 'TST.AutofillSelectionArchive', '6312': 'TST.StockCellSelectionArchive', '6313': 'TST.CommandSetNowArchive', '6314': 'TST.CommandSetStructuredTextImportRecordArchive', '6315': 'TST.CommandRewriteCategoryFormulasArchive', '6316': 'TST.SummaryModelArchive', '6317': 'TST.SummaryCellVendorArchive', '6318': 'TST.CategoryOrderArchive', '6320': 'TST.CommandCategoryCollapseExpandGroupArchive', '6321': 'TST.CommandCategorySetGroupingColumnsArchive', '6323': 'TST.CommandRewriteHiddenStatesForGroupByChangeArchive', '6350': 'TST.IdempotentSelectionTransformerArchive', '6351': 'TST.TableSubSelectionTransformerBaseArchive', '6352': 'TST.TableNameSelectionTransformerArchive', '6353': 'TST.RegionSelectionTransformerArchive', '6354': 'TST.RowColumnSelectionTransformerArchive', '6355': 'TST.ControlCellSelectionTransformerArchive', '6357': 'TST.ChangePropagationMapWrapper', '6358': 'TST.WPSelectionTransformerArchive', '6359': 'TST.StockCellSelectionTransformerArchive', '6360': 'TST.CommandSetRangeControlMinMaxIncArchive', '6361': 'TST.CommandCategorySetLabelRowVisibility', '6362': 'TST.CommandRewritePencilAnnotationFormulasArchive', '6363': 'TST.PencilAnnotationArchive', '6364': 'TST.StrokeSelectionTransformerArchive', '6365': 'TST.HeaderNameMgrTileArchive', '6366': 'TST.HeaderNameMgrArchive', '6367': 'TST.CellDiffArray', '6368': 'TST.CellDiffArraySegment', '6369': 'TST.PivotOrderArchive', '6370': 'TST.PivotOwnerArchive', '6371': 'TST.CommandPivotSetPivotRulesArchive', '6372': 'TST.CategoryOwnerRefArchive', '6373': 'TST.GroupByArchive', '6374': 'TST.PivotGroupingColumnOptionsMapArchive', '6375': 'TST.CommandPivotSetGroupingColumnOptionsArchive', '6376': 'TST.CommandPivotHideShowGrandTotalsArchive', '6377': 'TST.CommandPivotSortArchive', '6379': 'TST.CommandRewritePivotOwnerFormulasArchive', '6380': 'TST.CommandRewriteTrackedReferencesArchive', '6381': 'TST.CommandExtendTableIDHistoryArchive', '6382': 'TST.GroupByArchive.AggregatorArchive', '6383': 'TST.GroupByArchive.GroupNodeArchive', '10011': 'TSWP.SectionPlaceholderArchive', '10020': 'TSWP.ShapeSelectionTransformerArchive', '10021': 'TSWP.SelectionTransformerArchive', '10022': 'TSWP.ShapeContentDescription', '10023': 'TSWP.TateChuYokoFieldArchive', '10024': 'TSWP.DropCapStyleArchive', '11000': 'TSP.PasteboardObject', '11006': 'TSP.PackageMetadata', '11007': 'TSP.PasteboardMetadata', '11008': 'TSP.ObjectContainer', '11009': 'TSP.ViewStateMetadata', '11010': 'TSP.ObjectCollection', '11011': 'TSP.DocumentMetadata', '11012': 'TSP.SupportMetadata', '11013': 'TSP.ObjectSerializationMetadata', '11014': 'TSP.DataMetadata', '11015': 'TSP.DataMetadataMap', '11016': 'TSP.LargeNumberArraySegment', '11017': 'TSP.LargeStringArraySegment', '11018': 'TSP.LargeLazyObjectArraySegment', '11019': 'TSP.LargeNumberArray', '11020': 'TSP.LargeStringArray', '11021': 'TSP.LargeLazyObjectArray', '11024': 'TSP.LargeUUIDArraySegment', '11025': 'TSP.LargeUUIDArray', '11026': 'TSP.LargeObjectArraySegment', '11027': 'TSP.LargeObjectArray'} +TSPRegistryMapping = {'1': 'KN.DocumentArchive', '2': 'KN.ShowArchive', '3': 'KN.UIStateArchive', '4': 'KN.SlideNodeArchive', '5': 'KN.SlideArchive', '6': 'KN.SlideArchive', '7': 'KN.PlaceholderArchive', '8': 'KN.BuildArchive', '9': 'KN.SlideStyleArchive', '10': 'KN.ThemeArchive', '11': 'KN.PasteboardNativeStorageArchive', '12': 'KN.PlaceholderArchive', '14': 'TSWP.TextualAttachmentArchive', '15': 'KN.NoteArchive', '16': 'KN.RecordingArchive', '17': 'KN.RecordingEventTrackArchive', '18': 'KN.RecordingMovieTrackArchive', '19': 'KN.ClassicStylesheetRecordArchive', '20': 'KN.ClassicThemeRecordArchive', '21': 'KN.Soundtrack', '22': 'KN.SlideNumberAttachmentArchive', '23': 'KN.DesktopUILayoutArchive', '24': 'KN.CanvasSelectionArchive', '25': 'KN.SlideCollectionSelectionArchive', '26': 'KN.MotionBackgroundStyleArchive', '100': 'KN.CommandBuildSetValueArchive', '101': 'KN.CommandShowInsertSlideArchive', '102': 'KN.CommandShowMoveSlideArchive', '103': 'KN.CommandShowRemoveSlideArchive', '104': 'KN.CommandSlideInsertDrawablesArchive', '105': 'KN.CommandSlideRemoveDrawableArchive', '106': 'KN.CommandSlideNodeSetPropertyArchive', '107': 'KN.CommandSlideInsertBuildArchive', '109': 'KN.CommandSlideRemoveBuildArchive', '110': 'KN.CommandSlideInsertBuildChunkArchive', '111': 'KN.CommandSlideMoveBuildChunksArchive', '112': 'KN.CommandSlideRemoveBuildChunkArchive', '114': 'KN.CommandTransitionSetValueArchive', '118': 'KN.CommandSlideMoveDrawableZOrderArchive', '119': 'KN.CommandChangeTemplateSlideArchive', '123': 'KN.CommandShowSetSlideNumberVisibilityArchive', '124': 'KN.CommandShowSetValueArchive', '128': 'KN.CommandShowMarkOutOfSyncRecordingArchive', '129': 'KN.CommandShowRemoveRecordingArchive', '130': 'KN.CommandShowReplaceRecordingArchive', '131': 'KN.CommandShowSetSoundtrack', '132': 'KN.CommandSoundtrackSetValue', '134': 'KN.CommandMoveTemplatesArchive', '135': 'KN.CommandInsertTemplateArchive', '136': 'KN.CommandSlideSetStyleArchive', '137': 'KN.CommandSlideSetPlaceholdersForTagsArchive', '138': 'KN.CommandBuildChunkSetValueArchive', '140': 'KN.CommandRemoveTemplateArchive', '142': 'KN.CommandTemplateSetThumbnailTextArchive', '143': 'KN.CommandShowChangeThemeArchive', '144': 'KN.CommandSlidePrimitiveSetTemplateArchive', '145': 'KN.CommandTemplateSetBodyStylesArchive', '146': 'KNSOS.CommandSlideReapplyTemplateSlideArchive', '148': 'KN.ChartInfoGeometryCommandArchive', '150': 'KN.CommandSlideUpdateTemplateDrawables', '152': 'KN.CommandSlideSetBackgroundFillArchive', '153': 'KN.BuildChunkArchive', '156': 'KN.CommandSlideNodeSetViewStatePropertyArchive', '157': 'KN.CommandBuildUpdateChunkCountArchive', '158': 'KN.CommandBuildUpdateChunkReferentsArchive', '159': 'KN.BuildAttributeTupleArchive', '160': 'KN.CommandSetThemeCustomEffectTimingCurveArchive', '161': 'KN.CommandShowChangeSlideSizeArchive', '162': 'KN.InsertBuildDescriptionArchive', '163': 'KN.RemoveBuildDescriptionArchive', '164': 'KN.DocumentSelectionTransformerArchive', '165': 'KN.SlideCollectionSelectionTransformerArchive', '166': 'KN.OutlineCanvasSelectionTransformerArchive', '167': 'KN.NoteCanvasSelectionTransformerArchive', '168': 'KN.CanvasSelectionTransformerArchive', '169': 'KN.OutlineSelectionTransformerArchive', '170': 'KN.UndoObjectArchive', '172': 'KN.PrototypeForUndoTemplateChangeArchive', '173': 'KN.CommandShowMarkOutOfSyncRecordingIfNeededArchive', '174': 'KNSOS.InducedVerifyDocumentWithServerCommandArchive', '175': 'KNSOS.InducedVerifyDrawableZOrdersWithServerCommandArchive', '176': 'KN.CommandPrimitiveInsertTemplateArchive', '177': 'KN.CommandPrimitiveRemoveTemplateArchive', '178': 'KN.CommandTemplateSlideSetPlaceholderForTagArchive', '179': 'KN.CommandSlidePropagateSetPlaceholderForTagArchive', '180': 'KN.ActionGhostSelectionArchive', '181': 'KN.ActionGhostSelectionTransformerArchive', '182': 'KN.CommandSlideResetTemplateBackgroundObjectsArchive', '184': 'KN.LiveVideoSource', '185': 'KN.LiveVideoSourceCollection', '186': 'KN.CommandLiveVideoInfoApplyPreset', '187': 'KN.CommandLiveVideoInfoSetSource', '188': 'KN.CommandLiveVideoInfoSetValue', '189': 'KN.CommandLiveVideoSourceSetValue', '190': 'KN.CommandLiveVideoStyleSetValue', '191': 'KN.CommandThemeAddLiveVideoSource', '192': 'KN.CommandThemeRemoveLiveVideoSource', '194': 'KN.CommandMotionBackgroundStyleSetValueArchive', '195': 'KN.CommandMotionBackgroundStyleUpdatePosterFrameDataArchive', '200': 'TSK.DocumentArchive', '201': 'TSK.LocalCommandHistory', '202': 'TSK.CommandGroupArchive', '203': 'TSK.CommandContainerArchive', '205': 'TSK.TreeNode', '210': 'TSK.ViewStateArchive', '211': 'TSK.DocumentSupportArchive', '212': 'TSK.AnnotationAuthorArchive', '213': 'TSK.AnnotationAuthorStorageArchive', '215': 'TSCK.SetAnnotationAuthorColorCommandArchive', '218': 'TSCK.CollaborationCommandHistory', '219': 'TSK.DocumentSelectionArchive', '220': 'TSK.CommandSelectionBehaviorArchive', '221': 'TSK.NullCommandArchive', '222': 'TSK.CustomFormatListArchive', '223': 'TSK.GroupCommitCommandArchive', '224': 'TSK.InducedCommandCollectionArchive', '225': 'TSK.InducedCommandCollectionCommitCommandArchive', '226': 'TSCK.CollaborationDocumentSessionState', '227': 'TSCK.CollaborationCommandHistoryCoalescingGroup', '228': 'TSCK.CollaborationCommandHistoryCoalescingGroupNode', '229': 'TSCK.CollaborationCommandHistoryOriginatingCommandAcknowledgementObserver', '230': 'TSCK.DocumentSupportCollaborationState', '231': 'TSK.ChangeDocumentPackageTypeCommandArchive', '232': 'TSK.UpgradeDocPostProcessingCommandArchive', '233': 'TSK.FinalCommandPairArchive', '234': 'TSK.OutgoingCommandQueueItem', '235': 'TSCK.TransformerEntry', '238': 'TSCK.CreateLocalStorageSnapshotCommandArchive', '240': 'TSK.SelectionPathTransformerArchive', '241': 'TSK.NativeContentDescription', '242': 'TSD.PencilAnnotationStorageArchive', '245': 'TSCK.OperationStorage', '246': 'TSCK.OperationStorageEntryArray', '247': 'TSCK.OperationStorageEntryArraySegment', '248': 'TSCK.BlockDiffsAtCurrentRevisionCommand', '249': 'TSCK.OutgoingCommandQueue', '250': 'TSCK.OutgoingCommandQueueSegment', '251': 'TSK.PropagatedCommandCollectionArchive', '252': 'TSK.LocalCommandHistoryItem', '253': 'TSK.LocalCommandHistoryArray', '254': 'TSK.LocalCommandHistoryArraySegment', '255': 'TSCK.CollaborationCommandHistoryItem', '256': 'TSCK.CollaborationCommandHistoryArray', '257': 'TSCK.CollaborationCommandHistoryArraySegment', '258': 'TSK.PencilAnnotationUIState', '259': 'TSCKSOS.FixCorruptedDataCommandArchive', '260': 'TSCK.CommandAssetChunkArchive', '261': 'TSCK.AssetUploadStatusCommandArchive', '262': 'TSCK.AssetUnmaterializedOnServerCommandArchive', '263': 'TSK.CommandBehaviorArchive', '264': 'TSK.CommandBehaviorSelectionPathStorageArchive', '265': 'TSCK.CommandActivityBehaviorArchive', '273': 'TSCK.ActivityOnlyCommandArchive', '275': 'TSCK.SetActivityAuthorShareParticipantIDCommandArchive', '279': 'TSCK.ActivityAuthorCacheArchive', '280': 'TSCK.ActivityStreamArchive', '281': 'TSCK.ActivityArchive', '282': 'TSCK.ActivityCommitCommandArchive', '283': 'TSCK.ActivityStreamActivityArray', '284': 'TSCK.ActivityStreamActivityArraySegment', '285': 'TSCK.ActivityStreamRemovedAuthorAuditorPendingStateArchive', '286': 'TSCK.ActivityAuthorArchive', '287': 'TSCKSOS.ResetActivityStreamCommandArchive', '288': 'TSCKSOS.RemoveAuthorIdentifiersCommandArchive', '289': 'TSCK.ActivityCursorCollectionPersistenceWrapperArchive', '400': 'TSS.StyleArchive', '401': 'TSS.StylesheetArchive', '402': 'TSS.ThemeArchive', '412': 'TSS.StyleUpdatePropertyMapCommandArchive', '413': 'TSS.ThemeReplacePresetCommandArchive', '414': 'TSS.ThemeAddStylePresetCommandArchive', '415': 'TSS.ThemeRemoveStylePresetCommandArchive', '416': 'TSS.ThemeReplaceColorPresetCommandArchive', '417': 'TSS.ThemeMovePresetCommandArchive', '419': 'TSS.ThemeReplaceStylePresetAndDisconnectStylesCommandArchive', '600': 'TSA.DocumentArchive', '601': 'TSA.FunctionBrowserStateArchive', '602': 'TSA.PropagatePresetCommandArchive', '603': 'TSA.ShortcutControllerArchive', '604': 'TSA.ShortcutCommandArchive', '605': 'TSA.AddCustomFormatCommandArchive', '606': 'TSA.UpdateCustomFormatCommandArchive', '607': 'TSA.ReplaceCustomFormatCommandArchive', '611': 'TSASOS.VerifyObjectsWithServerCommandArchive', '612': 'TSA.InducedVerifyObjectsWithServerCommandArchive', '613': 'TSASOS.VerifyDocumentWithServerCommandArchive', '614': 'TSASOS.VerifyDrawableZOrdersWithServerCommandArchive', '615': 'TSASOS.InducedVerifyDrawableZOrdersWithServerCommandArchive', '616': 'TSA.NeedsMediaCompatibilityUpgradeCommandArchive', '617': 'TSA.ChangeDocumentLocaleCommandArchive', '618': 'TSA.StyleUpdatePropertyMapCommandArchive', '619': 'TSA.RemoteDataChangeCommandArchive', '623': 'TSA.GalleryItem', '624': 'TSA.GallerySelectionTransformer', '625': 'TSA.GalleryItemSelection', '626': 'TSA.GalleryItemSelectionTransformer', '627': 'TSA.GalleryInfoSetValueCommandArchive', '628': 'TSA.GalleryItemSetGeometryCommand', '629': 'TSA.GalleryItemSetValueCommand', '630': 'TSA.InducedVerifyTransformHistoryWithServerCommandArchive', '631': 'TSASOS.CommandReapplyMasterArchive', '632': 'TSASOS.PropagateMasterChangeCommandArchive', '633': 'TSA.CaptionInfoArchive', '634': 'TSA.CaptionPlacementArchive', '635': 'TSA.TitlePlacementCommandArchive', '636': 'TSA.GalleryInfoInsertItemsCommandArchive', '637': 'TSA.GalleryInfoRemoveItemsCommandArchive', '638': 'TSASOS.VerifyActivityStreamWithServerCommandArchive', '639': 'TSASOS.InducedVerifyActivityStreamWithServerCommandArchive', '640': 'TSASOS.VerifyTransformHistoryWithServerCommandArchive', '641': 'TSA.Object3DInfoSetValueCommandArchive', '642': 'TSA.Object3DInfoCommandArchive', '2001': 'TSWP.StorageArchive', '2002': 'TSWP.SelectionArchive', '2003': 'TSWP.DrawableAttachmentArchive', '2004': 'TSWP.TextualAttachmentArchive', '2005': 'TSWP.StorageArchive', '2006': 'TSWP.UIGraphicalAttachment', '2007': 'TSWP.TextualAttachmentArchive', '2008': 'TSWP.FootnoteReferenceAttachmentArchive', '2009': 'TSWP.TextualAttachmentArchive', '2010': 'TSWP.TSWPTOCPageNumberAttachmentArchive', '2011': 'TSWP.ShapeInfoArchive', '2013': 'TSWP.HighlightArchive', '2014': 'TSWP.CommentInfoArchive', '2015': 'TSWP.EquationInfoArchive', '2016': 'TSWP.PencilAnnotationArchive', '2021': 'TSWP.CharacterStyleArchive', '2022': 'TSWP.ParagraphStyleArchive', '2023': 'TSWP.ListStyleArchive', '2024': 'TSWP.ColumnStyleArchive', '2025': 'TSWP.ShapeStyleArchive', '2026': 'TSWP.TOCEntryStyleArchive', '2031': 'TSWP.PlaceholderSmartFieldArchive', '2032': 'TSWP.HyperlinkFieldArchive', '2033': 'TSWP.FilenameSmartFieldArchive', '2034': 'TSWP.DateTimeSmartFieldArchive', '2035': 'TSWP.BookmarkFieldArchive', '2036': 'TSWP.MergeSmartFieldArchive', '2037': 'TSWP.CitationRecordArchive', '2038': 'TSWP.CitationSmartFieldArchive', '2039': 'TSWP.UnsupportedHyperlinkFieldArchive', '2040': 'TSWP.BibliographySmartFieldArchive', '2041': 'TSWP.TOCSmartFieldArchive', '2042': 'TSWP.RubyFieldArchive', '2043': 'TSWP.NumberAttachmentArchive', '2050': 'TSWP.TextStylePresetArchive', '2051': 'TSWP.TOCSettingsArchive', '2052': 'TSWP.TOCEntryInstanceArchive', '2053': 'TSWPSOS.StyleDiffArchive', '2060': 'TSWP.ChangeArchive', '2061': 'TSK.DeprecatedChangeAuthorArchive', '2062': 'TSWP.ChangeSessionArchive', '2101': 'TSWP.TextCommandArchive', '2107': 'TSWP.ApplyPlaceholderTextCommandArchive', '2116': 'TSWP.ApplyRubyTextCommandArchive', '2118': 'TSWP.ModifyRubyTextCommandArchive', '2120': 'TSWP.ModifyTOCSettingsBaseCommandArchive', '2121': 'TSWP.ModifyTOCSettingsForTOCInfoCommandArchive', '2123': 'TSWP.SetObjectPropertiesCommandArchive', '2124': 'TSWP.UpdateFlowInfoCommandArchive', '2125': 'TSWP.AddFlowInfoCommandArchive', '2126': 'TSWP.RemoveFlowInfoCommandArchive', '2127': 'TSWP.ContainedObjectsCommandArchive', '2128': 'TSWP.EquationInfoGeometryCommandArchive', '2206': 'TSWP.AnchorAttachmentCommandArchive', '2217': 'TSWP.TextCommentReplyCommandArchive', '2231': 'TSWP.ShapeApplyPresetCommandArchive', '2240': 'TSWP.TOCInfoArchive', '2241': 'TSWP.TOCAttachmentArchive', '2242': 'TSWP.TOCLayoutHintArchive', '2400': 'TSWP.StyleBaseCommandArchive', '2401': 'TSWP.StyleCreateCommandArchive', '2402': 'TSWP.StyleRenameCommandArchive', '2404': 'TSWP.StyleDeleteCommandArchive', '2405': 'TSWP.StyleReorderCommandArchive', '2406': 'TSWP.StyleUpdatePropertyMapCommandArchive', '2407': 'TSWP.StorageActionCommandArchive', '2408': 'TSWP.ShapeStyleSetValueCommandArchive', '2409': 'TSWP.HyperlinkSelectionArchive', '2410': 'TSWP.FlowInfoArchive', '2411': 'TSWP.FlowInfoContainerArchive', '2412': 'TSWP.PencilAnnotationSelectionTransformerArchive', '2413': 'TSWP.DateTimeSelectionArchive', '3002': 'TSD.DrawableArchive', '3003': 'TSD.ContainerArchive', '3004': 'TSD.ShapeArchive', '3005': 'TSD.ImageArchive', '3006': 'TSD.MaskArchive', '3007': 'TSD.MovieArchive', '3008': 'TSD.GroupArchive', '3009': 'TSD.ConnectionLineArchive', '3015': 'TSD.ShapeStyleArchive', '3016': 'TSD.MediaStyleArchive', '3021': 'TSD.InfoGeometryCommandArchive', '3022': 'TSD.DrawablePathSourceCommandArchive', '3024': 'TSD.ImageMaskCommandArchive', '3025': 'TSD.ImageMediaCommandArchive', '3026': 'TSD.ImageReplaceCommandArchive', '3027': 'TSD.MediaOriginalSizeCommandArchive', '3028': 'TSD.ShapeStyleSetValueCommandArchive', '3030': 'TSD.MediaStyleSetValueCommandArchive', '3031': 'TSD.ShapeApplyPresetCommandArchive', '3032': 'TSD.MediaApplyPresetCommandArchive', '3034': 'TSD.MovieSetValueCommandArchive', '3036': 'TSD.ExteriorTextWrapCommandArchive', '3037': 'TSD.MediaFlagsCommandArchive', '3040': 'TSD.DrawableHyperlinkCommandArchive', '3041': 'TSD.ConnectionLineConnectCommandArchive', '3042': 'TSD.InstantAlphaCommandArchive', '3043': 'TSD.DrawableLockCommandArchive', '3044': 'TSD.ImageNaturalSizeCommandArchive', '3045': 'TSD.CanvasSelectionArchive', '3047': 'TSD.GuideStorageArchive', '3048': 'TSD.StyledInfoSetStyleCommandArchive', '3049': 'TSD.DrawableInfoCommentCommandArchive', '3050': 'TSD.GuideCommandArchive', '3051': 'TSD.DrawableAspectRatioLockedCommandArchive', '3052': 'TSD.ContainerRemoveChildrenCommandArchive', '3053': 'TSD.ContainerInsertChildrenCommandArchive', '3054': 'TSD.ContainerReorderChildrenCommandArchive', '3055': 'TSD.ImageAdjustmentsCommandArchive', '3056': 'TSD.CommentStorageArchive', '3057': 'TSD.ThemeReplaceFillPresetCommandArchive', '3058': 'TSD.DrawableAccessibilityDescriptionCommandArchive', '3059': 'TSD.PasteStyleCommandArchive', '3061': 'TSD.DrawableSelectionArchive', '3062': 'TSD.GroupSelectionArchive', '3063': 'TSD.PathSelectionArchive', '3064': 'TSD.CommentInvalidatingCommandSelectionBehaviorArchive', '3065': 'TSD.ImageInfoAbstractGeometryCommandArchive', '3066': 'TSD.ImageInfoGeometryCommandArchive', '3067': 'TSD.ImageInfoMaskGeometryCommandArchive', '3068': 'TSD.UndoObjectArchive', '3070': 'TSD.ReplaceAnnotationAuthorCommandArchive', '3071': 'TSD.DrawableSelectionTransformerArchive', '3072': 'TSD.GroupSelectionTransformerArchive', '3073': 'TSD.ShapeSelectionTransformerArchive', '3074': 'TSD.PathSelectionTransformerArchive', '3080': 'TSD.MediaInfoGeometryCommandArchive', '3082': 'TSD.GroupUngroupInformativeCommandArchive', '3083': 'TSD.DrawableContentDescription', '3084': 'TSD.ContainerRemoveDrawablesCommandArchive', '3085': 'TSD.ContainerInsertDrawablesCommandArchive', '3086': 'TSD.PencilAnnotationArchive', '3087': 'TSD.FreehandDrawingOpacityCommandArchive', '3088': 'TSD.DrawablePencilAnnotationCommandArchive', '3089': 'TSD.PencilAnnotationSelectionArchive', '3090': 'TSD.FreehandDrawingContentDescription', '3091': 'TSD.FreehandDrawingToolkitUIState', '3092': 'TSD.PencilAnnotationSelectionTransformerArchive', '3094': 'TSD.FreehandDrawingAnimationCommandArchive', '3095': 'TSD.InsertCaptionOrTitleCommandArchive', '3096': 'TSD.RemoveCaptionOrTitleCommandArchive', '3097': 'TSD.StandinCaptionArchive', '3098': 'TSD.SetCaptionOrTitleVisibilityCommandArchive', '4000': 'TSCE.CalculationEngineArchive', '4001': 'TSCE.FormulaRewriteCommandArchive', '4003': 'TSCE.NamedReferenceManagerArchive', '4004': 'TSCE.TrackedReferenceStoreArchive', '4005': 'TSCE.TrackedReferenceArchive', '4007': 'TSCE.RemoteDataStoreArchive', '4008': 'TSCE.FormulaOwnerDependenciesArchive', '4009': 'TSCE.CellRecordTileArchive', '4010': 'TSCE.RangePrecedentsTileArchive', '4011': 'TSCE.ReferencesToDirtyArchive', '5000': 'TSCH.PreUFF.ChartInfoArchive', '5002': 'TSCH.PreUFF.ChartGridArchive', '5004': 'TSCH.ChartMediatorArchive', '5010': 'TSCH.PreUFF.ChartStyleArchive', '5011': 'TSCH.PreUFF.ChartSeriesStyleArchive', '5012': 'TSCH.PreUFF.ChartAxisStyleArchive', '5013': 'TSCH.PreUFF.LegendStyleArchive', '5014': 'TSCH.PreUFF.ChartNonStyleArchive', '5015': 'TSCH.PreUFF.ChartSeriesNonStyleArchive', '5016': 'TSCH.PreUFF.ChartAxisNonStyleArchive', '5017': 'TSCH.PreUFF.LegendNonStyleArchive', '5020': 'TSCH.ChartStylePreset', '5021': 'TSCH.ChartDrawableArchive', '5022': 'TSCH.ChartStyleArchive', '5023': 'TSCH.ChartNonStyleArchive', '5024': 'TSCH.LegendStyleArchive', '5025': 'TSCH.LegendNonStyleArchive', '5026': 'TSCH.ChartAxisStyleArchive', '5027': 'TSCH.ChartAxisNonStyleArchive', '5028': 'TSCH.ChartSeriesStyleArchive', '5029': 'TSCH.ChartSeriesNonStyleArchive', '5030': 'TSCH.ReferenceLineStyleArchive', '5031': 'TSCH.ReferenceLineNonStyleArchive', '5103': 'TSCH.CommandSetChartTypeArchive', '5104': 'TSCH.CommandSetSeriesNameArchive', '5105': 'TSCH.CommandSetCategoryNameArchive', '5107': 'TSCH.CommandSetScatterFormatArchive', '5108': 'TSCH.CommandSetLegendFrameArchive', '5109': 'TSCH.CommandSetGridValueArchive', '5110': 'TSCH.CommandSetGridDirectionArchive', '5115': 'TSCH.CommandAddGridRowsArchive', '5116': 'TSCH.CommandAddGridColumnsArchive', '5118': 'TSCH.CommandMoveGridRowsArchive', '5119': 'TSCH.CommandMoveGridColumnsArchive', '5122': 'TSCH.CommandSetPieWedgeExplosion', '5123': 'TSCH.CommandStyleSwapArchive', '5125': 'TSCH.CommandChartApplyPreset', '5126': 'TSCH.ChartCommandArchive', '5127': 'TSCH.CommandReplaceGridValuesArchive', '5129': 'TSCH.StylePasteboardDataArchive', '5130': 'TSCH.CommandSetMultiDataSetIndexArchive', '5131': 'TSCH.CommandReplaceThemePresetArchive', '5132': 'TSCH.CommandInvalidateWPCaches', '5135': 'TSCH.CommandMutatePropertiesArchive', '5136': 'TSCH.CommandScaleAllTextArchive', '5137': 'TSCH.CommandSetFontFamilyArchive', '5138': 'TSCH.CommandApplyFillSetArchive', '5139': 'TSCH.CommandReplaceCustomFormatArchive', '5140': 'TSCH.CommandAddReferenceLineArchive', '5141': 'TSCH.CommandDeleteReferenceLineArchive', '5142': 'TSCH.CommandDeleteGridColumnsArchive', '5143': 'TSCH.CommandDeleteGridRowsArchive', '5145': 'TSCH.ChartSelectionArchive', '5146': 'TSCH.ChartTextSelectionTransformerArchive', '5147': 'TSCH.ChartSubselectionTransformerArchive', '5148': 'TSCH.ChartDrawableSelectionTransformerArchive', '5149': 'TSCH.ChartSubselectionTransformerHelperArchive', '5150': 'TSCH.ChartRefLineSubselectionTransformerHelperArchive', '5151': 'TSCH.CDESelectionTransformerArchive', '5152': 'TSCH.ChartSubselectionIdentityTransformerHelperArchive', '5154': 'TSCH.CommandPasteStyleArchive', '5155': 'TSCH.CommandInducedReplaceChartGrid', '5156': 'TSCH.CommandReplaceImageDataArchive', '5157': 'TSCH.CommandInduced3DChartGeometry', '6000': 'TST.TableInfoArchive', '6001': 'TST.TableModelArchive', '6002': 'TST.Tile', '6003': 'TST.TableStyleArchive', '6004': 'TST.CellStyleArchive', '6005': 'TST.TableDataList', '6006': 'TST.HeaderStorageBucket', '6007': 'TST.WPTableInfoArchive', '6008': 'TST.TableStylePresetArchive', '6009': 'TST.TableStrokePresetArchive', '6010': 'TST.ConditionalStyleSetArchive', '6011': 'TST.TableDataListSegment', '6030': 'TST.SelectionArchive', '6031': 'TST.CellMapArchive', '6032': 'TST.DeathhawkRdar39989167CellSelectionArchive', '6033': 'TST.ConcurrentCellMapArchive', '6034': 'TST.ConcurrentCellListArchive', '6100': 'TST.TableCommandArchive', '6101': 'TST.CommandDeleteCellsArchive', '6102': 'TST.CommandInsertColumnsOrRowsArchive', '6103': 'TST.CommandRemoveColumnsOrRowsArchive', '6104': 'TST.CommandResizeColumnOrRowArchive', '6107': 'TST.CommandSetTableNameArchive', '6111': 'TST.CommandChangeFreezeHeaderStateArchive', '6114': 'TST.CommandSetTableNameEnabledArchive', '6117': 'TST.CommandApplyTableStylePresetArchive', '6120': 'TST.CommandSetRepeatingHeaderEnabledArchive', '6123': 'TST.CommandSortArchive', '6125': 'TST.CommandStyleTableArchive', '6126': 'TST.CommandSetNumberOfDecimalPlacesArchive', '6127': 'TST.CommandSetShowThousandsSeparatorArchive', '6128': 'TST.CommandSetNegativeNumberStyleArchive', '6129': 'TST.CommandSetFractionAccuracyArchive', '6131': 'TST.CommandSetCurrencyCodeArchive', '6132': 'TST.CommandSetUseAccountingStyleArchive', '6136': 'TST.CommandSetTableFontNameArchive', '6137': 'TST.CommandSetTableFontSizeArchive', '6142': 'TST.CommandSetTableNameHeightArchive', '6144': 'TST.MergeRegionMapArchive', '6145': 'TST.CommandHideShowArchive', '6146': 'TST.CommandSetBaseArchive', '6147': 'TST.CommandSetBasePlacesArchive', '6148': 'TST.CommandSetBaseUseMinusSignArchive', '6149': 'TST.CommandSetTextStylePropertiesArchive', '6150': 'TST.CommandCategoryChangeSummaryAggregateType', '6152': 'TST.CommandCategoryResizeColumnOrRowArchive', '6153': 'TST.CommandCategoryMoveRowsArchive', '6156': 'TST.CommandSetPencilAnnotationsArchive', '6157': 'TST.CommandCategoryWillChangeGroupValue', '6158': 'TST.CommandApplyConcurrentCellMapArchive', '6159': 'TST.CommandSetGroupSortOrderArchive', '6179': 'TST.FormulaEqualsTokenAttachmentArchive', '6181': 'TST.TokenAttachmentArchive', '6182': 'TST.ExpressionNodeArchive', '6183': 'TST.BooleanNodeArchive', '6184': 'TST.NumberNodeArchive', '6185': 'TST.StringNodeArchive', '6186': 'TST.ArrayNodeArchive', '6187': 'TST.ListNodeArchive', '6188': 'TST.OperatorNodeArchive', '6189': 'TST.FunctionNodeArchive', '6190': 'TST.DateNodeArchive', '6191': 'TST.ReferenceNodeArchive', '6192': 'TST.DurationNodeArchive', '6193': 'TST.ArgumentPlaceholderNodeArchive', '6194': 'TST.PostfixOperatorNodeArchive', '6195': 'TST.PrefixOperatorNodeArchive', '6196': 'TST.FunctionEndNodeArchive', '6197': 'TST.EmptyExpressionNodeArchive', '6198': 'TST.LayoutHintArchive', '6199': 'TST.CompletionTokenAttachmentArchive', '6201': 'TST.TableDataList', '6204': 'TST.HiddenStateFormulaOwnerArchive', '6205': 'TST.CommandSetAutomaticDurationUnitsArchive', '6206': 'TST.PopUpMenuModel', '6218': 'TST.RichTextPayloadArchive', '6220': 'TST.FilterSetArchive', '6221': 'TST.CommandSetFiltersEnabledArchive', '6224': 'TST.CommandRewriteFilterFormulasForTableResizeArchive', '6226': 'TST.CommandTextPreflightInsertCellArchive', '6228': 'TST.CommandDeleteCellContentsArchive', '6229': 'TST.CommandPostflightSetCellArchive', '6235': 'TST.IdentifierNodeArchive', '6238': 'TST.CommandSetDateTimeFormatArchive', '6239': 'TST.TableCommandSelectionBehaviorArchive', '6244': 'TST.CommandApplyCellCommentArchive', '6246': 'TST.CommandSetFormulaTokenizationArchive', '6247': 'TST.TableStyleNetworkArchive', '6250': 'TST.CommandSetFilterSetTypeArchive', '6255': 'TST.CommandSetTextStyleArchive', '6256': 'TST.CommandJustForNotifyingArchive', '6258': 'TST.CommandSetSortOrderArchive', '6262': 'TST.CommandAddTableStylePresetArchive', '6264': 'TST.CellDiffMapArchive', '6265': 'TST.CommandApplyCellContentsArchive', '6266': 'TST.CommandRemoveTableStylePresetArchive', '6267': 'TST.ColumnRowUIDMapArchive', '6268': 'TST.CommandMoveColumnsOrRowsArchive', '6269': 'TST.CommandReplaceCustomFormatArchive', '6270': 'TST.CommandReplaceTableStylePresetArchive', '6271': 'TST.FormulaSelectionArchive', '6273': 'TST.CellListArchive', '6275': 'TST.CommandApplyCellDiffMapArchive', '6276': 'TST.CommandSetFilterSetArchive', '6277': 'TST.CommandMutateCellFormatArchive', '6278': 'TST.CommandSetStorageLanguageArchive', '6280': 'TST.CommandMergeArchive', '6281': 'TST.CommandUnmergeArchive', '6282': 'TST.CommandApplyCellMapArchive', '6283': 'TST.ControlCellSelectionArchive', '6284': 'TST.TableNameSelectionArchive', '6285': 'TST.CommandRewriteFormulasForTransposeArchive', '6287': 'TST.CommandTransposeTableArchive', '6289': 'TST.CommandSetDurationStyleArchive', '6290': 'TST.CommandSetDurationUnitSmallestLargestArchive', '6291': 'TST.CommandRewriteTableFormulasForRewriteSpecArchive', '6292': 'TST.CommandRewriteConditionalStylesForRewriteSpecArchive', '6293': 'TST.CommandRewriteFilterFormulasForRewriteSpecArchive', '6294': 'TST.CommandRewriteSortOrderForRewriteSpecArchive', '6295': 'TST.StrokeSelectionArchive', '6298': 'TST.VariableNodeArchive', '6300': 'TST.CommandInverseMergeArchive', '6301': 'TST.CommandMoveCellsArchive', '6302': 'TST.DefaultCellStylesContainerArchive', '6303': 'TST.CommandRewriteMergeFormulasArchive', '6304': 'TST.CommandChangeTableAreaForColumnOrRowArchive', '6305': 'TST.StrokeSidecarArchive', '6306': 'TST.StrokeLayerArchive', '6307': 'TST.CommandChooseTableIdRemapperArchive', '6310': 'TST.CommandSetWasCutArchive', '6311': 'TST.AutofillSelectionArchive', '6312': 'TST.StockCellSelectionArchive', '6313': 'TST.CommandSetNowArchive', '6314': 'TST.CommandSetStructuredTextImportRecordArchive', '6315': 'TST.CommandRewriteCategoryFormulasArchive', '6316': 'TST.SummaryModelArchive', '6317': 'TST.SummaryCellVendorArchive', '6318': 'TST.CategoryOrderArchive', '6320': 'TST.CommandCategoryCollapseExpandGroupArchive', '6321': 'TST.CommandCategorySetGroupingColumnsArchive', '6323': 'TST.CommandRewriteHiddenStatesForGroupByChangeArchive', '6350': 'TST.IdempotentSelectionTransformerArchive', '6351': 'TST.TableSubSelectionTransformerBaseArchive', '6352': 'TST.TableNameSelectionTransformerArchive', '6353': 'TST.RegionSelectionTransformerArchive', '6354': 'TST.RowColumnSelectionTransformerArchive', '6355': 'TST.ControlCellSelectionTransformerArchive', '6357': 'TST.ChangePropagationMapWrapper', '6358': 'TST.WPSelectionTransformerArchive', '6359': 'TST.StockCellSelectionTransformerArchive', '6360': 'TST.CommandSetRangeControlMinMaxIncArchive', '6361': 'TST.CommandCategorySetLabelRowVisibility', '6362': 'TST.CommandRewritePencilAnnotationFormulasArchive', '6363': 'TST.PencilAnnotationArchive', '6364': 'TST.StrokeSelectionTransformerArchive', '6365': 'TST.HeaderNameMgrTileArchive', '6366': 'TST.HeaderNameMgrArchive', '6367': 'TST.CellDiffArray', '6368': 'TST.CellDiffArraySegment', '6369': 'TST.PivotOrderArchive', '6370': 'TST.PivotOwnerArchive', '6371': 'TST.CommandPivotSetPivotRulesArchive', '6372': 'TST.CategoryOwnerRefArchive', '6373': 'TST.GroupByArchive', '6374': 'TST.PivotGroupingColumnOptionsMapArchive', '6375': 'TST.CommandPivotSetGroupingColumnOptionsArchive', '6376': 'TST.CommandPivotHideShowGrandTotalsArchive', '6377': 'TST.CommandPivotSortArchive', '6379': 'TST.CommandRewritePivotOwnerFormulasArchive', '6380': 'TST.CommandRewriteTrackedReferencesArchive', '6381': 'TST.CommandExtendTableIDHistoryArchive', '6382': 'TST.GroupByArchive.AggregatorArchive', '6383': 'TST.GroupByArchive.GroupNodeArchive', '6384': 'TST.SpillOriginRefNodeArchive', '10011': 'TSWP.SectionPlaceholderArchive', '10020': 'TSWP.ShapeSelectionTransformerArchive', '10021': 'TSWP.SelectionTransformerArchive', '10022': 'TSWP.ShapeContentDescription', '10023': 'TSWP.TateChuYokoFieldArchive', '10024': 'TSWP.DropCapStyleArchive', '11000': 'TSP.PasteboardObject', '11006': 'TSP.PackageMetadata', '11007': 'TSP.PasteboardMetadata', '11008': 'TSP.ObjectContainer', '11009': 'TSP.ViewStateMetadata', '11010': 'TSP.ObjectCollection', '11011': 'TSP.DocumentMetadata', '11012': 'TSP.SupportMetadata', '11013': 'TSP.ObjectSerializationMetadata', '11014': 'TSP.DataMetadata', '11015': 'TSP.DataMetadataMap', '11016': 'TSP.LargeNumberArraySegment', '11017': 'TSP.LargeStringArraySegment', '11018': 'TSP.LargeLazyObjectArraySegment', '11019': 'TSP.LargeNumberArray', '11020': 'TSP.LargeStringArray', '11021': 'TSP.LargeLazyObjectArray', '11024': 'TSP.LargeUUIDArraySegment', '11025': 'TSP.LargeUUIDArray', '11026': 'TSP.LargeObjectArraySegment', '11027': 'TSP.LargeObjectArray'} def compute_maps(): diff --git a/protos/KNArchives.proto b/protos/KNArchives.proto index 35f1ee5..9f902da 100644 --- a/protos/KNArchives.proto +++ b/protos/KNArchives.proto @@ -2,6 +2,7 @@ syntax = "proto2"; import "TSPMessages.proto"; import "TSKArchives.proto"; +import "TSCKArchives.proto"; import "TSSArchives.proto"; import "TSDArchives.proto"; import "TSWPArchives.proto"; @@ -389,7 +390,7 @@ message IOSSavedPlaybackStateArchive { Record = 2; PlayRecording = 3; Rehearse = 4; - Showcast = 5; + Showcast_DEPRECATED = 5; } optional .KN.IOSSavedPlaybackStateArchive.PresentationType presentation_type = 1; optional uint32 slide_node_index = 2; @@ -648,10 +649,10 @@ message MixedIdOperationArgs { HidePlaceholder = 3; } repeated .KN.MixedIdOperationArgs.ArgsListKind args_list_types = 1; - repeated .TSK.AddIdOperationArgs add_args_list = 2; - repeated .TSK.IdPlacementOperationArgs show_placeholder_args_list = 3; - repeated .TSK.RemoveIdOperationArgs remove_args_list = 4; - repeated .TSK.IdPlacementOperationArgs hide_placeholder_args_list = 5; + repeated .TSCK.AddIdOperationArgs add_args_list = 2; + repeated .TSCK.IdPlacementOperationArgs show_placeholder_args_list = 3; + repeated .TSCK.RemoveIdOperationArgs remove_args_list = 4; + repeated .TSCK.IdPlacementOperationArgs hide_placeholder_args_list = 5; } message LiveVideoInfo { diff --git a/protos/KNCommandArchives.proto b/protos/KNCommandArchives.proto index 50c57c9..e03a726 100644 --- a/protos/KNCommandArchives.proto +++ b/protos/KNCommandArchives.proto @@ -2,6 +2,7 @@ syntax = "proto2"; import "TSPMessages.proto"; import "TSKArchives.proto"; +import "TSCKArchives.proto"; import "TSSArchives.proto"; import "TSDArchives.proto"; import "TSDArchives_sos.proto"; @@ -87,7 +88,7 @@ message CommandSlideRemoveDrawableArchive { message CommandSlideMoveDrawableZOrderArchive { required .TSK.CommandArchive super = 1; repeated .TSP.Reference old_ordered_infos = 4; - repeated .TSK.RearrangeIdOperationArgs args_list = 6; + repeated .TSCK.RearrangeIdOperationArgs args_list = 6; required .TSP.UUID slide_id = 7; repeated .TSP.Reference old_ordered_infos_on_slide_for_undo = 8; } @@ -174,7 +175,7 @@ message CommandShowInsertSlideArchive { required .TSK.CommandArchive super = 1; repeated .TSP.Reference slide_nodes_being_inserted = 2; repeated .TSP.Reference working_slide_nodes_being_inserted = 14; - repeated .TSK.AddIdOperationArgs inserted_args_list = 3; + repeated .TSCK.AddIdOperationArgs inserted_args_list = 3; repeated .TSP.UUID ids_of_slide_nodes_with_depth_changes = 4; repeated uint32 depths_of_slide_nodes_with_depth_changes = 5; repeated uint32 old_depths_of_slide_nodes_with_depth_changes = 6; @@ -191,7 +192,7 @@ message CommandShowInsertSlideArchive { message CommandShowMoveSlideArchive { required .TSK.CommandArchive super = 1; repeated .TSP.Reference slide_nodes_being_moved_linearly = 2; - repeated .TSK.RearrangeIdOperationArgs rearranged_args_list = 3; + repeated .TSCK.RearrangeIdOperationArgs rearranged_args_list = 3; repeated .TSP.UUID ids_of_slide_nodes_with_depth_changes = 4; repeated uint32 depths_of_slide_nodes_with_depth_changes = 5; repeated uint32 old_depths_of_slide_nodes_with_depth_changes = 6; @@ -203,7 +204,7 @@ message CommandShowMoveSlideArchive { message CommandShowRemoveSlideArchive { required .TSK.CommandArchive super = 1; repeated .TSP.Reference slide_nodes_being_removed = 2; - repeated .TSK.RemoveIdOperationArgs removed_args_list = 3; + repeated .TSCK.RemoveIdOperationArgs removed_args_list = 3; repeated .TSP.UUID ids_of_slide_nodes_with_depth_changes = 4; repeated uint32 depths_of_slide_nodes_with_depth_changes = 5; repeated uint32 old_depths_of_slide_nodes_with_depth_changes = 6; @@ -481,7 +482,7 @@ message CommandSoundtrackSetValue { message CommandSlideUpdateTemplateDrawables { required .TSK.CommandArchive super = 1; required .TSP.UUID slide_id = 2; - repeated .TSK.IdPlacementOperationArgs id_placement_operation_args = 3; + repeated .TSCK.IdPlacementOperationArgs id_placement_operation_args = 3; repeated .TSP.Reference old_child_infos_for_undo = 4; } diff --git a/protos/TSAArchives.proto b/protos/TSAArchives.proto index 6c2fc79..c9b9e6a 100644 --- a/protos/TSAArchives.proto +++ b/protos/TSAArchives.proto @@ -3,6 +3,7 @@ syntax = "proto2"; import "TSDArchives.proto"; import "TSDCommandArchives.proto"; import "TSKArchives.proto"; +import "TSCKArchives.proto"; import "TSPMessages.proto"; import "TSWPArchives.proto"; import "TSWPCommandArchives.proto"; @@ -239,7 +240,7 @@ message GalleryItemSetValueCommand { message CollaboratorGalleryItemCursor { optional .TSP.UUID displayed_item_id = 1; repeated .TSP.UUID item_ids = 2; - extend .TSK.CollaboratorCursorArchive { + extend .TSCK.CollaboratorCursorArchive { optional .TSA.CollaboratorGalleryItemCursor gallery_item_cursor = 400; } } @@ -270,3 +271,47 @@ message TitlePlacementCommandArchive { optional .TSP.Reference placement = 3; optional .TSP.Reference old_placement = 4; } + +message Object3DInfo { + optional .TSP.DataReference object_data = 1; + optional bool plays_animations = 2; + optional .TSP.Pose3D pose3d = 3; + optional .TSP.Rect boundingRect = 4; + optional .TSP.DataReference thumbnail_image_data = 5; + optional bool embedded_animations = 6; + optional .TSP.Path tracedPath = 7; + extend .TSD.MovieArchive { + optional .TSA.Object3DInfo object_3D_info = 200; + } +} + +message Object3DInfoCommandArchive { + required .TSD.InfoCommandArchive super = 1; + optional .TSP.Reference info = 2; + optional .TSP.UUIDPath info_id_path = 3; + optional .TSP.DataReference thumbnail_image_data = 4; + optional .TSP.DataReference old_thumbnail_image_data = 5; + optional .TSP.Pose3D pose3d = 6; + optional .TSP.Pose3D old_pose3d = 7; + optional .TSP.Rect boundingRect = 8; + optional .TSP.Rect oldBoundingRect = 9; + optional .TSP.Path tracedPath = 10; + optional .TSP.Path oldTracedPath = 11; +} + +message Object3DInfoSetValueCommandArchive { + enum Property { + PlaysAnimations = 3; + Opacity = 9; + } + message PropertyValue { + optional bool plays_animations = 4; + optional float opacity = 10; + } + + required .TSK.CommandArchive super = 1; + required .TSP.UUIDPath object_3d_info_id_path = 2; + required .TSA.Object3DInfoSetValueCommandArchive.Property property = 3; + optional .TSA.Object3DInfoSetValueCommandArchive.PropertyValue value = 4; + optional .TSA.Object3DInfoSetValueCommandArchive.PropertyValue old_value = 5; +} diff --git a/protos/TSCEArchives.proto b/protos/TSCEArchives.proto index 4f08d84..cc3639f 100644 --- a/protos/TSCEArchives.proto +++ b/protos/TSCEArchives.proto @@ -352,6 +352,29 @@ message WholeOwnerDependenciesExpandedArchive { optional .TSCE.InternalCellRefSetArchive dependent_cells = 1; } +message ErrorArchive { + message ErrorDictionaryEntry { + required string error_key = 1; + optional string value_for_key_string = 2; + optional double value_for_key_number = 3; + } + + required uint32 error_type_code = 1; + repeated .TSCE.ErrorArchive.ErrorDictionaryEntry error_info_dictionary = 2; +} + +message WarningArchive { + message WarningDictionaryEntry { + required string warning_key = 1; + optional string value_for_key_string = 2; + optional double value_for_key_number = 3; + } + + required uint32 warning_type = 1; + repeated .TSCE.WarningArchive.WarningDictionaryEntry warning_info_dictionary = 2; + optional .TSCE.RangeReferenceArchive range_ref = 3; +} + message CellErrorsArchive { enum ErrorFlavor { NONE = 0; @@ -366,7 +389,24 @@ message CellErrorsArchive { optional .TSCE.InternalCellReferenceArchive err_due_to_cell = 3; } + message EnhancedErrorForCell { + required .TSCE.CellCoordinateArchive coordinate = 1; + optional .TSCE.ErrorArchive error = 2; + optional .TSCE.InternalCellReferenceArchive err_due_to_cell = 3; + repeated .TSCE.WarningArchive sorted_warnings = 4; + } + repeated .TSCE.CellErrorsArchive.ErrorForCell errors = 1; + repeated .TSCE.CellErrorsArchive.EnhancedErrorForCell enhanced_errors = 2; +} + +message CellSpillSizesArchive { + message SpillForCell { + required .TSCE.CellCoordinateArchive coordinate = 1; + required .TSCE.ColumnRowSize spill_size = 2; + } + + repeated .TSCE.CellSpillSizesArchive.SpillForCell spills = 1; } message UuidReferencesArchive { @@ -405,6 +445,7 @@ message FormulaOwnerDependenciesArchive { optional .TSCE.CellDependenciesTiledArchive tiled_cell_dependencies = 13; optional .TSCE.UuidReferencesArchive uuid_references = 14; optional .TSCE.RangeDependenciesTiledArchive tiled_range_dependencies = 15; + optional .TSCE.CellSpillSizesArchive spill_range_sizes = 16; } message FormulaOwnerInfoArchive { @@ -615,21 +656,26 @@ message ASTNodeArrayArchive { UNKNOWN_FUNCTION_NODE = 31; APPEND_WHITESPACE_NODE = 32; PREPEND_WHITESPACE_NODE = 33; - BEGIN_EMBEDDED_NODE_ARRAY = 34; + BEGIN_THUNK_NODE = 34; END_THUNK_NODE = 35; CELL_REFERENCE_NODE = 36; COLON_NODE_WITH_UIDS = 45; REFERENCE_ERROR_WITH_UIDS = 46; UID_REFERENCE_NODE = 48; LET_BIND_NODE = 52; - LET_VAR_NODE = 53; - LET_END_SCOPE_NODE = 54; + VAR_NODE = 53; + END_SCOPE_NODE = 54; + LAMBDA_NODE = 55; + BEGIN_LAMBDA_THUNK_NODE = 56; + END_LAMBDA_THUNK_NODE = 57; LINKED_CELL_REF_NODE = 63; LINKED_COLUMN_REF_NODE = 64; LINKED_ROW_REF_NODE = 65; CATEGORY_REF_NODE = 66; COLON_TRACT_NODE = 67; VIEW_TRACT_REF_NODE = 68; + INTERSECTION_NODE = 69; + SPILL_RANGE_NODE = 70; } enum ASTUidTractPurpose { UIDS_INCLUDED = 0; @@ -739,11 +785,11 @@ message ASTNodeArrayArchive { optional string AST_reference_whitespace_before_cell_address = 5; } - message ASTLetNodeWhitespace { - optional string AST_let_whitespace_after_let = 1; - optional string AST_let_whitespace_after_identifier = 2; - optional string AST_let_whitespace_after_equals = 3; - optional string AST_let_whitespace_after_delimiter = 4; + message ASTLambdaIdentsListArchive { + repeated string AST_identifier_string = 1; + optional uint32 AST_first_symbol = 2; + optional string AST_whitespace_before_idents = 3; + optional string AST_whitespace_after_idents = 4; } message ASTNodeArchive { @@ -780,8 +826,8 @@ message ASTNodeArrayArchive { optional .TSCE.ASTNodeArrayArchive.ASTStickyBits AST_sticky_bits = 33; optional .TSCE.ASTNodeArrayArchive.ASTStickyBits AST_frozen_sticky_bits = 41; optional string AST_let_identifier = 34; - optional .TSCE.ASTNodeArrayArchive AST_let_e2 = 35; - optional .TSCE.ASTNodeArrayArchive.ASTLetNodeWhitespace AST_let_whitespace = 36; + optional string AST_let_whitespace = 35; + optional bool AST_let_is_continuation = 36 [default = false]; optional uint32 AST_symbol = 37; optional .TSCE.ASTNodeArrayArchive.ASTUidTractList AST_tract_list = 38; optional .TSCE.ASTNodeArrayArchive.ASTCategoryReferenceArchive AST_category_ref = 39; @@ -789,6 +835,9 @@ message ASTNodeArrayArchive { optional uint64 AST_number_node_decimal_low = 42; optional uint64 AST_number_node_decimal_high = 43; optional .TSCE.ASTNodeArrayArchive.ASTCategoryLevels AST_category_levels = 44; + optional .TSCE.ASTNodeArrayArchive.ASTLambdaIdentsListArchive AST_lambda_idents = 45; + optional uint32 AST_range_context = 46; + optional .TSCE.ASTNodeArrayArchive.ASTNodeType upgrade_node_type = 47; } repeated .TSCE.ASTNodeArrayArchive.ASTNodeArchive AST_node = 1; @@ -817,6 +866,7 @@ message FormulaArchive { message FunctorArchive { required .TSCE.FormulaArchive formula = 1; required uint32 num_args = 2; + optional uint32 first_symbol = 3; } message FormatStructArchive { @@ -969,6 +1019,10 @@ message HauntedOwnerArchive { required .TSP.UUID owner_uid = 1; } +message SpillOwnerArchive { + required .TSP.UUID owner_uid = 1; +} + message CellCoordinateArchive { optional fixed32 packedData = 1; optional uint32 column = 2; diff --git a/protos/TSCHArchives.proto b/protos/TSCHArchives.proto index c8b3cfd..9311c1a 100644 --- a/protos/TSCHArchives.proto +++ b/protos/TSCHArchives.proto @@ -2,6 +2,7 @@ syntax = "proto2"; import "TSPMessages.proto"; import "TSKArchives.proto"; +import "TSCKArchives.proto"; import "TSDArchives.proto"; import "TSSArchives.proto"; import "TSCHArchives_Common.proto"; @@ -286,18 +287,37 @@ message CollaboratorCDECursorSubselectionArchive { optional int32 row_length = 2; optional int32 column_location = 3; optional int32 column_length = 4; - extend .TSK.CollaboratorCursorArchive { + extend .TSCK.CollaboratorCursorArchive { optional .TSCH.CollaboratorCDECursorSubselectionArchive cde_cursor_subselection = 300; } } message CollaboratorChartTitleCursorSubselectionArchive { optional bool chart_title_selected = 1; - extend .TSK.CollaboratorCursorArchive { + extend .TSCK.CollaboratorCursorArchive { optional .TSCH.CollaboratorChartTitleCursorSubselectionArchive chart_title_cursor_subselection = 301; } } +message CachedAxisDataFormatterPersistableStyleObject { + optional .TSCH.ChartAxisIDArchive axis_id = 1; + optional .TSK.FormatStructArchive style_object = 2; +} + +message CachedSeriesDataFormatterPersistableStyleObject { + optional int32 series_index = 1; + optional .TSK.FormatStructArchive style_object = 2; +} + +message CachedDataFormatterPersistableStyleObjects { + repeated .TSCH.CachedAxisDataFormatterPersistableStyleObject axis_data_formatter_list = 1; + repeated .TSCH.CachedSeriesDataFormatterPersistableStyleObject series_data_formatter_list = 2; + optional .TSK.FormatStructArchive summary_label_style_object = 3; + extend .TSCH.ChartArchive { + optional .TSCH.CachedDataFormatterPersistableStyleObjects cached_data_formatter_persistable_style_objects = 10030; + } +} + extend .TSCH.ChartArchive { optional bool scene3d_settings_constant_depth = 10002; optional string last_applied_fill_set_lookup_string = 10004; diff --git a/protos/TSCKArchives.proto b/protos/TSCKArchives.proto new file mode 100644 index 0000000..af3177f --- /dev/null +++ b/protos/TSCKArchives.proto @@ -0,0 +1,435 @@ +syntax = "proto2"; + +import "TSPMessages.proto"; +import "TSKArchives.proto"; +package TSCK; + +message CollaborationCommandHistoryArray { + required .TSP.LargeArray large_array = 1; +} + +message CollaborationCommandHistoryArraySegment { + required .TSP.LargeObjectArraySegment large_object_array_segment = 1; +} + +message CollaborationCommandHistory { + message ItemList { + optional .TSP.Reference items_array = 1; + repeated .TSP.Reference transformer_entries = 2; + } + + optional .TSP.UUID local_identifier = 1; + optional .TSCK.CollaborationCommandHistory.ItemList undo_items = 2; + optional .TSCK.CollaborationCommandHistory.ItemList redo_items = 3; +} + +message CollaborationCommandHistoryItem { + optional .TSP.Reference command = 1; + optional string action_string = 2; + optional .TSP.Reference behavior = 3; + optional .TSP.Reference coalescing_group = 4; + optional uint64 revision_sequence = 5; +} + +message CollaborationCommandHistoryCoalescingGroup { + repeated .TSP.Reference nodes = 1; + optional bool did_coalesce_all_commands = 2 [default = false]; +} + +message CollaborationCommandHistoryCoalescingGroupNode { + optional .TSP.Reference command = 1; +} + +message CollaborationCommandHistoryOriginatingCommandAcknowledgementObserver { + optional .TSP.Reference coalescing_group = 1; + optional .TSP.Reference node = 2; +} + +message DocumentSupportCollaborationState { + optional .TSP.Reference collaboration_command_history = 1; + optional .TSP.Reference collaboration_session_state = 2; +} + +message SetAnnotationAuthorColorCommandArchive { + required .TSK.CommandArchive super = 1; + optional .TSP.Reference annotation_author = 2; + optional .TSP.Color color = 3; + optional .TSP.Color old_color = 4; +} + +message SetActivityAuthorShareParticipantIDCommandArchive { + required .TSK.CommandArchive super = 1; + optional .TSP.Reference activity_author = 2; + optional string share_participant_id = 3; + optional string old_share_participant_id = 4; +} + +message IdOperationArgs { + required .TSP.UUIDPath id_path = 1; +} + +message AddIdOperationArgs { + required .TSCK.IdOperationArgs super = 1; + required int32 index = 2; +} + +message RemoveIdOperationArgs { + required .TSCK.IdOperationArgs super = 1; + required int32 index = 2; +} + +message RearrangeIdOperationArgs { + required .TSCK.IdOperationArgs super = 1; + required int32 from_index = 2; + required int32 to_index = 3; +} + +message IdPlacementOperationArgs { + required .TSCK.IdOperationArgs super = 1; + required int32 from_index = 2; + required int32 to_index = 3; +} + +message ActivityCommitCommandArchive { + required .TSK.CommandArchive super = 1; + optional .TSP.Reference activity = 2; + optional .TSP.Reference author = 3; + optional bool was_activity_committed = 4 [default = true]; +} + +message ExecuteTestBetweenRollbackAndReapplyCommandArchive { + required .TSK.CommandArchive super = 1; +} + +message CreateLocalStorageSnapshotCommandArchive { + required .TSK.CommandArchive super = 1; + optional string snapshot_id = 2; +} + +message BlockDiffsAtCurrentRevisionCommand { + required .TSK.CommandArchive super = 1; +} + +message TransformerEntry { + required uint64 sequence = 1; + required double creation_time = 2; + required .TSK.OperationTransformer transformer = 3; +} + +message CollaborationAppliedCommandDocumentRevisionMapping { + optional .TSP.Reference command = 1; + optional .TSP.UUID document_revision_identifier = 2; + optional int32 document_revision_sequence = 3; + repeated .TSK.Operation remaining_command_operations = 4; + optional .TSP.Date timestamp = 5; +} + +message CollaborationDocumentSessionState { + message AcknowledgementObserverEntry { + required .TSP.UUID command_identifier = 1; + repeated .TSP.Reference acknowledgement_observers = 2; + } + + repeated string collaborator_ids = 1; + repeated .TSP.Reference rsvp_command_queue_items = 3; + repeated .TSP.Reference collaborator_cursor_transformer_entries = 4; + repeated .TSP.Reference acknowledged_commands_pending_resume_process_diffs = 5; + repeated .TSP.Reference unprocessed_commands_pending_resume_process_diffs = 6; + repeated .TSCK.CollaborationDocumentSessionState.AcknowledgementObserverEntry command_acknowledgement_observer_entries = 7; + repeated .TSP.Reference transformer_from_unprocessed_command_operations_entries = 8; + optional int32 mailbox_request_document_revision_sequence = 10; + optional .TSP.UUID mailbox_request_document_revision_identifier = 11; + optional bool last_send_pending_command_queue_item_was_moved_from_rsvp_command_queue = 12 [default = false]; + optional int32 last_command_send_marker_sequence = 13; + optional .TSP.UUID last_command_send_marker_identifier = 14; + repeated .TSP.Reference skipped_acknowledged_commands_pending_resume_process_diffs = 15; + optional .TSP.UUID last_too_old_command_identifier = 16; + optional .TSP.Reference unprocessed_operation_entries_pending_resume_process_diffs = 17; + optional .TSP.Reference send_pending_command_queue = 18; + optional uint64 count_of_send_pending_command_queue_items_moved_from_rsvp_queue = 19 [default = 0]; + optional .TSP.UUID last_enqueued_document_load_command_identifier = 20; + repeated .TSCK.CollaborationAppliedCommandDocumentRevisionMapping applied_command_document_revision_mappings_to_notify_pending_resume_process_diffs = 21; + optional uint64 count_of_command_queue_items_in_last_outgoing_command_group = 22 [default = 0]; +} + +message OperationStorageEntryArray { + optional .TSP.LargeArray large_array = 1; +} + +message OperationStorageEntryArraySegment { + optional .TSP.LargeArraySegment large_array_segment = 1; + repeated .TSK.OperationStorageEntry elements = 2; + optional int32 last_document_revision_sequence_before_segment = 3; + optional int32 last_document_revision_sequence = 4; + optional double segment_first_entry_creation_time = 5; +} + +message OperationStorage { + required .TSP.Reference entries = 1; + required uint64 operation_count = 2; + optional int32 last_document_revision_sequence = 3; + repeated fixed64 last_document_revision_identifier = 4 [packed = true]; + optional int32 last_unskippable_document_revision_before_entries_sequence = 5; + repeated fixed64 last_unskippable_document_revision_before_entries_identifier = 6 [packed = true]; + optional int32 last_unskippable_document_revision_in_entries_sequence = 7; + repeated fixed64 last_unskippable_document_revision_in_entries_identifier = 8 [packed = true]; + optional .TSP.IndexSet days_with_an_entry = 9; +} + +message OutgoingCommandQueue { + optional .TSP.LargeObjectArray large_object_array = 1; +} + +message OutgoingCommandQueueSegment { + optional .TSP.LargeObjectArraySegment large_object_array_segment = 1; +} + +message CommandAssetChunkArchive { + required .TSK.CommandArchive super = 1; + optional string digest = 2; + optional string asset_chunk = 3; + required int64 asset_chunk_length = 4; + required int64 resume_position = 5; + required int64 materialized_length = 6; +} + +message AssetUploadStatusCommandArchive { + message AssetUploadStatusInfo { + optional string digest = 1; + optional .TSP.DataUploadStatus upload_status = 2; + } + + required .TSK.CommandArchive super = 1; + repeated .TSCK.AssetUploadStatusCommandArchive.AssetUploadStatusInfo info_list = 2; +} + +message AssetUnmaterializedOnServerCommandArchive { + required .TSK.CommandArchive super = 1; + repeated string digest_list = 2; +} + +message CollaboratorCursorArchive { + optional .TSP.UUIDPath id_path = 1; + extensions 100 to 1000; +} + +message ActivityStreamArchive { + optional .TSP.Reference acknowledged_activity_array = 1; + optional .TSP.Reference unacknowledged_local_activity_array = 2; + optional .TSP.Reference author_cache = 3; + optional .TSP.Reference unacknowledged_remote_activity_array = 5; + optional bool did_upgrade_comments_to_activities = 6; + optional .TSCK.ActivityStreamTransformationStateArchive activity_stream_transformation_state = 15; + optional .TSCK.ActivityStreamActivityCounterArchive activity_counter = 16; +} + +message ActivityStreamActivityArray { + optional .TSP.LargeObjectArray large_array = 1; +} + +message ActivityStreamActivityArraySegment { + optional .TSP.LargeObjectArraySegment large_array_segment = 1; +} + +message ActivityArchive { + repeated .TSP.Reference cursor_collection_persistence_wrappers = 1; + optional .TSP.UUID author_identifier = 2; + optional int32 nondirectional_action_type = 3; + optional int32 direction = 4; + optional bool should_send_notification = 5; + optional .TSP.Date timestamp = 6; + optional int32 revision_sequence = 7; + optional .TSCK.ActivityNavigationInfoArchive additional_navigation_info = 8; + optional bool did_prepare_serialized_string_on_server = 9; + optional int32 oldest_revision_sequence_of_next_activities = 10; + optional int32 action_sub_type = 11 [default = 0]; + repeated uint32 min_updatable_version = 12 [packed = true]; +} + +message ActivityAuthorArchive { + optional string name = 1; + optional .TSP.Color color = 2; + repeated string public_ids = 3; + optional bool is_public_author = 4; + optional string share_participant_id = 5; +} + +message CommandActivityBehaviorArchive { + enum ActionType { + Unknown = 0; + FirstJoin = 1; + Add = 2; + Modify = 3; + Comment = 4; + Reply = 5; + Paste = 6; + Password = 7; + Restore = 8; + Remove = 9; + EditText = 10; + Group = 11; + Ungroup = 12; + Replace = 13; + } + enum ActionSubType { + None = 0; + FilterTable = 1; + SortTable = 2; + CategorizeTable = 3; + ChangeTemplateSlide = 4; + ChangeChartType = 5; + MoveDrawable = 6; + ResizeDrawable = 7; + AddOrRemovePage = 8; + Hyperlink = 9; + SkipSlide = 10; + UnskipSlide = 11; + ChangeBackground = 12; + ChangePageTemplate = 13; + InsertPageNumber = 14; + RefreshPivotTable = 15; + AddPassword = 16; + ChangePassword = 17; + RemovePassword = 18; + Bookmark = 19; + Equation = 20; + SectionBreak = 21; + MoveColumn = 22; + LinkTextbox = 23; + NewTextboxThread = 24; + ChangeTextboxThread = 25; + ConditionalHighlightTableCell = 26; + DataFormatTableCell = 27; + } + repeated .TSP.Reference selection_path_storages = 1; + optional .TSCK.CommandActivityBehaviorArchive.ActionType action_type = 2; + optional bool should_send_notification = 3; + optional .TSCK.ActivityNavigationInfoArchive additional_navigation_info = 4; + optional .TSCK.CommandActivityBehaviorArchive.ActionSubType action_sub_type = 5 [default = None]; +} + +message ActivityCursorCollectionArchive { + repeated .TSCK.CollaboratorCursorArchive id_cursors = 1; + optional .TSCK.CollaboratorCursorArchive text_cursor = 2; + optional .TSCK.CollaboratorCursorArchive table_cursor = 3; + optional .TSCK.CollaboratorCursorArchive cde_cursor = 4; + optional .TSCK.CollaboratorCursorArchive chart_title_cursor = 5; + optional .TSCK.CollaboratorCursorArchive gallery_item_cursor = 6; +} + +message ActivityCursorCollectionPersistenceWrapperArchive { + optional .TSCK.ActivityCursorCollectionArchive activity_cursor_collection = 1; +} + +message ActivityNavigationInfoArchive { + extensions 100 to 1000; +} + +message CommentActivityNavigationInfoArchive { + required string comment_id = 1; + required .TSP.UUID parent_uuid = 2; + required .TSP.UUID storage_uuid = 3; + extend .TSCK.ActivityNavigationInfoArchive { + optional .TSCK.CommentActivityNavigationInfoArchive comment_activity_navigation_info = 100; + } +} + +message ActivityAuthorCacheArchive { + message ShareParticipantIDCache { + required .TSP.UUID identifier = 1; + required string share_participant_id = 2; + } + + message PublicIDCache { + required .TSP.UUID identifier = 1; + required string public_identifier = 2; + } + + message IndexCache { + required .TSP.UUID identifier = 1; + required uint64 author_index = 2; + } + + message FirstJoinCache { + required .TSP.UUID identifier = 1; + optional .TSP.Date first_join_date = 2; + } + + repeated .TSCK.ActivityAuthorCacheArchive.ShareParticipantIDCache share_participant_id_cache = 1; + repeated .TSCK.ActivityAuthorCacheArchive.PublicIDCache fallback_public_id_cache = 3; + repeated .TSCK.ActivityAuthorCacheArchive.IndexCache index_cache = 4; + repeated .TSCK.ActivityAuthorCacheArchive.FirstJoinCache first_join_cache = 5; + repeated .TSP.Reference authors = 6; + optional .TSP.Date last_audit_date = 7; + repeated .TSP.UUID author_identifiers_to_remove = 8; +} + +message ActivityOnlyCommandArchive { + required .TSK.CommandArchive super = 1; +} + +message ActivityNotificationItemArchive { + required int32 type = 1; + required .TSP.UUID unique_identifier = 2; + repeated .TSP.Reference activities = 3; + optional .TSP.Date first_timestamp = 4; +} + +message ActivityNotificationParticipantCacheArchive { + message UniqueIdentifierAndAttempts { + required .TSP.UUID unique_identifier = 1; + required uint32 attempts = 2; + } + + repeated .TSP.Reference notification_items = 1; + optional .TSP.Date last_edit_notification_item_sent_date = 2; + repeated .TSCK.ActivityNotificationParticipantCacheArchive.UniqueIdentifierAndAttempts sender_failed_to_enqueue_attempts = 3; + required string private_id = 4; + optional .TSP.Date last_comment_notification_item_sent_date = 5; +} + +message ActivityNotificationQueueArchive { + repeated .TSP.Reference unprocessed_notification_items = 1; + repeated .TSP.Reference pending_participant_caches = 3; + repeated .TSP.Reference sent_participant_caches = 5; +} + +message ActivityStreamTransformationStateArchive { + enum ActionType { + Trasnform = 0; + Coalesce = 1; + } + required int32 next_activity_to_transform_index = 1; + optional int32 oldest_revision_sequence_after_transformed = 2; + optional .TSP.Date last_activity_coalesced_date = 3; + optional .TSCK.ActivityStreamTransformationStateArchive.ActionType action_type = 4; + optional int32 transform_to_document_revision_sequence = 5; + repeated fixed64 transform_to_document_revision_identifier = 6 [packed = true]; + optional double timestamp_of_last_activity_when_last_activity_coalescing = 7; + optional bool preserving_revision_sequence_order = 8; +} + +message ActivityStreamActivityCounterArchive { + message ActionTypeCounter { + optional int32 action_type = 1; + optional uint32 count = 2; + } + + message CursorTypeCounter { + optional int32 cursor_type = 1; + optional uint32 count = 2; + } + + repeated .TSCK.ActivityStreamActivityCounterArchive.ActionTypeCounter action_type_counter = 1; + repeated .TSCK.ActivityStreamActivityCounterArchive.CursorTypeCounter cursor_type_counter = 2; +} + +message ActivityStreamRemovedAuthorAuditorPendingStateArchive { + message DateToAuditAndType { + required .TSP.Date date_to_audit = 1; + required int32 type = 2; + } + + repeated .TSP.UUID current_author_identifiers = 1; + repeated .TSCK.ActivityStreamRemovedAuthorAuditorPendingStateArchive.DateToAuditAndType dates_to_audit = 3; +} diff --git a/protos/TSCKArchives_sos.proto b/protos/TSCKArchives_sos.proto new file mode 100644 index 0000000..b1964d8 --- /dev/null +++ b/protos/TSCKArchives_sos.proto @@ -0,0 +1,21 @@ +syntax = "proto2"; + +import "TSKArchives.proto"; +import "TSPMessages.proto"; +package TSCKSOS; + +message FixCorruptedDataCommandArchive { + required .TSK.CommandArchive super = 1; + repeated string corrupted_digest_list = 2; + optional bool corrupted_digest_list_undefined = 3; +} + +message RemoveAuthorIdentifiersCommandArchive { + required .TSK.CommandArchive super = 1; + repeated .TSP.UUID author_identifiers = 2; + optional bool author_identifiers_undefined = 3; +} + +message ResetActivityStreamCommandArchive { + required .TSK.CommandArchive super = 1; +} diff --git a/protos/TSDArchives.proto b/protos/TSDArchives.proto index e098239..606c796 100644 --- a/protos/TSDArchives.proto +++ b/protos/TSDArchives.proto @@ -239,12 +239,12 @@ message DropShadowArchive { } message ContactShadowArchive { - optional float height = 2 [default = 0.200000003]; + optional float height = 2 [default = 0.2]; optional float offset = 4 [default = 0]; } message CurvedShadowArchive { - optional float curve = 1 [default = 0.600000024]; + optional float curve = 1 [default = 0.6]; } message ReflectionArchive { diff --git a/protos/TSDCommandArchives.proto b/protos/TSDCommandArchives.proto index 8fab60a..83360a0 100644 --- a/protos/TSDCommandArchives.proto +++ b/protos/TSDCommandArchives.proto @@ -2,6 +2,7 @@ syntax = "proto2"; import "TSPMessages.proto"; import "TSKArchives.proto"; +import "TSCKArchives.proto"; import "TSSArchives.proto"; import "TSDArchives.proto"; import "TSDArchives_sos.proto"; @@ -39,7 +40,7 @@ message UngroupGroupCommandArchive { message ContainerRemoveChildrenCommandArchive { required .TSK.CommandArchive super = 1; optional .TSP.UUIDPath container_id_path = 2; - repeated .TSK.RemoveIdOperationArgs args_list = 3; + repeated .TSCK.RemoveIdOperationArgs args_list = 3; repeated .TSP.Reference children = 4; } @@ -51,7 +52,7 @@ message ContainerInsertChildrenCommandArchive { required .TSK.CommandArchive super = 1; optional .TSP.UUIDPath container_id_path = 2; repeated .TSP.Reference children = 3; - repeated .TSK.AddIdOperationArgs args_list = 4; + repeated .TSCK.AddIdOperationArgs args_list = 4; repeated .TSP.UUID custom_format_keys = 5; optional .TSP.Reference undo_object = 6; } @@ -64,7 +65,7 @@ message ContainerInsertDrawablesCommandArchive { message ContainerReorderChildrenCommandArchive { required .TSK.CommandArchive super = 1; optional .TSP.UUIDPath container_id_path = 2; - repeated .TSK.RearrangeIdOperationArgs args_list = 3; + repeated .TSCK.RearrangeIdOperationArgs args_list = 3; } message GroupUngroupInformativeCommandArchive { diff --git a/protos/TSKArchives.proto b/protos/TSKArchives.proto index b1f3b2f..bac9718 100644 --- a/protos/TSKArchives.proto +++ b/protos/TSKArchives.proto @@ -33,47 +33,6 @@ message LocalCommandHistory { optional bool fixed_radar_13365177 = 10; } -message CollaborationCommandHistoryArray { - required .TSP.LargeArray large_array = 1; -} - -message CollaborationCommandHistoryArraySegment { - required .TSP.LargeObjectArraySegment large_object_array_segment = 1; -} - -message CollaborationCommandHistory { - message ItemList { - optional .TSP.Reference items_array = 1; - repeated .TSP.Reference transformer_entries = 2; - } - - optional .TSP.UUID local_identifier = 1; - optional .TSK.CollaborationCommandHistory.ItemList undo_items = 2; - optional .TSK.CollaborationCommandHistory.ItemList redo_items = 3; -} - -message CollaborationCommandHistoryItem { - optional .TSP.Reference command = 1; - optional string action_string = 2; - optional .TSP.Reference behavior = 3; - optional .TSP.Reference coalescing_group = 4; - optional uint64 revision_sequence = 5; -} - -message CollaborationCommandHistoryCoalescingGroup { - repeated .TSP.Reference nodes = 1; - optional bool did_coalesce_all_commands = 2 [default = false]; -} - -message CollaborationCommandHistoryCoalescingGroupNode { - optional .TSP.Reference command = 1; -} - -message CollaborationCommandHistoryOriginatingCommandAcknowledgementObserver { - optional .TSP.Reference coalescing_group = 1; - optional .TSP.Reference node = 2; -} - message DocumentArchive { optional string locale_identifier = 4; optional .TSP.Reference annotation_author_storage = 7; @@ -85,6 +44,7 @@ message DocumentArchive { optional .TSP.Reference collaboration_operation_history = 14; optional bool should_measure_negatively_tracked_text_correctly = 15; optional bool use_optimized_text_vertical_alignment = 16; + optional bool should_allow_ligatures_in_minimally_tracked_text = 18; optional .TSK.FormattingSymbolsArchive formatting_symbols = 17; optional .TSP.Reference activity_stream = 199; } @@ -145,11 +105,6 @@ message FormattingSymbolsArchive { repeated .TSK.FormattingSymbolsArchive.CurrencySymbol currency_symbols = 48; } -message DocumentSupportCollaborationState { - optional .TSP.Reference collaboration_command_history = 1; - optional .TSP.Reference collaboration_session_state = 2; -} - message DocumentSupportArchive { optional .TSP.Reference command_history = 1; optional uint32 undo_count = 4; @@ -309,20 +264,6 @@ message AnnotationAuthorStorageArchive { repeated .TSP.Reference annotation_author = 1; } -message SetAnnotationAuthorColorCommandArchive { - required .TSK.CommandArchive super = 1; - optional .TSP.Reference annotation_author = 2; - optional .TSP.Color color = 3; - optional .TSP.Color old_color = 4; -} - -message SetActivityAuthorShareParticipantIDCommandArchive { - required .TSK.CommandArchive super = 1; - optional .TSP.Reference activity_author = 2; - optional string share_participant_id = 3; - optional string old_share_participant_id = 4; -} - message CommandBehaviorSelectionPathStorageArchive { optional .TSK.SelectionPathArchive archived_selection = 1; optional .TSK.SelectionPathArchive archived_old_selection = 2; @@ -356,32 +297,6 @@ message DocumentSelectionArchive { optional .TSP.Reference document_root = 1; } -message IdOperationArgs { - required .TSP.UUIDPath id_path = 1; -} - -message AddIdOperationArgs { - required .TSK.IdOperationArgs super = 1; - required int32 index = 2; -} - -message RemoveIdOperationArgs { - required .TSK.IdOperationArgs super = 1; - required int32 index = 2; -} - -message RearrangeIdOperationArgs { - required .TSK.IdOperationArgs super = 1; - required int32 from_index = 2; - required int32 to_index = 3; -} - -message IdPlacementOperationArgs { - required .TSK.IdOperationArgs super = 1; - required int32 from_index = 2; - required int32 to_index = 3; -} - message NullCommandArchive { required .TSK.CommandArchive super = 1; } @@ -399,17 +314,6 @@ message InducedCommandCollectionCommitCommandArchive { required .TSK.CommandArchive super = 1; } -message ActivityCommitCommandArchive { - required .TSK.CommandArchive super = 1; - optional .TSP.Reference activity = 2; - optional .TSP.Reference author = 3; - optional bool was_activity_committed = 4 [default = true]; -} - -message ExecuteTestBetweenRollbackAndReapplyCommandArchive { - required .TSK.CommandArchive super = 1; -} - message ChangeDocumentPackageTypeCommandArchive { enum PackageType { Default = 0; @@ -421,15 +325,6 @@ message ChangeDocumentPackageTypeCommandArchive { required .TSK.ChangeDocumentPackageTypeCommandArchive.PackageType old_package_type = 3; } -message CreateLocalStorageSnapshotCommandArchive { - required .TSK.CommandArchive super = 1; - optional string snapshot_id = 2; -} - -message BlockDiffsAtCurrentRevisionCommand { - required .TSK.CommandArchive super = 1; -} - message RangeAddress { repeated uint64 address_identifier = 1; repeated uint32 range_list = 2; @@ -465,16 +360,12 @@ message OperationTransformer { repeated .TSK.Operation operations = 2; } -message TransformerEntry { - required uint64 sequence = 1; - required double creation_time = 2; - required .TSK.OperationTransformer transformer = 3; -} - message OutgoingCommandQueueItem { optional .TSP.Reference command = 1; optional string serialized_json_without_data_base64_encoded_string = 2; optional .TSP.DataReference serialized_json_without_data_base64_encoded_data = 4; + optional bool did_rollback_reapply = 6; + optional bool contains_large_pending_upload_data = 7; repeated .TSK.OutgoingCommandQueueItemUUIDToDataMapEntry uuid_to_data_map_entries = 3; repeated .TSP.DataReference large_data_list = 5; } @@ -484,42 +375,6 @@ message OutgoingCommandQueueItemUUIDToDataMapEntry { required .TSP.DataReference data = 2; } -message CollaborationAppliedCommandDocumentRevisionMapping { - optional .TSP.Reference command = 1; - optional .TSP.UUID document_revision_identifier = 2; - optional int32 document_revision_sequence = 3; - repeated .TSK.Operation remaining_command_operations = 4; - optional .TSP.Date timestamp = 5; -} - -message CollaborationDocumentSessionState { - message AcknowledgementObserverEntry { - required .TSP.UUID command_identifier = 1; - repeated .TSP.Reference acknowledgement_observers = 2; - } - - repeated string collaborator_ids = 1; - repeated .TSP.Reference rsvp_command_queue_items = 3; - repeated .TSP.Reference collaborator_cursor_transformer_entries = 4; - repeated .TSP.Reference acknowledged_commands_pending_resume_process_diffs = 5; - repeated .TSP.Reference unprocessed_commands_pending_resume_process_diffs = 6; - repeated .TSK.CollaborationDocumentSessionState.AcknowledgementObserverEntry command_acknowledgement_observer_entries = 7; - repeated .TSP.Reference transformer_from_unprocessed_command_operations_entries = 8; - optional int32 mailbox_request_document_revision_sequence = 10; - optional .TSP.UUID mailbox_request_document_revision_identifier = 11; - optional bool last_send_pending_command_queue_item_was_moved_from_rsvp_command_queue = 12 [default = false]; - optional int32 last_command_send_marker_sequence = 13; - optional .TSP.UUID last_command_send_marker_identifier = 14; - repeated .TSP.Reference skipped_acknowledged_commands_pending_resume_process_diffs = 15; - optional .TSP.UUID last_too_old_command_identifier = 16; - optional .TSP.Reference unprocessed_operation_entries_pending_resume_process_diffs = 17; - optional .TSP.Reference send_pending_command_queue = 18; - optional uint64 count_of_send_pending_command_queue_items_moved_from_rsvp_queue = 19 [default = 0]; - optional .TSP.UUID last_enqueued_document_load_command_identifier = 20; - repeated .TSK.CollaborationAppliedCommandDocumentRevisionMapping applied_command_document_revision_mappings_to_notify_pending_resume_process_diffs = 21; - optional uint64 count_of_command_queue_items_in_last_outgoing_command_group = 22 [default = 0]; -} - message NativeContentDescription { optional string app_name = 1; optional string app_version = 2; @@ -559,38 +414,6 @@ message OperationStorageEntry { repeated uint32 file_format_version = 6 [packed = true]; } -message OperationStorageEntryArray { - optional .TSP.LargeArray large_array = 1; -} - -message OperationStorageEntryArraySegment { - optional .TSP.LargeArraySegment large_array_segment = 1; - repeated .TSK.OperationStorageEntry elements = 2; - optional int32 last_document_revision_sequence_before_segment = 3; - optional int32 last_document_revision_sequence = 4; - optional double segment_first_entry_creation_time = 5; -} - -message OperationStorage { - required .TSP.Reference entries = 1; - required uint64 operation_count = 2; - optional int32 last_document_revision_sequence = 3; - repeated fixed64 last_document_revision_identifier = 4 [packed = true]; - optional int32 last_unskippable_document_revision_before_entries_sequence = 5; - repeated fixed64 last_unskippable_document_revision_before_entries_identifier = 6 [packed = true]; - optional int32 last_unskippable_document_revision_in_entries_sequence = 7; - repeated fixed64 last_unskippable_document_revision_in_entries_identifier = 8 [packed = true]; - optional .TSP.IndexSet days_with_an_entry = 9; -} - -message OutgoingCommandQueue { - optional .TSP.LargeObjectArray large_object_array = 1; -} - -message OutgoingCommandQueueSegment { - optional .TSP.LargeObjectArraySegment large_object_array_segment = 1; -} - message DataReferenceRecord { message ContainerUUIDToReferencedDataPair { required .TSP.UUID container_uuid = 1; @@ -603,30 +426,6 @@ message DataReferenceRecord { repeated .TSP.DataReference unbounded_referenced_datas = 3; } -message CommandAssetChunkArchive { - required .TSK.CommandArchive super = 1; - optional string digest = 2; - optional string asset_chunk = 3; - required int64 asset_chunk_length = 4; - required int64 resume_position = 5; - required int64 materialized_length = 6; -} - -message AssetUploadStatusCommandArchive { - message AssetUploadStatusInfo { - optional string digest = 1; - optional .TSP.DataUploadStatus upload_status = 2; - } - - required .TSK.CommandArchive super = 1; - repeated .TSK.AssetUploadStatusCommandArchive.AssetUploadStatusInfo info_list = 2; -} - -message AssetUnmaterializedOnServerCommandArchive { - required .TSK.CommandArchive super = 1; - repeated string digest_list = 2; -} - message PencilAnnotationUIState { enum PencilAnnotationToolType { Pen = 0; @@ -640,229 +439,3 @@ message PencilAnnotationUIState { optional float highlighter_tool_opacity = 6; optional float highlighter_tool_width = 7; } - -message CollaboratorCursorArchive { - optional .TSP.UUIDPath id_path = 1; - extensions 100 to 1000; -} - -message ActivityStreamArchive { - optional .TSP.Reference acknowledged_activity_array = 1; - optional .TSP.Reference unacknowledged_local_activity_array = 2; - optional .TSP.Reference author_cache = 3; - optional .TSP.Reference unacknowledged_remote_activity_array = 5; - optional bool did_upgrade_comments_to_activities = 6; - optional .TSK.ActivityStreamTransformationStateArchive activity_stream_transformation_state = 15; - optional .TSK.ActivityStreamActivityCounterArchive activity_counter = 16; -} - -message ActivityStreamActivityArray { - optional .TSP.LargeObjectArray large_array = 1; -} - -message ActivityStreamActivityArraySegment { - optional .TSP.LargeObjectArraySegment large_array_segment = 1; -} - -message ActivityArchive { - repeated .TSP.Reference cursor_collection_persistence_wrappers = 1; - optional .TSP.UUID author_identifier = 2; - optional int32 nondirectional_action_type = 3; - optional int32 direction = 4; - optional bool should_send_notification = 5; - optional .TSP.Date timestamp = 6; - optional int32 revision_sequence = 7; - optional .TSK.ActivityNavigationInfoArchive additional_navigation_info = 8; - optional bool did_prepare_serialized_string_on_server = 9; - optional int32 oldest_revision_sequence_of_next_activities = 10; - optional int32 action_sub_type = 11 [default = 0]; - repeated uint32 min_updatable_version = 12 [packed = true]; -} - -message ActivityAuthorArchive { - optional string name = 1; - optional .TSP.Color color = 2; - repeated string public_ids = 3; - optional bool is_public_author = 4; - optional string share_participant_id = 5; -} - -message CommandActivityBehaviorArchive { - enum ActionType { - Unknown = 0; - FirstJoin = 1; - Add = 2; - Modify = 3; - Comment = 4; - Reply = 5; - Paste = 6; - Password = 7; - Restore = 8; - Remove = 9; - EditText = 10; - Group = 11; - Ungroup = 12; - Replace = 13; - } - enum ActionSubType { - None = 0; - FilterTable = 1; - SortTable = 2; - CategorizeTable = 3; - ChangeTemplateSlide = 4; - ChangeChartType = 5; - MoveDrawable = 6; - ResizeDrawable = 7; - AddOrRemovePage = 8; - Hyperlink = 9; - SkipSlide = 10; - UnskipSlide = 11; - ChangeBackground = 12; - ChangePageTemplate = 13; - InsertPageNumber = 14; - RefreshPivotTable = 15; - AddPassword = 16; - ChangePassword = 17; - RemovePassword = 18; - Bookmark = 19; - Equation = 20; - SectionBreak = 21; - MoveColumn = 22; - LinkTextbox = 23; - NewTextboxThread = 24; - ChangeTextboxThread = 25; - ConditionalHighlightTableCell = 26; - DataFormatTableCell = 27; - } - repeated .TSP.Reference selection_path_storages = 1; - optional .TSK.CommandActivityBehaviorArchive.ActionType action_type = 2; - optional bool should_send_notification = 3; - optional .TSK.ActivityNavigationInfoArchive additional_navigation_info = 4; - optional .TSK.CommandActivityBehaviorArchive.ActionSubType action_sub_type = 5 [default = None]; -} - -message ActivityCursorCollectionArchive { - repeated .TSK.CollaboratorCursorArchive id_cursors = 1; - optional .TSK.CollaboratorCursorArchive text_cursor = 2; - optional .TSK.CollaboratorCursorArchive table_cursor = 3; - optional .TSK.CollaboratorCursorArchive cde_cursor = 4; - optional .TSK.CollaboratorCursorArchive chart_title_cursor = 5; - optional .TSK.CollaboratorCursorArchive gallery_item_cursor = 6; -} - -message ActivityCursorCollectionPersistenceWrapperArchive { - optional .TSK.ActivityCursorCollectionArchive activity_cursor_collection = 1; -} - -message ActivityNavigationInfoArchive { - extensions 100 to 1000; -} - -message CommentActivityNavigationInfoArchive { - required string comment_id = 1; - required .TSP.UUID parent_uuid = 2; - required .TSP.UUID storage_uuid = 3; - extend .TSK.ActivityNavigationInfoArchive { - optional .TSK.CommentActivityNavigationInfoArchive comment_activity_navigation_info = 100; - } -} - -message ActivityAuthorCacheArchive { - message ShareParticipantIDCache { - required .TSP.UUID identifier = 1; - required string share_participant_id = 2; - } - - message PublicIDCache { - required .TSP.UUID identifier = 1; - required string public_identifier = 2; - } - - message IndexCache { - required .TSP.UUID identifier = 1; - required uint64 author_index = 2; - } - - message FirstJoinCache { - required .TSP.UUID identifier = 1; - optional .TSP.Date first_join_date = 2; - } - - repeated .TSK.ActivityAuthorCacheArchive.ShareParticipantIDCache share_participant_id_cache = 1; - repeated .TSK.ActivityAuthorCacheArchive.PublicIDCache fallback_public_id_cache = 3; - repeated .TSK.ActivityAuthorCacheArchive.IndexCache index_cache = 4; - repeated .TSK.ActivityAuthorCacheArchive.FirstJoinCache first_join_cache = 5; - repeated .TSP.Reference authors = 6; - optional .TSP.Date last_audit_date = 7; - repeated .TSP.UUID author_identifiers_to_remove = 8; -} - -message ActivityOnlyCommandArchive { - required .TSK.CommandArchive super = 1; -} - -message ActivityNotificationItemArchive { - required int32 type = 1; - required .TSP.UUID unique_identifier = 2; - repeated .TSP.Reference activities = 3; - optional .TSP.Date first_timestamp = 4; -} - -message ActivityNotificationParticipantCacheArchive { - message UniqueIdentifierAndAttempts { - required .TSP.UUID unique_identifier = 1; - required uint32 attempts = 2; - } - - repeated .TSP.Reference notification_items = 1; - optional .TSP.Date last_edit_notification_item_sent_date = 2; - repeated .TSK.ActivityNotificationParticipantCacheArchive.UniqueIdentifierAndAttempts sender_failed_to_enqueue_attempts = 3; - required string private_id = 4; - optional .TSP.Date last_comment_notification_item_sent_date = 5; -} - -message ActivityNotificationQueueArchive { - repeated .TSP.Reference unprocessed_notification_items = 1; - repeated .TSP.Reference pending_participant_caches = 3; - repeated .TSP.Reference sent_participant_caches = 5; -} - -message ActivityStreamTransformationStateArchive { - enum ActionType { - Trasnform = 0; - Coalesce = 1; - } - required int32 next_activity_to_transform_index = 1; - optional int32 oldest_revision_sequence_after_transformed = 2; - optional .TSP.Date last_activity_coalesced_date = 3; - optional .TSK.ActivityStreamTransformationStateArchive.ActionType action_type = 4; - optional int32 transform_to_document_revision_sequence = 5; - repeated fixed64 transform_to_document_revision_identifier = 6 [packed = true]; - optional double timestamp_of_last_activity_when_last_activity_coalescing = 7; - optional bool preserving_revision_sequence_order = 8; -} - -message ActivityStreamActivityCounterArchive { - message ActionTypeCounter { - optional int32 action_type = 1; - optional uint32 count = 2; - } - - message CursorTypeCounter { - optional int32 cursor_type = 1; - optional uint32 count = 2; - } - - repeated .TSK.ActivityStreamActivityCounterArchive.ActionTypeCounter action_type_counter = 1; - repeated .TSK.ActivityStreamActivityCounterArchive.CursorTypeCounter cursor_type_counter = 2; -} - -message ActivityStreamRemovedAuthorAuditorPendingStateArchive { - message DateToAuditAndType { - required .TSP.Date date_to_audit = 1; - required int32 type = 2; - } - - repeated .TSP.UUID current_author_identifiers = 1; - repeated .TSK.ActivityStreamRemovedAuthorAuditorPendingStateArchive.DateToAuditAndType dates_to_audit = 3; -} diff --git a/protos/TSPMessages.proto b/protos/TSPMessages.proto index 13aaa1d..004a926 100644 --- a/protos/TSPMessages.proto +++ b/protos/TSPMessages.proto @@ -46,6 +46,17 @@ message Point { required float y = 2; } +message Pose3D { + required float yaw = 1; + required float pitch = 2; + required float roll = 3; +} + +message Rect { + required .TSP.Point origin = 1; + required .TSP.Size size = 2; +} + message Size { required float width = 1; required float height = 2; @@ -185,6 +196,7 @@ message PasteboardObject { repeated .TSP.Reference presets = 10; repeated .TSP.Reference top_level_objects = 11; optional .TSP.Reference native_content_description = 12; + repeated .TSP.Range text_ranges = 13; } message ObjectCollection { diff --git a/protos/TSSArchives.proto b/protos/TSSArchives.proto index 79bc525..8d3f8e0 100644 --- a/protos/TSSArchives.proto +++ b/protos/TSSArchives.proto @@ -61,6 +61,11 @@ message StylesheetArchive { optional .TSS.StylesheetArchive.VersionedStyles styles_for_12_2 = 15; optional .TSS.StylesheetArchive.VersionedStyles styles_for_13_0 = 16; optional .TSS.StylesheetArchive.VersionedStyles styles_for_13_1 = 17; + optional .TSS.StylesheetArchive.VersionedStyles styles_for_13_2 = 18; + optional .TSS.StylesheetArchive.VersionedStyles styles_for_14_0 = 19; + optional .TSS.StylesheetArchive.VersionedStyles styles_for_14_1 = 20; + optional .TSS.StylesheetArchive.VersionedStyles styles_for_14_2 = 21; + optional .TSS.StylesheetArchive.VersionedStyles styles_for_14_4 = 22; } message ThemeArchive { diff --git a/protos/TSTArchives.proto b/protos/TSTArchives.proto index 35c9279..3d2a2af 100644 --- a/protos/TSTArchives.proto +++ b/protos/TSTArchives.proto @@ -3,6 +3,7 @@ syntax = "proto2"; import "TSPMessages.proto"; import "TSDArchives.proto"; import "TSKArchives.proto"; +import "TSCKArchives.proto"; import "TSSArchives.proto"; import "TSCEArchives.proto"; import "TSWPArchives.proto"; @@ -207,6 +208,7 @@ message ImportWarningSetArchive { optional string original_data_format = 15; optional bool formula_warning_filtered_column_formula_not_copied = 16 [default = false]; optional bool duration_format_range_changed = 17 [default = false]; + repeated .TSCE.WarningArchive sorted_warnings = 18; } message CellRefImportWarningSetPairArchive { @@ -538,6 +540,7 @@ message TableModelArchive { repeated uint32 pivot_value_types_by_col = 90; repeated uint32 pivot_date_grouping_columns = 91; repeated uint32 pivot_date_grouping_types = 92; + optional .TSCE.SpillOwnerArchive spill_owner = 93; } message SummaryModelArchive { @@ -654,6 +657,7 @@ message CellMapArchive { repeated .TST.MergeOperationArchive merge_actions = 13; optional bool may_modify_formulas_in_cells = 10 [default = true]; optional bool may_modify_values_referenced_by_formulas = 11 [default = true]; + optional bool should_reset_spill_formulas = 12 [default = true]; } message CellListArchive { @@ -672,6 +676,8 @@ message ConcurrentCellMapArchive { optional bool may_modify_formulas_in_cells = 4 [default = true]; optional bool may_modify_values_referenced_by_formulas = 5 [default = true]; optional bool affects_cell_borders = 6 [default = true]; + optional bool skip_dirtying_ranges = 7 [default = false]; + optional bool should_reset_spill_formulas = 8 [default = true]; } message ConcurrentCellListArchive { @@ -993,10 +999,6 @@ message TokenAttachmentArchive { optional .TSP.Reference expressionNode = 2; } -message FormulaArchive { - optional .TSP.Reference expressionTree = 1; -} - message ExpressionNodeArchive { repeated .TSP.Reference children = 1; optional uint64 first_index = 2 [default = 0]; @@ -1076,6 +1078,7 @@ message ReferenceNodeArchive { optional .TSP.UUIDCoordArchive range_bottom_right = 7; optional .TSCE.CategoryReferenceArchive category_ref = 8; optional .TSP.UUIDRectArchive uid_range_rect = 9; + optional bool spill_range_op_suffix = 11; } message DurationNodeArchive { @@ -1097,22 +1100,15 @@ message EmptyExpressionNodeArchive { required .TST.ExpressionNodeArchive super = 1; } -message LetNodeArchive { - required .TST.ExpressionNodeArchive super = 1; - optional string whitespace_after_let = 2; - optional string whitespace_after_identifier = 3; - optional string whitespace_after_equals = 4; - optional string whitespace_after_delimiter = 5; -} - -message InNodeArchive { +message VariableNodeArchive { required .TST.ExpressionNodeArchive super = 1; + optional string identifier = 2; + required uint32 symbol = 3; } -message VariableNodeArchive { +message SpillOriginRefNodeArchive { required .TST.ExpressionNodeArchive super = 1; - required string identifier = 2; - required uint32 symbol = 3; + required .TSCE.CellCoordinateArchive spill_origin_coord = 2; } message LayoutHintArchive { @@ -1459,7 +1455,7 @@ message CollaboratorTableCursorSubselectionArchive { optional .TST.CellUIDListArchive cell_uid_list = 1; optional .TST.SelectionTypeArchive selection_type = 3; repeated .TSP.UUID row_column_uid_list = 4; - extend .TSK.CollaboratorCursorArchive { + extend .TSCK.CollaboratorCursorArchive { optional .TST.CollaboratorTableCursorSubselectionArchive table_cursor_subselection = 200; } } diff --git a/protos/TSWPArchives.proto b/protos/TSWPArchives.proto index 9e43573..c804087 100644 --- a/protos/TSWPArchives.proto +++ b/protos/TSWPArchives.proto @@ -4,10 +4,11 @@ import "TSPMessages.proto"; import "TSSArchives.proto"; import "TSDArchives.proto"; import "TSKArchives.proto"; +import "TSCKArchives.proto"; package TSWP; enum SelectionType { - SelectionType_Normal = 0; + SelectionType_Normal_DEPRECATED = 0; SelectionType_ListLabel = 1; SelectionType_ListTopic = 2; SelectionType_Replace = 3; @@ -36,7 +37,7 @@ message SelectionArchive { required .TSP.Range visual_definition_range = 2; required .TSWP.StyleInsertionBehavior styleInsertionBehavior = 3; required .TSWP.CaretAffinity caretAffinity = 4; - required .TSP.Range smart_field_range = 5; + required .TSP.Range smart_field_range = 5 [deprecated = true]; optional bool leading_edge = 6; optional uint32 leading_char_index = 7; optional .TSWP.SelectionType type = 8; @@ -257,12 +258,23 @@ message ParagraphStylePropertiesArchive { TATvalue3 = 3; TATvalue4 = 4; } - enum ParagraphBorderType { + enum DeprecatedParagraphBorderType { PBTvalue0 = 0; PBTvalue1 = 1; PBTvalue2 = 2; PBTvalue3 = 3; PBTvalue4 = 4; + PBTvalue5 = 8; + PBTvalue6 = 9; + PBTvalue7 = 10; + PBTvalue8 = 11; + PBTvalue9 = 16; + PBTvalue10 = 17; + PBTvalue11 = 18; + PBTvalue12 = 19; + PBTvalue13 = 24; + PBTvalue14 = 25; + PBTvalue15 = 26; } enum OutlineStyleType { OSTvalue0 = 0; @@ -283,9 +295,9 @@ message ParagraphStylePropertiesArchive { optional bool line_spacing_null = 12; optional .TSWP.LineSpacingArchive line_spacing = 13; optional bool page_break_before = 14; - optional .TSWP.ParagraphStylePropertiesArchive.ParagraphBorderType borders = 15; - optional bool rule_offset_null = 16; - optional .TSP.Point rule_offset = 17; + optional .TSWP.ParagraphStylePropertiesArchive.DeprecatedParagraphBorderType deprecated_borders = 15; + optional bool historical_rule_offset_null = 16; + optional .TSP.Point historical_rule_offset = 17; optional float rule_width = 18; optional float right_indent = 19; optional float space_after = 20; @@ -309,6 +321,8 @@ message ParagraphStylePropertiesArchive { optional .TSP.Reference following_style = 42; optional bool show_in_bookmarks_list = 43; optional bool show_in_toc_navigator = 44; + optional int32 border_positions = 45; + optional bool rounded_corners = 46; } message ParagraphStyleArchive { @@ -987,7 +1001,7 @@ message DropCapStyleArchive { message CollaboratorTextCursorSubselectionArchive { optional .TSWP.SelectionArchive text_selection = 1; - extend .TSK.CollaboratorCursorArchive { + extend .TSCK.CollaboratorCursorArchive { optional .TSWP.CollaboratorTextCursorSubselectionArchive text_cursor_subselection = 100; } } diff --git a/protos/TSWPArchives_sos.proto b/protos/TSWPArchives_sos.proto index 2d4f1f4..cca486f 100644 --- a/protos/TSWPArchives_sos.proto +++ b/protos/TSWPArchives_sos.proto @@ -332,28 +332,30 @@ message ParagraphSpecificStylePropertyChangeSetArchive { optional bool outline_style_type_undefined = 28; optional .TSSSOS.SpecBoolArchive page_break_before = 29; optional bool page_break_before_undefined = 30; - optional .TSSSOS.SpecIntegerArchive paragraph_borders = 31; - optional bool paragraph_borders_undefined = 32; + optional .TSSSOS.SpecIntegerArchive border_positions = 31; + optional bool border_positions_undefined = 32; optional .TSWPSOS.SpecRuleOffsetArchive paragraph_rule_offset = 33; optional bool paragraph_rule_offset_undefined = 34; - optional .TSSSOS.SpecDoubleArchive paragraph_rule_width = 35; - optional bool paragraph_rule_width_undefined = 36; - optional .TSSSOS.SpecDoubleArchive right_indent = 37; - optional bool right_indent_undefined = 38; - optional .TSSSOS.SpecDoubleArchive space_after = 39; - optional bool space_after_undefined = 40; - optional .TSSSOS.SpecDoubleArchive space_before = 41; - optional bool space_before_undefined = 42; - optional .TSDSOS.SpecStrokeArchive paragraph_stroke = 43; - optional bool paragraph_stroke_undefined = 44; - optional .TSWPSOS.SpecTabsArchive tabs = 45; - optional bool tabs_undefined = 46; - optional .TSSSOS.SpecIntegerArchive widow_control = 47; - optional bool widow_control_undefined = 48; - optional .TSSSOS.SpecBoolArchive show_in_bookmarks_list = 49; - optional bool show_in_bookmarks_list_undefined = 50; - optional .TSSSOS.SpecBoolArchive show_in_t_o_c_navigator = 51; - optional bool show_in_t_o_c_navigator_undefined = 52; + optional .TSSSOS.SpecBoolArchive rounded_corners = 35; + optional bool rounded_corners_undefined = 36; + optional .TSSSOS.SpecDoubleArchive paragraph_rule_width = 37; + optional bool paragraph_rule_width_undefined = 38; + optional .TSSSOS.SpecDoubleArchive right_indent = 39; + optional bool right_indent_undefined = 40; + optional .TSSSOS.SpecDoubleArchive space_after = 41; + optional bool space_after_undefined = 42; + optional .TSSSOS.SpecDoubleArchive space_before = 43; + optional bool space_before_undefined = 44; + optional .TSDSOS.SpecStrokeArchive paragraph_stroke = 45; + optional bool paragraph_stroke_undefined = 46; + optional .TSWPSOS.SpecTabsArchive tabs = 47; + optional bool tabs_undefined = 48; + optional .TSSSOS.SpecIntegerArchive widow_control = 49; + optional bool widow_control_undefined = 50; + optional .TSSSOS.SpecBoolArchive show_in_bookmarks_list = 51; + optional bool show_in_bookmarks_list_undefined = 52; + optional .TSSSOS.SpecBoolArchive show_in_t_o_c_navigator = 53; + optional bool show_in_t_o_c_navigator_undefined = 54; } message ParagraphStylePropertyChangeSetArchive { @@ -388,28 +390,30 @@ message ParagraphStylePropertyChangeSetArchive { optional bool outline_style_type_undefined = 29; optional .TSSSOS.SpecBoolArchive page_break_before = 30; optional bool page_break_before_undefined = 31; - optional .TSSSOS.SpecIntegerArchive paragraph_borders = 32; - optional bool paragraph_borders_undefined = 33; + optional .TSSSOS.SpecIntegerArchive border_positions = 32; + optional bool border_positions_undefined = 33; optional .TSWPSOS.SpecRuleOffsetArchive paragraph_rule_offset = 34; optional bool paragraph_rule_offset_undefined = 35; - optional .TSSSOS.SpecDoubleArchive paragraph_rule_width = 36; - optional bool paragraph_rule_width_undefined = 37; - optional .TSSSOS.SpecDoubleArchive right_indent = 38; - optional bool right_indent_undefined = 39; - optional .TSSSOS.SpecDoubleArchive space_after = 40; - optional bool space_after_undefined = 41; - optional .TSSSOS.SpecDoubleArchive space_before = 42; - optional bool space_before_undefined = 43; - optional .TSDSOS.SpecStrokeArchive paragraph_stroke = 44; - optional bool paragraph_stroke_undefined = 45; - optional .TSWPSOS.SpecTabsArchive tabs = 46; - optional bool tabs_undefined = 47; - optional .TSSSOS.SpecIntegerArchive widow_control = 48; - optional bool widow_control_undefined = 49; - optional .TSSSOS.SpecBoolArchive show_in_bookmarks_list = 50; - optional bool show_in_bookmarks_list_undefined = 51; - optional .TSSSOS.SpecBoolArchive show_in_t_o_c_navigator = 52; - optional bool show_in_t_o_c_navigator_undefined = 53; + optional .TSSSOS.SpecBoolArchive rounded_corners = 36; + optional bool rounded_corners_undefined = 37; + optional .TSSSOS.SpecDoubleArchive paragraph_rule_width = 38; + optional bool paragraph_rule_width_undefined = 39; + optional .TSSSOS.SpecDoubleArchive right_indent = 40; + optional bool right_indent_undefined = 41; + optional .TSSSOS.SpecDoubleArchive space_after = 42; + optional bool space_after_undefined = 43; + optional .TSSSOS.SpecDoubleArchive space_before = 44; + optional bool space_before_undefined = 45; + optional .TSDSOS.SpecStrokeArchive paragraph_stroke = 46; + optional bool paragraph_stroke_undefined = 47; + optional .TSWPSOS.SpecTabsArchive tabs = 48; + optional bool tabs_undefined = 49; + optional .TSSSOS.SpecIntegerArchive widow_control = 50; + optional bool widow_control_undefined = 51; + optional .TSSSOS.SpecBoolArchive show_in_bookmarks_list = 52; + optional bool show_in_bookmarks_list_undefined = 53; + optional .TSSSOS.SpecBoolArchive show_in_t_o_c_navigator = 54; + optional bool show_in_t_o_c_navigator_undefined = 55; } message ShapeStylePropertyChangeSetArchive { diff --git a/protos/TSWPCommandArchives.proto b/protos/TSWPCommandArchives.proto index dd87bd4..a0dad22 100644 --- a/protos/TSWPCommandArchives.proto +++ b/protos/TSWPCommandArchives.proto @@ -5,6 +5,7 @@ import "TSSArchives.proto"; import "TSDArchives.proto"; import "TSDCommandArchives.proto"; import "TSKArchives.proto"; +import "TSCKArchives.proto"; import "TSWPArchives.proto"; import "TSWPArchives_sos.proto"; package TSWP; @@ -38,11 +39,11 @@ message TextCommandArchive { kKindInsertBibliographyEntry = 11; kKindFormatCitationFields = 12; kKindInsertTOCSmartField = 13; - kKindInsertDateTimeField = 14; + kKindInsertDateTimeField_DEPRECATED = 14; kKindUpdateDateTimeField = 15; kKindSetParagraphFirstTopicNumber = 16; kKindCharacterStyle = 17; - kKindRevertStyles = 18; + kKindRevertStyles_DEPRECATED = 18; kKindSetParagraphBidi = 19; } optional .TSK.CommandArchive super = 1; @@ -92,7 +93,7 @@ message StorageActionCommandArchive { kKindBookmark = 32; kKindReplaceSection = 33; kKindApplyPencilAnnotation = 34; - kKindCreateRuby = 35; + kKindApplyRuby = 35; kKindModifyRuby = 36; kKindRemoveRuby = 37; kKindTateChuYoko = 38; @@ -100,6 +101,7 @@ message StorageActionCommandArchive { kKindMergeField = 40; kKindModifyMergeField = 41; kKindMergeFieldTypeReplace = 42; + kKindApplyPlaceholderText = 43; } optional .TSK.CommandArchive super = 1; optional .TSP.UUIDPath storage = 2; @@ -398,15 +400,15 @@ message TextCommentReplyCommandArchive { message ContainedObjectsCommandArchive { message AddBehaviorArgs { - repeated .TSK.AddIdOperationArgs args_list = 1; + repeated .TSCK.AddIdOperationArgs args_list = 1; } message RemoveBehaviorArgs { - repeated .TSK.RemoveIdOperationArgs args_list = 1; + repeated .TSCK.RemoveIdOperationArgs args_list = 1; } message RearrangeBehaviorArgs { - repeated .TSK.RearrangeIdOperationArgs args_list = 1; + repeated .TSCK.RearrangeIdOperationArgs args_list = 1; } required .TSK.CommandArchive super = 1; From f902e27f497f783267c17fb618eb208b758ad341 Mon Sep 17 00:00:00 2001 From: Peter Sobot Date: Sun, 13 Apr 2025 11:22:17 -0500 Subject: [PATCH 2/2] It's 2025; use Ruff. --- .github/workflows/python-package.yml | 18 +- Makefile | 3 +- dumper/protodump.py | 4 +- dumper/rewrite_imports.py | 27 ++ keynote_parser/__init__.py | 1 - keynote_parser/bundle_utils.py | 40 +- keynote_parser/codec.py | 87 ++-- keynote_parser/command_line.py | 65 +-- keynote_parser/file_utils.py | 28 +- keynote_parser/macos_app_version.py | 16 +- keynote_parser/mapping.py | 702 +++++++++++++++++++++++++-- keynote_parser/replacement.py | 69 ++- keynote_parser/unicode_utils.py | 2 +- setup.py | 67 +-- tests/test_bundle_utils.py | 8 +- tests/test_codec.py | 46 +- tests/test_file_utils.py | 98 ++-- tests/test_replacement.py | 10 +- tests/test_unicode_utils.py | 10 +- 19 files changed, 1001 insertions(+), 300 deletions(-) create mode 100644 dumper/rewrite_imports.py diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 3c68d72..ebe7bd6 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -1,7 +1,7 @@ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions -name: PyTest & Flake8 +name: PyTest & Ruff on: push: @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7, 3.8, 3.9, "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} @@ -32,19 +32,13 @@ jobs: echo "::set-env name=PATH::$PATH:$PWD/protoc/bin/" sudo apt-get install -qq libsnappy-dev python -m pip install --upgrade pip - pip install flake8 pytest + pip install ruff pytest pip install -r requirements.txt env: ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' - name: Build package run: make - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude keynote_parser/generated - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude keynote_parser/generated + - name: Lint with ruff + run: ruff check . --exclude keynote_parser/generated - name: Test with pytest - run: | - export PYTHONPATH=$PYTHONPATH:$(pwd) - pytest --cov=keynote_parser + run: PYTHONPATH=$PYTHONPATH:$(pwd) pytest --cov=keynote_parser diff --git a/Makefile b/Makefile index d2397ef..8e7d5d5 100644 --- a/Makefile +++ b/Makefile @@ -19,8 +19,7 @@ keynote_parser/generated/%_pb2.py: protos/%.proto keynote_parser/generated keynote_parser/generated/__init__.py: keynote_parser/generated $(PROTO_CLASSES) touch $@ - # Huge hack for py3 support, see https://github.com/protocolbuffers/protobuf/issues/1491 - futurize --no-diffs --nobackups --both-stages --processes 4 -w keynote_parser/generated/ + python3 dumper/rewrite_imports.py keynote_parser/generated/*.py clean: rm -rf keynote_parser/generated diff --git a/dumper/protodump.py b/dumper/protodump.py index 57e4534..51fbe62 100644 --- a/dumper/protodump.py +++ b/dumper/protodump.py @@ -249,7 +249,7 @@ def extract_proto_from_file(filename, descriptor_pool): try: name_length, new_pos = _DecodeVarint(data, marker_start) - except Exception as e: + except Exception: # Expected a VarInt here, so if not, continue offset = suffix_position + len(PROTO_MARKER) continue @@ -279,7 +279,7 @@ def extract_proto_from_file(filename, descriptor_pool): and proto_file.path != "google/protobuf/descriptor.proto" ): yield proto_file - except Exception as e: + except Exception: pass offset = marker_start + descriptor_length diff --git a/dumper/rewrite_imports.py b/dumper/rewrite_imports.py new file mode 100644 index 0000000..bde6b7c --- /dev/null +++ b/dumper/rewrite_imports.py @@ -0,0 +1,27 @@ +import argparse +import re + +REGEX = re.compile(r"^import (.*_pb2) as (.*__pb2)") + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument("files", nargs="+") + args = parser.parse_args() + + for file in args.files: + with open(file, "r") as f: + content = f.read() + + new_content = [] + for line in content.splitlines(): + new_line = REGEX.sub(r"import keynote_parser.generated.\1 as \2", line) + if new_line != line: + print(f"Rewrote {file}: {line} -> {new_line}") + new_content.append(new_line) + with open(file, "w") as f: + f.write("\n".join(new_content)) + + +if __name__ == "__main__": + main() diff --git a/keynote_parser/__init__.py b/keynote_parser/__init__.py index 4091c1a..47814dc 100644 --- a/keynote_parser/__init__.py +++ b/keynote_parser/__init__.py @@ -22,4 +22,3 @@ __description__ = "A tool for manipulating Apple Keynote presentation files." __url__ = "https://github.com/psobot/keynote-parser" __new_issue_url__ = "https://github.com/psobot/keynote-parser/issues/new" -__command_line_invocation__ = False diff --git a/keynote_parser/bundle_utils.py b/keynote_parser/bundle_utils.py index a04134f..219d818 100644 --- a/keynote_parser/bundle_utils.py +++ b/keynote_parser/bundle_utils.py @@ -1,20 +1,22 @@ +import inspect import os -import sys -import warnings import plistlib +import sys import urllib.parse -from colorama import init as colorama_init +import warnings + from colorama import Fore +from colorama import init as colorama_init + from keynote_parser import ( - __version__, - __supported_keynote_version__, __new_issue_url__, - __command_line_invocation__, + __supported_keynote_version__, + __version__, ) from keynote_parser.macos_app_version import MacOSAppVersion -DEFAULT_KEYNOTE_INSTALL_PATH = '/Applications/Keynote.app' -VERSION_PLIST_PATH = 'Contents/version.plist' +DEFAULT_KEYNOTE_INSTALL_PATH = "/Applications/Keynote.app" +VERSION_PLIST_PATH = "Contents/version.plist" colorama_init() @@ -22,21 +24,23 @@ def get_installed_keynote_version(): try: - fp = open(os.path.join(DEFAULT_KEYNOTE_INSTALL_PATH, VERSION_PLIST_PATH), 'rb') + fp = open(os.path.join(DEFAULT_KEYNOTE_INSTALL_PATH, VERSION_PLIST_PATH), "rb") except IOError: return None version_dict = plistlib.load(fp) return MacOSAppVersion( - version_dict['CFBundleShortVersionString'], - version_dict['CFBundleVersion'], - version_dict['ProductBuildVersion'], + version_dict["CFBundleShortVersionString"], + version_dict["CFBundleVersion"], + version_dict["ProductBuildVersion"], ) class KeynoteVersionWarning(UserWarning): def __init__(self, installed_keynote_version): issue_title = "Please add support for Keynote %s" % installed_keynote_version - new_issue_url = __new_issue_url__ + "?" + urllib.parse.urlencode({"title": issue_title}) + new_issue_url = ( + __new_issue_url__ + "?" + urllib.parse.urlencode({"title": issue_title}) + ) super(UserWarning, self).__init__( ( "KeynoteVersionWarning: " @@ -97,7 +101,9 @@ def warn_once_on_newer_keynote(installed_keynote_version=None): if DID_WARN: return False - installed_keynote_version = installed_keynote_version or get_installed_keynote_version() + installed_keynote_version = ( + installed_keynote_version or get_installed_keynote_version() + ) if not installed_keynote_version: return False @@ -113,5 +119,9 @@ def warn_once_on_newer_keynote(installed_keynote_version=None): return DID_WARN -if not __command_line_invocation__ and "pytest" not in sys.modules: +IS_INVOKED_ON_COMMAND_LINE = any( + frame.function == "__main__" for frame in inspect.stack() +) + +if not IS_INVOKED_ON_COMMAND_LINE and "pytest" not in sys.modules: warn_once_on_newer_keynote() diff --git a/keynote_parser/codec.py b/keynote_parser/codec.py index d8dab6b..545f6a1 100644 --- a/keynote_parser/codec.py +++ b/keynote_parser/codec.py @@ -1,26 +1,17 @@ -from __future__ import print_function -from __future__ import absolute_import -from builtins import zip -from builtins import str -from builtins import object -from future.utils import raise_from - -import sys -import yaml import struct -import snappy +import sys import traceback from functools import partial -from .mapping import NAME_CLASS_MAP, ID_NAME_MAP - -from google.protobuf.internal.encoder import _VarintBytes +import snappy +import yaml from google.protobuf.internal.decoder import _DecodeVarint32 +from google.protobuf.internal.encoder import _VarintBytes from google.protobuf.json_format import MessageToDict, ParseDict from google.protobuf.message import EncodeError from .generated.TSPArchiveMessages_pb2 import ArchiveInfo - +from .mapping import ID_NAME_MAP, NAME_CLASS_MAP MAX_FLOAT = 340282346638528859811704183484516925440.000000000000000000 @@ -46,25 +37,25 @@ def from_buffer(cls, data, filename=None): return cls(chunks, filename) except Exception as e: if filename: - raise_from(ValueError("Failed to deserialize " + filename), e) + raise ValueError("Failed to deserialize " + filename) from e else: raise @classmethod def from_dict(cls, _dict): - return cls([IWACompressedChunk.from_dict(chunk) for chunk in _dict['chunks']]) + return cls([IWACompressedChunk.from_dict(chunk) for chunk in _dict["chunks"]]) def to_dict(self): try: return {"chunks": [chunk.to_dict() for chunk in self.chunks]} except Exception as e: if self.filename: - raise_from(ValueError("Failed to serialize " + self.filename), e) + raise ValueError("Failed to serialize " + self.filename) from e else: raise def to_buffer(self): - return b''.join([chunk.to_buffer() for chunk in self.chunks]) + return b"".join([chunk.to_buffer() for chunk in self.chunks]) class IWACompressedChunk(object): @@ -84,9 +75,11 @@ def _decompress_all(cls, data): first_byte = ord(first_byte) if first_byte != 0x00: - raise ValueError("IWA chunk does not start with 0x00! (found %x)" % first_byte) + raise ValueError( + "IWA chunk does not start with 0x00! (found %x)" % first_byte + ) - unpacked = struct.unpack_from(' 0xFFFF: surrogate_pair_correction += 1 - entries = _dict['tableParaStyle']['entries'] + entries = _dict["tableParaStyle"]["entries"] if len(entries) != len(new_offsets): raise NotImplementedError( - "New line count doesn't match old line count in data: %s", - text) + "New line count doesn't match old line count in data: %s", text + ) for para_entry, offset in zip(entries, new_offsets): - para_entry['characterIndex'] = offset + para_entry["characterIndex"] = offset return _dict def correct_charstyle_replacement(self, data, key_path, depth, on_replace): @@ -85,18 +90,17 @@ def correct_charstyle_replacement(self, data, key_path, depth, on_replace): replaced spans multiple style blocks. """ new_start = 0 - text = data['text'][0] - if 'tableCharStyle' not in data \ - or len(data['tableCharStyle']['entries']) == 1: + text = data["text"][0] + if "tableCharStyle" not in data or len(data["tableCharStyle"]["entries"]) == 1: old_value = data[key_path[0]] new_value = self.perform_on(old_value, depth + 1, on_replace) return merge_two_dicts(data, {key_path[0]: new_value}) - char_style_entries = data['tableCharStyle']['entries'] + char_style_entries = data["tableCharStyle"]["entries"] parts = [] new_indices = [] for start, end in zip(char_style_entries, char_style_entries[1:]): - start_index = start['characterIndex'] - end_index = end['characterIndex'] + start_index = start["characterIndex"] + end_index = end["characterIndex"] chunk = text[start_index:end_index] chunk = re.sub(self.find, self.replace, chunk) parts.append(chunk) @@ -104,10 +108,10 @@ def correct_charstyle_replacement(self, data, key_path, depth, on_replace): new_indices.append(new_start) new_start = new_end new_indices.append(new_indices[-1] + len(parts[-1])) - parts.append(text[char_style_entries[-1]['characterIndex']:]) - data['text'][0] = ''.join(parts) + parts.append(text[char_style_entries[-1]["characterIndex"] :]) + data["text"][0] = "".join(parts) for new_start, entry in zip(new_indices, char_style_entries): - entry['characterIndex'] = new_start + entry["characterIndex"] = new_start return data def perform_on(self, data, depth=0, on_replace=None): @@ -118,14 +122,12 @@ def perform_on(self, data, depth=0, on_replace=None): on_replace(self, data, new_value) return new_value if key_path[0] == "[]": - return [ - self.perform_on(obj, depth + 1, on_replace) - for obj in data - ] + return [self.perform_on(obj, depth + 1, on_replace) for obj in data] if key_path[0] in data: - if key_path[0] == 'text': + if key_path[0] == "text": output = self.correct_charstyle_replacement( - data, key_path, depth, on_replace) + data, key_path, depth, on_replace + ) output = self.correct_multiline_replacement(output) else: old_value = data[key_path[0]] @@ -140,9 +142,6 @@ def should_replace(self, data, depth=0): if not key_path: return re.search(self.find, data) is not None elif key_path[0] == "[]": - return any([ - self.should_replace(obj, depth + 1) for obj in data - ]) + return any([self.should_replace(obj, depth + 1) for obj in data]) elif hasattr(data, key_path[0]): - return self.should_replace( - getattr(data, key_path[0]), depth + 1) + return self.should_replace(getattr(data, key_path[0]), depth + 1) diff --git a/keynote_parser/unicode_utils.py b/keynote_parser/unicode_utils.py index b122d4d..ccec7f9 100644 --- a/keynote_parser/unicode_utils.py +++ b/keynote_parser/unicode_utils.py @@ -22,7 +22,7 @@ import re PY2_SURROGATE_PAIR_RE = re.compile( - r'\\u([Dd][89a-bA-B][0-9a-fA-F]{2})\\u([Dd][c-fC-F][0-9a-fA-F]{2})' + r"\\u([Dd][89a-bA-B][0-9a-fA-F]{2})\\u([Dd][c-fC-F][0-9a-fA-F]{2})" ) diff --git a/setup.py b/setup.py index 897bf45..c7a0b68 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,8 @@ #!/usr/bin/env python # Always prefer setuptools over distutils -from setuptools import setup, find_packages -import os - -import keynote_parser import codecs +import os # io.open is needed for projects that support Python 2.7 # It ensures open() defaults to text mode with universal newlines, @@ -13,10 +10,14 @@ # Python 3 only projects can skip this import from io import open +from setuptools import find_packages, setup + +import keynote_parser + HERE = os.path.abspath(os.path.dirname(__file__)) # Get the long description from the README file -with open(os.path.join(HERE, 'README.md'), encoding='utf-8') as f: +with open(os.path.join(HERE, "README.md"), encoding="utf-8") as f: long_description = f.read() @@ -93,18 +94,18 @@ def find_meta(meta): # # This field corresponds to the "Description-Content-Type" metadata field: # https://packaging.python.org/specifications/core-metadata/#description-content-type-optional - long_description_content_type='text/markdown', + long_description_content_type="text/markdown", # This should be a valid link to your project's main homepage. # # This field corresponds to the "Home-Page" metadata field: # https://packaging.python.org/specifications/core-metadata/#home-page-optional - url=find_meta('url'), + url=find_meta("url"), # This should be your name or the name of the organization which owns the # project. - author=find_meta('author'), + author=find_meta("author"), # This should be a valid email address corresponding to the author listed # above. - author_email=find_meta('email'), + author_email=find_meta("email"), # Classifiers help users find your project by categorizing it. # # For a list of valid classifiers, see https://pypi.org/classifiers/ @@ -113,26 +114,26 @@ def find_meta(meta): # 3 - Alpha # 4 - Beta # 5 - Production/Stable - 'Development Status :: 4 - Beta', + "Development Status :: 4 - Beta", # Indicate who your project is intended for - 'Intended Audience :: Developers', - 'Topic :: Software Development :: Build Tools', + "Intended Audience :: Developers", + "Topic :: Software Development :: Build Tools", # Pick your license as you wish - 'License :: OSI Approved :: MIT License', + "License :: OSI Approved :: MIT License", # Specify the Python versions you support here. In particular, ensure # that you indicate whether you support Python 2, Python 3 or both. - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ], # This field adds keywords for your project which will appear on the # project page. What does your project relate to? # # Note that this is a string of words separated by whitespace, not a list. - keywords='keynote macOS apple presentation powerpoint', + keywords="keynote macOS apple presentation powerpoint", # You can just specify package directories manually here if your project is # simple. Or you can use find_packages(). # @@ -142,7 +143,7 @@ def find_meta(meta): # # py_modules=["my_module"], # - packages=find_packages(exclude=['contrib', 'docs', 'tests', 'protos']), + packages=find_packages(exclude=["contrib", "docs", "tests", "protos"]), # This field lists other packages that your project depends on to run. # Any package you put here will be installed by pip when your project is # installed, so they must be valid existing projects. @@ -150,13 +151,13 @@ def find_meta(meta): # For an analysis of "install_requires" vs pip's requirements files see: # https://packaging.python.org/en/latest/requirements.html install_requires=[ - 'protobuf>=3.13.0', - 'tqdm>=4.14.0', - 'python-snappy>=0.5.3', - 'PyYAML>=5.3.1', - 'Pillow>=7.1.0', - 'future>=0.17.1', - 'colorama>=0.4.3', + "protobuf>=3.13.0", + "tqdm>=4.14.0", + "python-snappy>=0.5.3", + "PyYAML>=5.3.1", + "Pillow>=7.1.0", + "future>=0.17.1", + "colorama>=0.4.3", ], # List additional groups of dependencies here (e.g. development # dependencies). Users will be able to install these using the "extras" @@ -166,7 +167,7 @@ def find_meta(meta): # # Similar to `install_requires` above, these must be valid existing # projects. - extras_require={'dev': ['check-manifest'], 'test': ['coverage']}, + extras_require={"dev": ["check-manifest"], "test": ["coverage"]}, # If there are data files included in your packages that need to be # installed, specify them here. # @@ -186,7 +187,9 @@ def find_meta(meta): # # For example, the following would provide a command called `sample` which # executes the function `main` from this package when invoked: - entry_points={'console_scripts': ['keynote-parser=keynote_parser.command_line:main']}, + entry_points={ + "console_scripts": ["keynote-parser=keynote_parser.command_line:main"] + }, # List additional URLs that are relevant to your project as a dict. # # This field corresponds to the "Project-URL" metadata fields: @@ -197,7 +200,7 @@ def find_meta(meta): # maintainers, and where to support the project financially. The key is # what's used to render the link text on PyPI. project_urls={ - 'Bug Reports': 'https://github.com/psobot/keynote-parser/issues', - 'Source': 'https://github.com/psobot/keynote-parser/', + "Bug Reports": "https://github.com/psobot/keynote-parser/issues", + "Source": "https://github.com/psobot/keynote-parser/", }, ) diff --git a/tests/test_bundle_utils.py b/tests/test_bundle_utils.py index d62ca49..5ed5151 100644 --- a/tests/test_bundle_utils.py +++ b/tests/test_bundle_utils.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +import warnings + import pytest from keynote_parser import bundle_utils @@ -10,6 +12,8 @@ def test_warn_on_old_version(capsys): with pytest.warns(bundle_utils.KeynoteVersionWarning): bundle_utils.warn_once_on_newer_keynote(installed_keynote_version=dummy_version) - # Second call/import should not warn - with pytest.warns(None): + # Second call/import should not warn: + with warnings.catch_warnings(): + warnings.simplefilter("error") + bundle_utils.warn_once_on_newer_keynote(installed_keynote_version=dummy_version) diff --git a/tests/test_codec.py b/tests/test_codec.py index 56ec136..ff2c00e 100644 --- a/tests/test_codec.py +++ b/tests/test_codec.py @@ -7,24 +7,26 @@ import pytest from keynote_parser import codec from keynote_parser.unicode_utils import fix_unicode -from keynote_parser.generated.TSCHArchives_GEN_pb2 import ChartSeriesStyleArchive as Archive +from keynote_parser.generated.TSCHArchives_GEN_pb2 import ( + ChartSeriesStyleArchive as Archive, +) from google.protobuf.json_format import MessageToDict, ParseDict -SIMPLE_FILENAME = './tests/data/simple-oneslide.iwa' -MULTILINE_FILENAME = './tests/data/multiline-oneslide.iwa' -MULTICHUNK_FILENAME = './tests/data/multi-chunk.iwa' -EMOJI_FILENAME = './tests/data/emoji-oneslide.iwa' -MESSAGE_TYPE_ZERO_FILENAME = './tests/data/message-type-zero.iwa' -EMOJI_FILENAME_PY2_YAML = './tests/data/emoji-oneslide.py2.yaml' -EMOJI_FILENAME_PY3_YAML = './tests/data/emoji-oneslide.py3.yaml' -VERY_BIG_SLIDE = './tests/data/very-big-slide.iwa' +SIMPLE_FILENAME = "./tests/data/simple-oneslide.iwa" +MULTILINE_FILENAME = "./tests/data/multiline-oneslide.iwa" +MULTICHUNK_FILENAME = "./tests/data/multi-chunk.iwa" +EMOJI_FILENAME = "./tests/data/emoji-oneslide.iwa" +MESSAGE_TYPE_ZERO_FILENAME = "./tests/data/message-type-zero.iwa" +EMOJI_FILENAME_PY2_YAML = "./tests/data/emoji-oneslide.py2.yaml" +EMOJI_FILENAME_PY3_YAML = "./tests/data/emoji-oneslide.py3.yaml" +VERY_BIG_SLIDE = "./tests/data/very-big-slide.iwa" MAX_FLOAT = 340282346638528859811704183484516925440.0000000000000000000000 TOO_BIG_FLOAT = 3.4028235e38 def roundtrip(filename): - with open(filename, 'rb') as f: + with open(filename, "rb") as f: test_data = f.read() file = codec.IWAFile.from_buffer(test_data, filename) roundtrip_iwa_file(file, test_data) @@ -34,7 +36,9 @@ def roundtrip_iwa_file(file, binary): assert file is not None for chunk in file.chunks: for archive in chunk.archives: - assert codec.IWAArchiveSegment.from_buffer(archive.to_buffer())[0] == archive + assert ( + codec.IWAArchiveSegment.from_buffer(archive.to_buffer())[0] == archive + ) assert codec.IWACompressedChunk.from_buffer(chunk.to_buffer())[0] == chunk assert codec.IWAFile.from_buffer(file.to_buffer()).to_dict() == file.to_dict() @@ -56,23 +60,29 @@ def test_iwa_message_type_zero_roundtrip(): def test_yaml_parse_py2_emoji(): - with open(EMOJI_FILENAME_PY2_YAML, 'rb') as handle: - file = codec.IWAFile.from_dict(yaml.safe_load(fix_unicode(handle.read().decode('utf-8')))) + with open(EMOJI_FILENAME_PY2_YAML, "rb") as handle: + file = codec.IWAFile.from_dict( + yaml.safe_load(fix_unicode(handle.read().decode("utf-8"))) + ) assert file is not None def test_yaml_parse_py3_emoji(): - with open(EMOJI_FILENAME_PY3_YAML, 'rb') as handle: - file = codec.IWAFile.from_dict(yaml.safe_load(fix_unicode(handle.read().decode('utf-8')))) + with open(EMOJI_FILENAME_PY3_YAML, "rb") as handle: + file = codec.IWAFile.from_dict( + yaml.safe_load(fix_unicode(handle.read().decode("utf-8"))) + ) assert file is not None def test_iwa_multichunk_roundtrip(): - with open(MULTICHUNK_FILENAME, 'rb') as f: + with open(MULTICHUNK_FILENAME, "rb") as f: test_data = f.read() file = codec.IWAFile.from_buffer(test_data, MULTICHUNK_FILENAME) assert file is not None - rt_as_dict = codec.IWAFile.from_buffer(file.to_buffer(), MULTICHUNK_FILENAME).to_dict() + rt_as_dict = codec.IWAFile.from_buffer( + file.to_buffer(), MULTICHUNK_FILENAME + ).to_dict() assert rt_as_dict == file.to_dict() @@ -80,7 +90,7 @@ def test_roundtrip_very_big(): roundtrip(VERY_BIG_SLIDE) -@pytest.mark.parametrize('big_float', (MAX_FLOAT, TOO_BIG_FLOAT)) +@pytest.mark.parametrize("big_float", (MAX_FLOAT, TOO_BIG_FLOAT)) def test_too_big_float_deserialization(big_float): test_archive = Archive(tschchartseriesareasymbolsize=big_float) test_archive_as_dict = MessageToDict(test_archive) diff --git a/tests/test_file_utils.py b/tests/test_file_utils.py index 53b5f48..f628589 100644 --- a/tests/test_file_utils.py +++ b/tests/test_file_utils.py @@ -6,53 +6,53 @@ TABLE_FILENAME = "./tests/data/table.key" UNICODE_ASSET_FILENAME = "./tests/data/unicode-asset-filename.key" -SIMPLE_SLIDE_KEY = 'Index/Slide-8060.iwa' +SIMPLE_SLIDE_KEY = "Index/Slide-8060.iwa" SIMPLE_CONTENTS = [ - 'Data/110809_familychineseoahu_en_00317_2040x1360-small-13.jpeg', - 'Data/110809_familychineseoahu_en_02016_981x654-small-11.jpeg', - 'Data/110809_familychineseoahu_en_02390_2880x1921-small-9.jpeg', - 'Data/mt-07EEAA23-F087-48C1-B6D0-04F3123EF6C7-222.jpg', - 'Data/mt-28415F3F-1E88-49CA-9288-73C5EC0E73AB-225.jpg', - 'Data/mt-28D0C904-1282-4458-A229-93C6451C7CE8-223.jpg', - 'Data/mt-2B1EC37A-AC99-407C-80A1-BFA6DAD07337-226.jpg', - 'Data/mt-6574C108-BEFF-4758-89D5-39BDC991689B-217.jpg', - 'Data/mt-948A42DF-8C2D-41B9-8BF0-4A87F169BBA1-221.jpg', - 'Data/mt-A672DE80-9545-4D04-8F0A-810E1439CC90-218.jpg', - 'Data/mt-CC8F34D9-65B4-4E66-85DF-0F5DC90B1F33-220.jpg', - 'Data/mt-E2298BC6-2981-4132-B2DD-DF3EFA1F2546-227.jpg', - 'Data/mt-E8BB6D9E-506A-42C8-A335-455FEDC2E11C-219.jpg', - 'Data/mt-F39BAD95-4ABB-4F39-A54F-1C6A46BCA6C5-224.jpg', - 'Data/st-7D643FA7-9A1F-45A5-A30F-7828735F3C35-205.jpg', - 'Data/st-7D643FA7-9A1F-45A5-A30F-7828735F3C35-237.jpg', - 'Index/AnnotationAuthorStorage.iwa', - 'Index/CalculationEngine.iwa', - 'Index/Document.iwa', - 'Index/DocumentMetadata.iwa', - 'Index/DocumentStylesheet.iwa', - 'Index/MasterSlide-7880.iwa', - 'Index/MasterSlide-7900.iwa', - 'Index/MasterSlide-7915.iwa', - 'Index/MasterSlide-7928.iwa', - 'Index/MasterSlide-7942.iwa', - 'Index/MasterSlide-7956.iwa', - 'Index/MasterSlide-7968.iwa', - 'Index/MasterSlide-7985.iwa', - 'Index/MasterSlide-7997.iwa', - 'Index/MasterSlide-8015.iwa', - 'Index/MasterSlide-8034.iwa', - 'Index/MasterSlide-8048.iwa', - 'Index/Metadata.iwa', - 'Index/Slide-8060.iwa', - 'Index/ViewState.iwa', - 'Metadata/BuildVersionHistory.plist', - 'Metadata/DocumentIdentifier', - 'Metadata/Properties.plist', - 'preview-micro.jpg', - 'preview-web.jpg', - 'preview.jpg', + "Data/110809_familychineseoahu_en_00317_2040x1360-small-13.jpeg", + "Data/110809_familychineseoahu_en_02016_981x654-small-11.jpeg", + "Data/110809_familychineseoahu_en_02390_2880x1921-small-9.jpeg", + "Data/mt-07EEAA23-F087-48C1-B6D0-04F3123EF6C7-222.jpg", + "Data/mt-28415F3F-1E88-49CA-9288-73C5EC0E73AB-225.jpg", + "Data/mt-28D0C904-1282-4458-A229-93C6451C7CE8-223.jpg", + "Data/mt-2B1EC37A-AC99-407C-80A1-BFA6DAD07337-226.jpg", + "Data/mt-6574C108-BEFF-4758-89D5-39BDC991689B-217.jpg", + "Data/mt-948A42DF-8C2D-41B9-8BF0-4A87F169BBA1-221.jpg", + "Data/mt-A672DE80-9545-4D04-8F0A-810E1439CC90-218.jpg", + "Data/mt-CC8F34D9-65B4-4E66-85DF-0F5DC90B1F33-220.jpg", + "Data/mt-E2298BC6-2981-4132-B2DD-DF3EFA1F2546-227.jpg", + "Data/mt-E8BB6D9E-506A-42C8-A335-455FEDC2E11C-219.jpg", + "Data/mt-F39BAD95-4ABB-4F39-A54F-1C6A46BCA6C5-224.jpg", + "Data/st-7D643FA7-9A1F-45A5-A30F-7828735F3C35-205.jpg", + "Data/st-7D643FA7-9A1F-45A5-A30F-7828735F3C35-237.jpg", + "Index/AnnotationAuthorStorage.iwa", + "Index/CalculationEngine.iwa", + "Index/Document.iwa", + "Index/DocumentMetadata.iwa", + "Index/DocumentStylesheet.iwa", + "Index/MasterSlide-7880.iwa", + "Index/MasterSlide-7900.iwa", + "Index/MasterSlide-7915.iwa", + "Index/MasterSlide-7928.iwa", + "Index/MasterSlide-7942.iwa", + "Index/MasterSlide-7956.iwa", + "Index/MasterSlide-7968.iwa", + "Index/MasterSlide-7985.iwa", + "Index/MasterSlide-7997.iwa", + "Index/MasterSlide-8015.iwa", + "Index/MasterSlide-8034.iwa", + "Index/MasterSlide-8048.iwa", + "Index/Metadata.iwa", + "Index/Slide-8060.iwa", + "Index/ViewState.iwa", + "Metadata/BuildVersionHistory.plist", + "Metadata/DocumentIdentifier", + "Metadata/Properties.plist", + "preview-micro.jpg", + "preview-web.jpg", + "preview.jpg", ] -UNICODE_ASSET_FILENAME_ASSET_NAME = u"Data/unicode-filename-würfel-8913.png" +UNICODE_ASSET_FILENAME_ASSET_NAME = "Data/unicode-filename-würfel-8913.png" def test_read_simple(): @@ -63,11 +63,13 @@ def test_read_simple(): def test_table_matches(): key_reader = file_utils.zip_file_reader(TABLE_FILENAME, progress=False) - dir_reader = file_utils.directory_reader(TABLE_FILENAME.replace('.key', ''), progress=False) + dir_reader = file_utils.directory_reader( + TABLE_FILENAME.replace(".key", ""), progress=False + ) # Ensure we don't miss nested sub-directories when reading key_filenames = set([filename for filename, _ in key_reader]) - dir_filenames = set([filename.replace('.yaml', '') for filename, _ in dir_reader]) + dir_filenames = set([filename.replace(".yaml", "") for filename, _ in dir_reader]) assert key_filenames == dir_filenames @@ -106,7 +108,7 @@ def sink(filename, contents): results[filename] = contents for filename, handle in reader: - if filename == u"Data/unicode-filename-würfel-8913.png": + if filename == "Data/unicode-filename-würfel-8913.png": file_utils.process_file(filename, handle, sink) - assert len(results) == 1 \ No newline at end of file + assert len(results) == 1 diff --git a/tests/test_replacement.py b/tests/test_replacement.py index 75013b0..6fd599f 100644 --- a/tests/test_replacement.py +++ b/tests/test_replacement.py @@ -2,20 +2,20 @@ from keynote_parser.replacement import Replacement -MULTILINE_SURROGATE_FILENAME = './tests/data/multiline-surrogate.iwa' +MULTILINE_SURROGATE_FILENAME = "./tests/data/multiline-surrogate.iwa" def test_iwa_multiline_surrogate_replacement(): - with open(MULTILINE_SURROGATE_FILENAME, 'rb') as f: + with open(MULTILINE_SURROGATE_FILENAME, "rb") as f: test_data = f.read() file = codec.IWAFile.from_buffer(test_data, MULTILINE_SURROGATE_FILENAME) data = file.to_dict() replacement = Replacement("\\$REPLACE_ME", "replaced!") replaced = replacement.perform_on(data) - text_object = replaced['chunks'][0]['archives'][2]['objects'][0] + text_object = replaced["chunks"][0]["archives"][2]["objects"][0] replaced_character_indices = [ - entry['characterIndex'] - for entry in text_object['tableParaStyle']['entries']] + entry["characterIndex"] for entry in text_object["tableParaStyle"]["entries"] + ] assert replaced_character_indices == [0, 67, 72] diff --git a/tests/test_unicode_utils.py b/tests/test_unicode_utils.py index d278d8d..5a732f3 100644 --- a/tests/test_unicode_utils.py +++ b/tests/test_unicode_utils.py @@ -2,19 +2,19 @@ def test_non_surrogate_pair(): - assert fix_unicode('\u2716\uFE0F') == '\u2716\uFE0F' - assert to_py3_compatible('\u2716\uFE0F') == '\u2716\uFE0F' + assert fix_unicode("\u2716\ufe0f") == "\u2716\ufe0f" + assert to_py3_compatible("\u2716\ufe0f") == "\u2716\ufe0f" def test_surrogate_pair(): - assert to_py3_compatible(r'\ud83c\udde8\ud83c\udde6') == r'\U0001f1e8\U0001f1e6' + assert to_py3_compatible(r"\ud83c\udde8\ud83c\udde6") == r"\U0001f1e8\U0001f1e6" def test_basic_multilingual_plane(): - srpska = r'\u0441\u0440\u043f\u0441\u043a\u0430' + srpska = r"\u0441\u0440\u043f\u0441\u043a\u0430" assert to_py3_compatible(srpska) == srpska def test_german_example(): - deutsch_nicht_ersatzpaar = br'\uFFFC\u201C."'.decode('utf-8') + deutsch_nicht_ersatzpaar = rb'\uFFFC\u201C."'.decode("utf-8") assert fix_unicode(deutsch_nicht_ersatzpaar) == deutsch_nicht_ersatzpaar