ps-python-pptx 1.2.0__py3-none-any.whl → 1.3.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.
- pptx/__init__.py +1 -1
- pptx/action.py +23 -0
- pptx/oxml/action.py +2 -0
- pptx/text/text.py +23 -0
- {ps_python_pptx-1.2.0.dist-info → ps_python_pptx-1.3.0.dist-info}/METADATA +1 -1
- {ps_python_pptx-1.2.0.dist-info → ps_python_pptx-1.3.0.dist-info}/RECORD +9 -9
- {ps_python_pptx-1.2.0.dist-info → ps_python_pptx-1.3.0.dist-info}/WHEEL +0 -0
- {ps_python_pptx-1.2.0.dist-info → ps_python_pptx-1.3.0.dist-info}/licenses/LICENSE +0 -0
- {ps_python_pptx-1.2.0.dist-info → ps_python_pptx-1.3.0.dist-info}/top_level.txt +0 -0
pptx/__init__.py
CHANGED
pptx/action.py
CHANGED
|
@@ -237,6 +237,29 @@ class Hyperlink(Subshape):
|
|
|
237
237
|
hlink = self._get_or_add_hlink()
|
|
238
238
|
hlink.rId = rId
|
|
239
239
|
|
|
240
|
+
@property
|
|
241
|
+
def screen_tip(self) -> str | None:
|
|
242
|
+
"""Text shown by PowerPoint when pointing at this hyperlink.
|
|
243
|
+
|
|
244
|
+
Assign the address or action before setting a ScreenTip. Assigning None
|
|
245
|
+
or an empty string removes the tip without changing the link. Setting
|
|
246
|
+
a new address uses the existing address setter behavior and clears the
|
|
247
|
+
old tip. Reading this property does not create a hyperlink element.
|
|
248
|
+
"""
|
|
249
|
+
hlink = self._hlink
|
|
250
|
+
return hlink.tooltip if hlink is not None else None
|
|
251
|
+
|
|
252
|
+
@screen_tip.setter
|
|
253
|
+
def screen_tip(self, value: str | None):
|
|
254
|
+
if value is not None and not isinstance(value, str):
|
|
255
|
+
raise TypeError("screen_tip must be a string or None")
|
|
256
|
+
hlink = self._hlink
|
|
257
|
+
if hlink is None:
|
|
258
|
+
if value:
|
|
259
|
+
raise ValueError("Set a hyperlink address or action before its ScreenTip")
|
|
260
|
+
return
|
|
261
|
+
hlink.tooltip = value or None
|
|
262
|
+
|
|
240
263
|
def _get_or_add_hlink(self) -> CT_Hyperlink:
|
|
241
264
|
"""Get the `a:hlinkClick` or `a:hlinkHover` element for the Hyperlink object.
|
|
242
265
|
|
pptx/oxml/action.py
CHANGED
|
@@ -14,6 +14,8 @@ class CT_Hyperlink(BaseOxmlElement):
|
|
|
14
14
|
"action", XsdString
|
|
15
15
|
)
|
|
16
16
|
|
|
17
|
+
tooltip: str | None = OptionalAttribute("tooltip", XsdString) # pyright: ignore[reportAssignmentType]
|
|
18
|
+
|
|
17
19
|
@property
|
|
18
20
|
def action_fields(self) -> dict[str, str]:
|
|
19
21
|
"""Query portion of the `ppaction://` URL as dict.
|
pptx/text/text.py
CHANGED
|
@@ -488,6 +488,29 @@ class _Hyperlink(Subshape):
|
|
|
488
488
|
if url:
|
|
489
489
|
self._add_hlinkClick(url)
|
|
490
490
|
|
|
491
|
+
@property
|
|
492
|
+
def screen_tip(self) -> str | None:
|
|
493
|
+
"""Text shown by PowerPoint when pointing at this hyperlink.
|
|
494
|
+
|
|
495
|
+
Assign the address or action before setting a ScreenTip. Assigning None
|
|
496
|
+
or an empty string removes the tip without changing the link. Setting
|
|
497
|
+
a new address uses the existing address setter behavior and clears the
|
|
498
|
+
old tip. Reading this property does not create a hyperlink element.
|
|
499
|
+
"""
|
|
500
|
+
hlink = self._hlinkClick
|
|
501
|
+
return hlink.tooltip if hlink is not None else None
|
|
502
|
+
|
|
503
|
+
@screen_tip.setter
|
|
504
|
+
def screen_tip(self, value: str | None):
|
|
505
|
+
if value is not None and not isinstance(value, str):
|
|
506
|
+
raise TypeError("screen_tip must be a string or None")
|
|
507
|
+
hlink = self._hlinkClick
|
|
508
|
+
if hlink is None:
|
|
509
|
+
if value:
|
|
510
|
+
raise ValueError("Set a hyperlink address or action before its ScreenTip")
|
|
511
|
+
return
|
|
512
|
+
hlink.tooltip = value or None
|
|
513
|
+
|
|
491
514
|
def _add_hlinkClick(self, url: str):
|
|
492
515
|
rId = self.part.relate_to(url, RT.HYPERLINK, is_external=True)
|
|
493
516
|
self._rPr.add_hlinkClick(rId)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
pptx/__init__.py,sha256=
|
|
2
|
-
pptx/action.py,sha256=
|
|
1
|
+
pptx/__init__.py,sha256=27NcYHHKRAjL6gwwhRTPjktz_rkm-r4G8yD-zYFNn6I,2168
|
|
2
|
+
pptx/action.py,sha256=PuhHYNENNLNYgecril8rDJIERaJEyCb8kbPK4QdyKNM,10597
|
|
3
3
|
pptx/api.py,sha256=IrGxa35Z6tyZBxaBuknyROdmHKNI8XUa77XU62xBFFM,1737
|
|
4
4
|
pptx/background.py,sha256=1-YI6g_bOJppM_cuAhHEJXOaKTzh7endTaVOE-wAEaU,8732
|
|
5
5
|
pptx/exc.py,sha256=5ahr42pL5ELGHFD0YFCAYp17YEm_DkXUymyt2ENFX_Q,473
|
|
@@ -50,7 +50,7 @@ pptx/opc/serialized.py,sha256=7iH3v3Ln95W26P1C0XYswvPONdwTp-hM_ld7QB5lXHQ,11437
|
|
|
50
50
|
pptx/opc/shared.py,sha256=moVes6J3hp4BrXQTZfkoVJldxfr9LUzMtxhtl6nkYOw,709
|
|
51
51
|
pptx/opc/spec.py,sha256=Adxgld3M-kTbWTwm27YNwPUPl7Ajh3anXTiwgYLbIDo,998
|
|
52
52
|
pptx/oxml/__init__.py,sha256=m3tZMaKa9C7d-zm6NRQATenNq3uHPc65_DPeBOdPB24,15869
|
|
53
|
-
pptx/oxml/action.py,sha256=
|
|
53
|
+
pptx/oxml/action.py,sha256=1hP_zInNiI_U0q7gqoWYOAS0tTYJhQfbJ68xW92gYIU,1720
|
|
54
54
|
pptx/oxml/coreprops.py,sha256=Q32m6gMBqlH2WA7XtXBxD60vdWY1DEuFJQX2w8CjfFw,10419
|
|
55
55
|
pptx/oxml/ns.py,sha256=En3N2dpK2eJb_E7w5korgxrYEDU_yFkHdpPR5eDkzLU,4761
|
|
56
56
|
pptx/oxml/presentation.py,sha256=sh2DAaEg5PdIV3vXIeeX4RgJIALZ4UbRqDOF9hUFvV4,4252
|
|
@@ -110,9 +110,9 @@ pptx/templates/xlsx-icon.emf,sha256=FOUpNs698W5aZinOcHQVwmEi_lSvMihyotJf7GGKae4,
|
|
|
110
110
|
pptx/text/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
111
111
|
pptx/text/fonts.py,sha256=dvkIW1jTVR2PbsAblB-lNA0xYkp86VeUKJC6DOCbu3c,12863
|
|
112
112
|
pptx/text/layout.py,sha256=bkZjiRmoIrFMlcmonoROfgfgrgLCc9BRXKiCkWwB7W0,10232
|
|
113
|
-
pptx/text/text.py,sha256=
|
|
114
|
-
ps_python_pptx-1.
|
|
115
|
-
ps_python_pptx-1.
|
|
116
|
-
ps_python_pptx-1.
|
|
117
|
-
ps_python_pptx-1.
|
|
118
|
-
ps_python_pptx-1.
|
|
113
|
+
pptx/text/text.py,sha256=7QW0zRa_pwnuJaT95Ip5fp0zAqmjH8wQRPKpP6avs18,29441
|
|
114
|
+
ps_python_pptx-1.3.0.dist-info/licenses/LICENSE,sha256=dlLyceRtDVM-ncRj87X8vcrPTWqcjWtVTRXv0PN_YTI,1104
|
|
115
|
+
ps_python_pptx-1.3.0.dist-info/METADATA,sha256=EaaZ4AHmoQPz4q3jQErrCVx--fBRigh_e8OuX-hXQzY,3273
|
|
116
|
+
ps_python_pptx-1.3.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
117
|
+
ps_python_pptx-1.3.0.dist-info/top_level.txt,sha256=O4BUPv9c3_6OQNtaneqNqq32Dp1TFyKK-K9CVNPenF8,5
|
|
118
|
+
ps_python_pptx-1.3.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|