athena-python-pptx 0.5.0__tar.gz → 0.6.0__tar.gz
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.
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/CLAUDE.md +9 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/PKG-INFO +1 -1
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/docs/API_PARITY_EXCEPTIONS.md +19 -5
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/__init__.py +1 -1
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/commands.py +10 -2
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/shapes/__init__.py +1 -1
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pyproject.toml +1 -1
- athena_python_pptx-0.6.0/uv.lock +1215 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/.gitignore +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/API_PARITY_REPORT.md +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/CHANGELOG.md +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/DEV-GUIDE.md +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/PARITY_QUESTIONS.md +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/PUBLISHING.md +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/README.md +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/docs/athena-api.json +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/docs/athena-api.md +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/_athena_extension.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/_ptc.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/_references.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/action.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/batching.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/chart/__init__.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/chart/axis.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/chart/category.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/chart/chart.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/chart/data.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/chart/datalabel.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/chart/legend.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/chart/marker.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/chart/plot.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/chart/point.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/chart/series.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/chart/xlsx.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/client.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/decorators.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/dml/__init__.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/dml/chtfmt.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/dml/color.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/dml/effect.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/dml/fill.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/dml/line.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/docgen.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/enum/__init__.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/enum/action.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/enum/chart.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/enum/dml.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/enum/lang.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/enum/shapes.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/enum/text.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/errors.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/exc.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/media.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/package.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/parts/__init__.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/parts/_base.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/parts/chart.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/parts/coreprops.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/parts/embeddedpackage.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/parts/image.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/parts/media.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/parts/presentation.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/parts/slide.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/presentation.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/shapes/autoshape.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/shapes/base.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/shapes/connector.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/shapes/freeform.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/shapes/graphfrm.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/shapes/group.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/shapes/picture.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/shapes/placeholder.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/shapes/shapetree.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/shared.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/slide.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/slides.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/spec.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/table.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/text/__init__.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/text/fonts.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/text/layout.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/text/text.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/types.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/typing.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/units.py +0 -0
- {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/util.py +0 -0
|
@@ -69,6 +69,15 @@ local XML / OPC parts:
|
|
|
69
69
|
|
|
70
70
|
`Font.language_id` IS now implemented (returns `MSO_LANGUAGE_ID` enum, accepts enum or int LCID) — added in v0.1.68.
|
|
71
71
|
|
|
72
|
+
### Slide-index conventions
|
|
73
|
+
|
|
74
|
+
Slide indexing has TWO bases — never conflate them:
|
|
75
|
+
|
|
76
|
+
- **0-based** — this SDK (python-pptx parity): `prs.slides[0]`, `slide.slide_index`, and every `slide_index=` parameter are 0-based.
|
|
77
|
+
- **1-based** — the Athena citation/anchor system: `SlideAnchor.slideIndex` / `ShapeAnchor.slideIndex` (in `pptx/_references.py`), the citation methods, and anything displayed as "Slide N" are the 1-based display position.
|
|
78
|
+
|
|
79
|
+
The PPTX Studio server applier converts at the SDK→anchor boundary (`+1`). `slideId` (== the SDK's `slide.slide_id`) is the stable, base-agnostic identity — prefer it when available.
|
|
80
|
+
|
|
72
81
|
### If you need a deviation
|
|
73
82
|
|
|
74
83
|
If there is a genuine technical reason why a deviation from python-pptx is necessary (e.g., the SDK is a REST client and cannot replicate XML-level behavior):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: athena-python-pptx
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
4
4
|
Summary: Drop-in replacement for python-pptx that connects to PPTX Studio for real-time collaboration
|
|
5
5
|
Project-URL: Homepage, https://github.com/pptx-studio/python-sdk
|
|
6
6
|
Project-URL: Documentation, https://docs.pptx-studio.com/sdk/python
|
|
@@ -1368,8 +1368,8 @@ A citation record is:
|
|
|
1368
1368
|
```jsonc
|
|
1369
1369
|
{
|
|
1370
1370
|
"id": "citation_<uuid12>",
|
|
1371
|
-
"destinationAnchor": { "type": "slide", "slideId": "...", "slideIndex":
|
|
1372
|
-
// or { "type": "shape", "slideId": "...", "slideIndex":
|
|
1371
|
+
"destinationAnchor": { "type": "slide", "slideId": "...", "slideIndex": 1 },
|
|
1372
|
+
// or { "type": "shape", "slideId": "...", "slideIndex": 1, "shapeIds": ["..."] }
|
|
1373
1373
|
"citation_string": "<source Spaces URL>",
|
|
1374
1374
|
"displayValue": "Q4 Sales", // optional
|
|
1375
1375
|
"active": true,
|
|
@@ -1399,17 +1399,31 @@ cid = slide.add_citation(
|
|
|
1399
1399
|
)
|
|
1400
1400
|
```
|
|
1401
1401
|
|
|
1402
|
-
### `Shape.
|
|
1402
|
+
### `Shape.add_citation(source, *, anchor=None, display_value=None) -> str`
|
|
1403
1403
|
|
|
1404
1404
|
Shape-scoped citation — emits `AddShapeCitation` carrying this shape's id, so
|
|
1405
1405
|
the server writes a `shape` destination anchor with `shapeIds`. Returns the
|
|
1406
|
-
created citation id.
|
|
1406
|
+
created citation id. (Mirrors `Slide.add_citation` / `Cell.add_citation` — the
|
|
1407
|
+
citation verb is `add_citation` on every citable object.)
|
|
1407
1408
|
|
|
1408
1409
|
```python
|
|
1409
1410
|
shape = slide.shapes.add_textbox(Inches(1), Inches(1), Inches(4), Inches(1))
|
|
1410
|
-
cid = shape.
|
|
1411
|
+
cid = shape.add_citation(AssetReference(id="asset_doc_xyz"))
|
|
1411
1412
|
```
|
|
1412
1413
|
|
|
1414
|
+
**Slide-index base shift (citations).** The SDK/command wire `slide_index`
|
|
1415
|
+
(`prs.slides[i]`, `slide.slide_index`) is **0-based** — python-pptx array
|
|
1416
|
+
parity. But the `destinationAnchor.slideIndex` the server writes into the
|
|
1417
|
+
citation record is **1-based** — the "Slide N" display position per the
|
|
1418
|
+
athena-references contract. The server applies the `+1` at the SDK→anchor
|
|
1419
|
+
boundary, so the stored anchor's `slideIndex` is always one greater than the
|
|
1420
|
+
SDK index of the cited slide.
|
|
1421
|
+
|
|
1422
|
+
> ⚠️ If the **cited source** is itself a slide/shape (you pass a
|
|
1423
|
+
> `SlideAnchor` / `ShapeAnchor` as `anchor=`), that anchor's `slide_index` is
|
|
1424
|
+
> the **1-based** display position per the athena-references contract — do
|
|
1425
|
+
> **not** pass the SDK's 0-based `slide.slide_index` into it (add 1).
|
|
1426
|
+
|
|
1413
1427
|
### `Slide.remove_citation(citation_id, *, soft=True)` / `Presentation.remove_citation(citation_id, *, soft=True)`
|
|
1414
1428
|
|
|
1415
1429
|
Remove a citation from the deck by id. Citations are deck-scoped, so both
|
|
@@ -788,7 +788,11 @@ class AddSlideCitation(Command):
|
|
|
788
788
|
``docs/API_PARITY_EXCEPTIONS.md`` for the deviation rationale.
|
|
789
789
|
|
|
790
790
|
Args:
|
|
791
|
-
slide_index: Zero-based index of the cited slide.
|
|
791
|
+
slide_index: Zero-based index of the cited slide. This stays 0-based on
|
|
792
|
+
the wire (python-pptx array parity); the studio server applier
|
|
793
|
+
resolves the stable ``slideId`` from it and stores the resulting
|
|
794
|
+
``destinationAnchor.slideIndex`` as 1-based (display "Slide N") — do
|
|
795
|
+
not read this wire value as a 1-based position.
|
|
792
796
|
source_ref: Source ``AssetReference`` JSON (``referenced='asset'`` +
|
|
793
797
|
``id``); the asset the slide is sourced from.
|
|
794
798
|
source_anchor: Optional ``Anchor`` JSON within the source (e.g. a
|
|
@@ -834,7 +838,11 @@ class AddShapeCitation(Command):
|
|
|
834
838
|
``docs/API_PARITY_EXCEPTIONS.md`` for the deviation rationale.
|
|
835
839
|
|
|
836
840
|
Args:
|
|
837
|
-
slide_index: Zero-based index of the slide the shapes live on.
|
|
841
|
+
slide_index: Zero-based index of the slide the shapes live on. This
|
|
842
|
+
stays 0-based on the wire (python-pptx array parity); the studio
|
|
843
|
+
server applier resolves the stable ``slideId`` from it and stores
|
|
844
|
+
the resulting ``destinationAnchor.slideIndex`` as 1-based (display
|
|
845
|
+
"Slide N") — do not read this wire value as a 1-based position.
|
|
838
846
|
shape_ids: Non-empty list of shape ids on that slide to cite.
|
|
839
847
|
source_ref: Source ``AssetReference`` JSON.
|
|
840
848
|
source_anchor: Optional ``Anchor`` JSON within the source.
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "athena-python-pptx"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.6.0"
|
|
8
8
|
description = "Drop-in replacement for python-pptx that connects to PPTX Studio for real-time collaboration"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|