python-pages 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pages/text.py ADDED
@@ -0,0 +1,294 @@
1
+ """Schema-aware helpers for TSWP storage and character styles."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from dataclasses import dataclass
6
+
7
+ from .iwa import ArchiveSegment, MessageInfo
8
+ from .protobuf import Message, encode_varint, read_varint
9
+
10
+ TYPE_STORAGE = 2001
11
+ TYPE_CHARACTER_STYLE = 2021
12
+ TYPE_PARAGRAPH_STYLE = 2022
13
+
14
+ STORAGE_TEXT = 3
15
+ STORAGE_TABLE_PARA_STYLE = 5
16
+ STORAGE_TABLE_CHAR_STYLE = 8
17
+ STYLE_SUPER = 1
18
+ STYLE_CHAR_PROPERTIES = 11
19
+ CHAR_BOLD = 1
20
+ CHAR_FONT_NAME = 5
21
+ DEFAULT_BOLD_FONT_NAME = "PUDReiminPr6N-Bold"
22
+
23
+ INDEXED_STORAGE_TABLES = (
24
+ 5, 6, 7, 8, 9, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 27, 28
25
+ )
26
+ OVERLAPPING_STORAGE_TABLES = (25, 26)
27
+
28
+
29
+ @dataclass(frozen=True)
30
+ class AttributeRun:
31
+ character_index: int
32
+ object_id: int | None
33
+
34
+
35
+ @dataclass
36
+ class LocatedObject:
37
+ filename: str
38
+ segment: ArchiveSegment
39
+ info: MessageInfo
40
+ message: Message
41
+
42
+
43
+ def parse_reference(data: bytes) -> int | None:
44
+ message = Message.parse(data)
45
+ field = message.one(1)
46
+ return int(field.value) if field is not None else None
47
+
48
+
49
+ def make_reference(identifier: int) -> bytes:
50
+ message = Message()
51
+ message.add_varint(1, identifier)
52
+ return message.encode()
53
+
54
+
55
+ def parse_attribute_table(data: bytes) -> list[AttributeRun]:
56
+ table = Message.parse(data)
57
+ result: list[AttributeRun] = []
58
+ for raw_entry in table.get(1):
59
+ entry = Message.parse(bytes(raw_entry.value))
60
+ index = entry.one(1)
61
+ if index is None:
62
+ raise ValueError("ObjectAttributeTable entry lacks character_index")
63
+ obj = entry.one(2)
64
+ result.append(AttributeRun(int(index.value), parse_reference(bytes(obj.value)) if obj else None))
65
+ return sorted(result, key=lambda item: item.character_index)
66
+
67
+
68
+ def encode_attribute_table(runs: list[AttributeRun]) -> bytes:
69
+ table = Message()
70
+ for run in sorted(runs, key=lambda item: item.character_index):
71
+ entry = Message()
72
+ entry.add_varint(1, run.character_index)
73
+ if run.object_id is not None:
74
+ entry.add_bytes(2, make_reference(run.object_id))
75
+ table.add_bytes(1, entry.encode())
76
+ return table.encode()
77
+
78
+
79
+ def style_at(runs: list[AttributeRun], index: int) -> int | None:
80
+ current = None
81
+ for run in runs:
82
+ if run.character_index > index:
83
+ break
84
+ current = run.object_id
85
+ return current
86
+
87
+
88
+ def replace_style_range(
89
+ runs: list[AttributeRun],
90
+ start: int,
91
+ end: int,
92
+ style_id: int | None,
93
+ *,
94
+ compact: bool = True,
95
+ ) -> list[AttributeRun]:
96
+ if start < 0 or end <= start:
97
+ raise ValueError("range must be non-empty and non-negative")
98
+ restore = style_at(runs, end)
99
+ result = [run for run in runs if not (start <= run.character_index < end)]
100
+ result = [run for run in result if run.character_index not in (start, end)]
101
+ result.extend([AttributeRun(start, style_id), AttributeRun(end, restore)])
102
+ result.sort(key=lambda item: item.character_index)
103
+ if not compact:
104
+ # Paragraph tables use explicit entries as paragraph boundaries, including
105
+ # adjacent entries with the same effective style. They must survive a
106
+ # style edit even though they are redundant for style lookup alone.
107
+ return result
108
+ # Adjacent entries with the same effective style are redundant.
109
+ compact: list[AttributeRun] = []
110
+ for run in result:
111
+ if compact and compact[-1].object_id == run.object_id:
112
+ continue
113
+ compact.append(run)
114
+ return compact
115
+
116
+
117
+ def utf16_length(text: str) -> int:
118
+ return len(text.encode("utf-16-le")) // 2
119
+
120
+
121
+ def rewrite_indexed_table(
122
+ data: bytes, start: int, end: int, replacement_length: int
123
+ ) -> bytes:
124
+ """Rewrite a character-indexed attribute table after one text replacement."""
125
+ delta = replacement_length - (end - start)
126
+ table = Message.parse(data)
127
+ rewritten = []
128
+ for raw in table.fields:
129
+ if raw.number != 1 or raw.wire_type != 2:
130
+ rewritten.append(raw)
131
+ continue
132
+ entry = Message.parse(bytes(raw.value))
133
+ index = entry.one(1)
134
+ if index is None or index.wire_type != 0:
135
+ raise ValueError("attribute-table entry lacks a varint character_index")
136
+ value = int(index.value)
137
+ if start < value < end:
138
+ continue
139
+ if value >= end:
140
+ index.set_varint(value + delta)
141
+ raw.set_bytes(entry.encode())
142
+ rewritten.append(raw)
143
+ # A deletion can move the restore boundary at ``end`` onto an existing
144
+ # boundary at ``start``. Pages rejects a paragraph-style table containing
145
+ # duplicate offsets, so retain the later entry (the style after the
146
+ # deleted range) for every indexed attribute table.
147
+ seen_indices: set[int] = set()
148
+ deduplicated_reversed = []
149
+ for raw in reversed(rewritten):
150
+ if raw.number != 1 or raw.wire_type != 2:
151
+ deduplicated_reversed.append(raw)
152
+ continue
153
+ entry = Message.parse(bytes(raw.value))
154
+ index = entry.one(1)
155
+ if index is None or index.wire_type != 0:
156
+ deduplicated_reversed.append(raw)
157
+ continue
158
+ value = int(index.value)
159
+ if value in seen_indices:
160
+ continue
161
+ seen_indices.add(value)
162
+ deduplicated_reversed.append(raw)
163
+ table.fields = list(reversed(deduplicated_reversed))
164
+ return table.encode()
165
+
166
+
167
+ def rewrite_overlapping_table(
168
+ data: bytes, start: int, end: int, replacement_length: int
169
+ ) -> bytes:
170
+ """Rewrite TSP.Range entries in an OverlappingFieldAttributeTable."""
171
+ delta = replacement_length - (end - start)
172
+
173
+ def left_position(value: int) -> int:
174
+ if value <= start:
175
+ return value
176
+ if value >= end:
177
+ return value + delta
178
+ return start
179
+
180
+ def right_position(value: int) -> int:
181
+ if value <= start:
182
+ return value
183
+ if value >= end:
184
+ return value + delta
185
+ return start + replacement_length
186
+
187
+ table = Message.parse(data)
188
+ for raw in table.get(1):
189
+ entry = Message.parse(bytes(raw.value))
190
+ range_field = entry.one(1)
191
+ if range_field is None:
192
+ raise ValueError("overlapping attribute entry lacks TSP.Range")
193
+ range_message = Message.parse(bytes(range_field.value))
194
+ location = range_message.one(1)
195
+ length = range_message.one(2)
196
+ if location is None or length is None:
197
+ raise ValueError("TSP.Range lacks location or length")
198
+ old_start = int(location.value)
199
+ old_end = old_start + int(length.value)
200
+ new_start = left_position(old_start)
201
+ new_end = max(new_start, right_position(old_end))
202
+ location.set_varint(new_start)
203
+ length.set_varint(new_end - new_start)
204
+ range_field.set_bytes(range_message.encode())
205
+ raw.set_bytes(entry.encode())
206
+ return table.encode()
207
+
208
+
209
+ def replace_storage_text(
210
+ storage: LocatedObject, start: int, end: int, value: str
211
+ ) -> int:
212
+ """Replace a UTF-16 range and propagate offsets through all storage tables."""
213
+ if not isinstance(value, str):
214
+ raise TypeError("replacement text must be a string")
215
+ text = "".join(bytes(field.value).decode("utf-8") for field in storage.message.get(3))
216
+ total = utf16_length(text)
217
+ if start < 0 or end < start or end > total:
218
+ raise ValueError("replacement range must be ordered and within storage text")
219
+ if start == end and not value:
220
+ return 0
221
+ start_cp = utf16_to_codepoint(text, start)
222
+ end_cp = utf16_to_codepoint(text, end)
223
+ updated_text = text[:start_cp] + value + text[end_cp:]
224
+ replacement_length = utf16_length(value)
225
+
226
+ text_fields = storage.message.get(3)
227
+ if text_fields:
228
+ text_fields[0].set_bytes(updated_text.encode("utf-8"))
229
+ storage.message.fields = [
230
+ field
231
+ for field in storage.message.fields
232
+ if field.number != 3 or field is text_fields[0]
233
+ ]
234
+ else:
235
+ storage.message.add_bytes(3, updated_text.encode("utf-8"))
236
+
237
+ for number in INDEXED_STORAGE_TABLES:
238
+ field = storage.message.one(number)
239
+ if field is not None:
240
+ field.set_bytes(
241
+ rewrite_indexed_table(bytes(field.value), start, end, replacement_length)
242
+ )
243
+ for number in OVERLAPPING_STORAGE_TABLES:
244
+ field = storage.message.one(number)
245
+ if field is not None:
246
+ field.set_bytes(
247
+ rewrite_overlapping_table(bytes(field.value), start, end, replacement_length)
248
+ )
249
+ return replacement_length - (end - start)
250
+
251
+
252
+ def unpack_packed_varints(data: bytes) -> list[int]:
253
+ values: list[int] = []
254
+ pos = 0
255
+ while pos < len(data):
256
+ value, pos = read_varint(data, pos)
257
+ values.append(value)
258
+ return values
259
+
260
+
261
+ def add_object_reference(info: MessageInfo, identifier: int) -> None:
262
+ fields = info.message.get(5)
263
+ if fields:
264
+ field = fields[0]
265
+ values = unpack_packed_varints(bytes(field.value))
266
+ if identifier not in values:
267
+ field.set_bytes(bytes(field.value) + encode_varint(identifier))
268
+ info.field.children = info.message
269
+ info.field.dirty = True
270
+ else:
271
+ info.message.add_bytes(5, encode_varint(identifier))
272
+ info.field.children = info.message
273
+ info.field.dirty = True
274
+
275
+
276
+ def codepoint_to_utf16(text: str, index: int) -> int:
277
+ if index < 0 or index > len(text):
278
+ raise IndexError("text index out of bounds")
279
+ return len(text[:index].encode("utf-16-le")) // 2
280
+
281
+
282
+ def utf16_to_codepoint(text: str, index: int) -> int:
283
+ if index < 0:
284
+ raise IndexError("UTF-16 index out of bounds")
285
+ units = 0
286
+ for position, character in enumerate(text):
287
+ if units == index:
288
+ return position
289
+ units += 2 if ord(character) > 0xFFFF else 1
290
+ if units > index:
291
+ raise ValueError("UTF-16 index splits a surrogate pair")
292
+ if units == index:
293
+ return len(text)
294
+ raise IndexError("UTF-16 index out of bounds")
@@ -0,0 +1,271 @@
1
+ Metadata-Version: 2.4
2
+ Name: python-pages
3
+ Version: 0.1.0
4
+ Summary: A python-docx-inspired API for Apple Pages documents
5
+ Author-email: Yuki Tamura <isoparametric@isoparametric.xyz>
6
+ License-Expression: MIT
7
+ Project-URL: Repository, https://github.com/isoparametric/python-pages
8
+ Project-URL: Issues, https://github.com/isoparametric/python-pages/issues
9
+ Keywords: apple-pages,document,iwork,python-docx
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3 :: Only
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
18
+ Classifier: Topic :: Office/Business :: Office Suites
19
+ Requires-Python: >=3.11
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Dynamic: license-file
23
+
24
+ # python-pages
25
+
26
+ `python-pages` is a Python library for reading and editing modern Apple Pages
27
+ documents with an object model inspired by
28
+ [`python-docx`](https://python-docx.readthedocs.io/). The distribution name is
29
+ `python-pages`; the import name is `pages`:
30
+
31
+ ```python
32
+ from pages import Document
33
+ ```
34
+
35
+ The library edits `.pages` packages directly. It does not launch Pages, use
36
+ AppleScript, or automate the GUI. Its runtime is dependency-free and consists
37
+ of a ZIP container layer, a lossless protobuf-wire layer, an iWork Snappy/IWA
38
+ layer, and a public document API.
39
+
40
+ This project is alpha-quality. Keep the source document and inspect important
41
+ outputs in Pages before using them in production.
42
+
43
+ ## Installation
44
+
45
+ From a local checkout:
46
+
47
+ ```sh
48
+ python3 -m venv .venv
49
+ source .venv/bin/activate
50
+ python3 -m pip install --upgrade pip
51
+ python3 -m pip install -e .
52
+ ```
53
+
54
+ The editable install provides both `import pages` and the `python-pages`
55
+ command. To run without installing, prefix commands with `PYTHONPATH=src`.
56
+
57
+ The project requires Python 3.11 or newer. There are no runtime dependencies.
58
+
59
+ The requested `pages` import name is also used by an unrelated PyPI static-site
60
+ generator. Install `python-pages` in a dedicated virtual environment and do not
61
+ co-install that distribution; both projects would otherwise provide the same
62
+ top-level import name.
63
+
64
+ ## Quick start
65
+
66
+ ```python
67
+ from pages import (
68
+ Document,
69
+ Inches,
70
+ Pt,
71
+ RGBColor,
72
+ WD_ALIGN_PARAGRAPH,
73
+ WD_COLOR_INDEX,
74
+ WD_ORIENT,
75
+ )
76
+
77
+ document = Document("input.pages")
78
+
79
+ paragraph = document.paragraphs[0]
80
+ run = paragraph.runs[0]
81
+ print(paragraph.text, run.text)
82
+
83
+ # Character formatting uses python-docx-style tri-state values.
84
+ run.bold = True
85
+ run.italic = False
86
+ run.underline = None
87
+ run.font.name = "Helvetica-Bold"
88
+ run.font.size = Pt(14)
89
+ run.font.color.rgb = RGBColor(0x22, 0x66, 0xCC)
90
+ run.font.strike = True
91
+ run.font.subscript = False
92
+ run.font.superscript = True
93
+
94
+ # Pages stores the observed text background at paragraph granularity.
95
+ paragraph.highlight_color = WD_COLOR_INDEX.YELLOW
96
+ paragraph.alignment = WD_ALIGN_PARAGRAPH.CENTER
97
+ paragraph.paragraph_format.line_spacing = Pt(24)
98
+ paragraph.paragraph_format.space_before = Pt(12)
99
+ paragraph.paragraph_format.left_indent = Inches(0.25)
100
+
101
+ paragraph.add_run(" Appended text")
102
+ document.add_paragraph("A new body paragraph")
103
+ document.add_heading("A new heading", level=1)
104
+ document.add_page_break()
105
+
106
+ section = document.sections[0]
107
+ section.orientation = WD_ORIENT.LANDSCAPE
108
+ section.page_width, section.page_height = section.page_height, section.page_width
109
+ section.left_margin = Inches(0.75)
110
+ section.header.paragraphs[0].text = "Header text"
111
+
112
+ document.save("output.pages")
113
+ ```
114
+
115
+ `Document()` without a path starts with a bundled minimal Pages template.
116
+ The template contains blank body text/previews and a neutral white placeholder
117
+ for an otherwise unreachable image graph. The input path is never modified;
118
+ changes are written only by `save()`.
119
+
120
+ ## API coverage
121
+
122
+ The public API intentionally follows python-docx naming where Pages has a
123
+ reasonable counterpart:
124
+
125
+ | Area | python-pages support |
126
+ |---|---|
127
+ | Documents | `Document(path)`, `Document()`, `save()` |
128
+ | Text | `paragraphs`, `Paragraph.text`, `runs`, `Run.text`, insertion and deletion |
129
+ | Fonts | bold, italic, underline, strike, name, size, RGB color, subscript, superscript |
130
+ | Paragraphs | alignment, line spacing, spacing before/after, indents, tab stops, named styles |
131
+ | Sections | one Pages section with page size, margins, orientation, headers, and footers |
132
+ | Tables | read rows/cells, edit materialized text cells, clone a blank table with `add_table()` |
133
+ | Pictures | inspect/replace PNG images and clone an inline image with `add_picture()` |
134
+ | Links and styles | inspect/edit existing hyperlinks; enumerate/apply named paragraph and character styles |
135
+ | Properties | python-docx-shaped `core_properties` facade |
136
+ | Comments | read comments, replies, authors, anchors, and edit existing comment text |
137
+
138
+ Examples for additional object types:
139
+
140
+ ```python
141
+ table = document.tables[0]
142
+ print([[cell.text for cell in row.cells] for row in table.rows])
143
+ table.cell(1, 1).text = "Updated cell"
144
+ new_table = document.add_table(rows=3, cols=4)
145
+
146
+ picture = document.inline_shapes[0]
147
+ print(picture.filename, picture.width, picture.height)
148
+ picture.replace("replacement.png", "replacement-256px-thumbnail.png")
149
+ new_picture = document.add_picture("new-image.png", width=Inches(4))
150
+
151
+ hyperlink = document.hyperlinks[0]
152
+ hyperlink.text = "Project website"
153
+ hyperlink.address = "https://example.com"
154
+
155
+ for comment in document.comments:
156
+ print(comment.author, comment.anchor_text, comment.text)
157
+ print([reply.text for reply in comment.replies])
158
+ ```
159
+
160
+ ## Differences from python-docx
161
+
162
+ `python-pages` is API-inspired, not a byte-format adapter for DOCX. Important
163
+ differences follow from the Pages data model:
164
+
165
+ - Pages page geometry is package-wide, so `Document.sections` contains one
166
+ section. Multiple DOCX sections and linked-to-previous behavior are not
167
+ emulated.
168
+ - A Pages header or footer is exposed as its left, center, and right text
169
+ fragments rather than as a WordprocessingML story part.
170
+ - The observed Pages text-background property belongs to an anonymous
171
+ paragraph style. `Run.font.highlight_color` is retained for call-shape
172
+ compatibility but reads or writes the run's entire containing paragraph.
173
+ - `core_properties` values without a native Pages counterpart are stored in
174
+ `Metadata/PythonPagesCoreProperties.plist`. Documents written by the earlier
175
+ project name remain readable.
176
+ - `add_table()` needs an existing Pages-authored table in the target document
177
+ as a structural template. It supports one tile of up to 256 rows and does
178
+ not implement cell merge or sparse-cell materialization.
179
+ - `add_picture()` needs an existing Pages-authored image graph in the target
180
+ document. New and replacement media are PNG; automatic thumbnails support
181
+ non-interlaced 8-bit RGB/RGBA PNG.
182
+ - Existing comments and replies can be read and edited, but creating a new
183
+ comment is intentionally disabled because Pages also writes collaboration
184
+ and view-state objects whose lifecycle is not yet established.
185
+ - Existing hyperlinks can be edited. Creating a new hyperlink is not yet part
186
+ of the public API.
187
+ - Pages formats are undocumented and can change between application versions.
188
+ The implementation preserves unknown protobuf fields where possible, but it
189
+ cannot guarantee support for every historical or future Pages variant.
190
+
191
+ The detailed compatibility ledger and reverse-engineering evidence are in
192
+ [REPORT.md](REPORT.md).
193
+
194
+ ## Command-line interface
195
+
196
+ ```sh
197
+ python-pages inspect input.pages
198
+ python-pages bold input.pages output.pages "unique body substring"
199
+ ```
200
+
201
+ Without installation:
202
+
203
+ ```sh
204
+ PYTHONPATH=src python3 -m pages.cli inspect input.pages
205
+ ```
206
+
207
+ The `bold` helper expects an unambiguous substring unless `--occurrence` is
208
+ provided. It converts Python string offsets to the UTF-16 offsets used by Pages.
209
+
210
+ ## Optional test fixtures are not distributed
211
+
212
+ The test suite is self-contained and passes from a standalone checkout. Private
213
+ `.pages` files used for Pages.app interoperability checks can contain
214
+ copyrighted or sensitive content, so `samples/` and generated `output/`
215
+ packages are excluded from Git and distributions.
216
+
217
+ To enable the additional real-document tests, place a Pages-authored package at
218
+ `samples/local_fixture.pages`. The tests activate automatically with
219
+ `unittest.skipUnless` when the file is present. It must contain:
220
+
221
+ - at least one inline PNG image;
222
+ - at least one nonempty table;
223
+ - at least one hyperlink; and
224
+ - at least one comment with a reply.
225
+
226
+ No particular headings, formatted runs, or document text are required by these
227
+ optional tests. Use only content you are allowed to publish and do not commit
228
+ the fixture.
229
+
230
+ To enable the python-docx compatibility-ledger audit, place the upstream source
231
+ tree at `ref/python-docx/`. Its tests must be under `ref/python-docx/tests/`;
232
+ the ledger test also activates automatically when that directory is present.
233
+
234
+ Run the suite with:
235
+
236
+ ```sh
237
+ python3 -m unittest discover -s tests -v
238
+ ```
239
+
240
+ Use the decoded-IWA audit tool for every write path:
241
+
242
+ ```sh
243
+ PYTHONPATH=src python3 tools/diff_iwa.py before.pages after.pages
244
+ unzip -t after.pages
245
+ ```
246
+
247
+ ## Architecture
248
+
249
+ - Low level: `snappy.py`, `protobuf.py`, and `iwa.py` provide lossless wire
250
+ parsing and 64-KiB iWork frame handling.
251
+ - Middle level: `pages.py`, `metadata.py`, `stylesheet.py`, `text.py`, and the
252
+ component-specific modules traverse and mutate Pages object graphs.
253
+ - High level: `api.py` provides the python-docx-shaped object model exported by
254
+ `pages`.
255
+
256
+ Synthesized styles are registered in the stylesheet, parent/child map,
257
+ MessageInfo references, PackageMetadata UUID map, and cross-component reference
258
+ map. Untouched ZIP members and IWA payloads are preserved byte-for-byte; changed
259
+ members are re-encoded into valid Pages packages.
260
+
261
+ ## Project status
262
+
263
+ The compatibility ledger accounts for all 59 python-docx test files and 662
264
+ discovered behavior methods as migrated, partially migrated, or format-specific
265
+ exclusions. When `ref/python-docx/` is present, the optional ledger test verifies
266
+ that the upstream checkout contains behavior tests. The dependency-free test
267
+ suite runs standalone; optional fixture and ledger tests activate automatically
268
+ when their local inputs are present.
269
+
270
+ `python-pages` is an independent project and is not affiliated with Apple or
271
+ the python-docx project.
@@ -0,0 +1,24 @@
1
+ pages/__init__.py,sha256=xPHPfQHrUBndczmlQ2uEQDz8zpVzuulvLgQ-CaQ9te8,1228
2
+ pages/api.py,sha256=IywVwz4IC9LyBi6QRf-AkJTAWJ6SrpA7URCrJcdaUfE,61159
3
+ pages/cli.py,sha256=Q-Vhkn9iIhcg6_OiZ0aRbWoj2OlQCxifeiqpC9x0-JM,1469
4
+ pages/comments.py,sha256=3LS2UaFjDltdYwcgU8mQxcn3QUfCvtnypslSDGTfYFY,5688
5
+ pages/components.py,sha256=gqRxa1GyFrzV60ETh69iBY8XREqvMITNCn5hwpz2ouc,15750
6
+ pages/core_properties.py,sha256=y5CdAvS4mDytqifbumT2vWaG7bNj04JJS1wZo4smJ5I,4235
7
+ pages/document.py,sha256=luDLACqJleXkwaSNywf-hwcUPxDHK1VZUhnM2kRMSIc,8113
8
+ pages/hyperlinks.py,sha256=LCAMiiRz8-F2U6rrspQnXSazoCUwE0EyCEgBJtJUrLk,1788
9
+ pages/iwa.py,sha256=yyx48EL74XT3oKSloVIqaSeIvBl2CeloE-jafZTCeyQ,3914
10
+ pages/metadata.py,sha256=zQR3jRZTr40jZ4ZJL2Qbr9S4K2C8fZkuSkhCPwtUSiY,4409
11
+ pages/pages.py,sha256=zIeYfX2FElvIJc30NvrqCdcj1uMyZevepqrCYsvCVd0,15350
12
+ pages/pictures.py,sha256=0vr-sd9sTO14B953X4ah-guWF6TxtWrEZnlg0FbA56c,21499
13
+ pages/protobuf.py,sha256=6o5Rf291a5KC6EMdMs-ChVho85r0R4kj8hljungR178,5276
14
+ pages/snappy.py,sha256=6YW_uCSA4WMSe76SNHzxcIqDo5zzO6-5fme0ofvzKiE,4535
15
+ pages/stylesheet.py,sha256=fiw8Gtr0h2jYHgrvolpTEKvORoHHUxGKokpmB2yGMCY,34932
16
+ pages/tables.py,sha256=FoP7JDKuFEY8vh5X0qK7AXyeAcY0IFDf_sfdvxIujig,20731
17
+ pages/text.py,sha256=qb_V1p3EfgBHbUBJqhaGsLiy-_Xff6Dk83f2scQg4vc,10043
18
+ pages/data/default.pages,sha256=EZ9191Lg_aASO01lAVqQpruvhtc7XnJdKDJX6d_MuJw,50659
19
+ python_pages-0.1.0.dist-info/licenses/LICENSE,sha256=i3ed-q3APi1nmfH2RM6ephX3mz7B2Uu5ztmA5-y1RQY,1068
20
+ python_pages-0.1.0.dist-info/METADATA,sha256=8MiAMu_4KbGu8MR_6Bnd_enWSQUi6eXZptsf2MNem98,10473
21
+ python_pages-0.1.0.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
22
+ python_pages-0.1.0.dist-info/entry_points.txt,sha256=Eqac5QpE5I_2F-kMjXKd0DnwOUVwAH77zM9zkjwL-H8,48
23
+ python_pages-0.1.0.dist-info/top_level.txt,sha256=jfEHnE0lLOnMOMYDPpLhDOwJfWiGhHkfAXE7La4L7hw,6
24
+ python_pages-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (83.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ python-pages = pages.cli:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Yuki Tamura
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ pages