markdown-to-confluence 0.3.1__py3-none-any.whl → 0.3.2__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.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: markdown-to-confluence
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Publish Markdown files to Confluence wiki
5
5
  Home-page: https://github.com/hunyadi/md2conf
6
6
  Author: Levente Hunyadi
@@ -30,6 +30,7 @@ Requires-Dist: pyyaml>=6.0
30
30
  Requires-Dist: types-PyYAML>=6.0
31
31
  Requires-Dist: requests>=2.32
32
32
  Requires-Dist: types-requests>=2.32
33
+ Dynamic: license-file
33
34
 
34
35
  # Publish Markdown files to Confluence wiki
35
36
 
@@ -1,6 +1,7 @@
1
- md2conf/__init__.py,sha256=AtPkcrgEezF8jnJ14ALB3VdF6UAWPR9EPSYtoi6y5Nc,402
1
+ markdown_to_confluence-0.3.2.dist-info/licenses/LICENSE,sha256=Pv43so2bPfmKhmsrmXFyAvS7M30-1i1tzjz6-dfhyOo,1077
2
+ md2conf/__init__.py,sha256=IyztAgNkEXTxDlsTrxZOAkeNIzLSSzjNV0ZHg2SvDDE,402
2
3
  md2conf/__main__.py,sha256=ypjV_5mE0smlIRBFrpikgzXq18as2hY43HJxMLpzGp4,7145
3
- md2conf/api.py,sha256=uwIR_wBSQqvZ9XZ2m2009Hf8B5w7T5PUXJ88BU8CJmA,19520
4
+ md2conf/api.py,sha256=-bneMbfpspfat4J63Z7bY0kdlW8yJguRRNbx6CaOkGY,20101
4
5
  md2conf/application.py,sha256=5K-nCPHJZfIahjubrLtXTwI-zsTiD140fdYXDnh3GSk,9161
5
6
  md2conf/converter.py,sha256=MoGbXqh5rE4qkdxxY8RHcnoZ5mz0aEuFz9nmUnt0WdM,36397
6
7
  md2conf/emoji.py,sha256=IZeguWqcboeOyJkGLTVONDMO4ZXfYXPgfkp56PTI-hE,1924
@@ -11,10 +12,9 @@ md2conf/processor.py,sha256=G-MIh1jGq9jjgogHnlnRUSrNgiV6_xO6Fy7ct9alqgM,4769
11
12
  md2conf/properties.py,sha256=WaVVOYSck7drVQfcBJmBMa7Mb0KVOZl9UZHvLS1Du8U,1892
12
13
  md2conf/puppeteer-config.json,sha256=-dMTAN_7kNTGbDlfXzApl0KJpAWna9YKZdwMKbpOb60,159
13
14
  md2conf/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
- markdown_to_confluence-0.3.1.dist-info/LICENSE,sha256=Pv43so2bPfmKhmsrmXFyAvS7M30-1i1tzjz6-dfhyOo,1077
15
- markdown_to_confluence-0.3.1.dist-info/METADATA,sha256=pTnAvuTg_rgETAUZbsN_5HYbOwXE7qVpDGvhaXMwB2Y,14936
16
- markdown_to_confluence-0.3.1.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
17
- markdown_to_confluence-0.3.1.dist-info/entry_points.txt,sha256=F1zxa1wtEObtbHS-qp46330WVFLHdMnV2wQ-ZorRmX0,50
18
- markdown_to_confluence-0.3.1.dist-info/top_level.txt,sha256=_FJfl_kHrHNidyjUOuS01ngu_jDsfc-ZjSocNRJnTzU,8
19
- markdown_to_confluence-0.3.1.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
20
- markdown_to_confluence-0.3.1.dist-info/RECORD,,
15
+ markdown_to_confluence-0.3.2.dist-info/METADATA,sha256=2exvsuRCcD3L9CN7fl0gqki1gsqQgHDxGyjnKhDeYmw,14958
16
+ markdown_to_confluence-0.3.2.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
17
+ markdown_to_confluence-0.3.2.dist-info/entry_points.txt,sha256=F1zxa1wtEObtbHS-qp46330WVFLHdMnV2wQ-ZorRmX0,50
18
+ markdown_to_confluence-0.3.2.dist-info/top_level.txt,sha256=_FJfl_kHrHNidyjUOuS01ngu_jDsfc-ZjSocNRJnTzU,8
19
+ markdown_to_confluence-0.3.2.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
20
+ markdown_to_confluence-0.3.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.2)
2
+ Generator: setuptools (78.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
md2conf/__init__.py CHANGED
@@ -5,7 +5,7 @@ Parses Markdown files, converts Markdown content into the Confluence Storage For
5
5
  Confluence API endpoints to upload images and content.
6
6
  """
7
7
 
8
- __version__ = "0.3.1"
8
+ __version__ = "0.3.2"
9
9
  __author__ = "Levente Hunyadi"
10
10
  __copyright__ = "Copyright 2022-2025, Levente Hunyadi"
11
11
  __license__ = "MIT"
md2conf/api.py CHANGED
@@ -40,6 +40,17 @@ class ConfluenceVersion(enum.Enum):
40
40
  VERSION_2 = "api/v2"
41
41
 
42
42
 
43
+ class ConfluencePageParentContentType(enum.Enum):
44
+ """
45
+ Content types that can be a parent to a Confluence page
46
+ """
47
+ PAGE = "page"
48
+ WHITEBOARD = "whiteboard"
49
+ DATABASE = "database"
50
+ EMBED = "embed"
51
+ FOLDER = "folder"
52
+
53
+
43
54
  def build_url(base_url: str, query: Optional[dict[str, str]] = None) -> str:
44
55
  "Builds a URL with scheme, host, port, path and query string parameters."
45
56
 
@@ -71,6 +82,8 @@ class ConfluenceAttachment:
71
82
  class ConfluencePage:
72
83
  id: str
73
84
  space_id: str
85
+ parent_id: str
86
+ parent_type: ConfluencePageParentContentType
74
87
  title: str
75
88
  version: int
76
89
  content: str
@@ -194,7 +207,7 @@ class ConfluenceSession:
194
207
  payload = self._invoke(
195
208
  ConfluenceVersion.VERSION_2,
196
209
  "/spaces",
197
- {"ids": id, "type": "global", "status": "current"},
210
+ {"ids": id, "status": "current"},
198
211
  )
199
212
  payload = typing.cast(dict[str, JsonType], payload)
200
213
  results = typing.cast(list[JsonType], payload["results"])
@@ -216,7 +229,7 @@ class ConfluenceSession:
216
229
  payload = self._invoke(
217
230
  ConfluenceVersion.VERSION_2,
218
231
  "/spaces",
219
- {"keys": key, "type": "global", "status": "current"},
232
+ {"keys": key, "status": "current"},
220
233
  )
221
234
  payload = typing.cast(dict[str, JsonType], payload)
222
235
  results = typing.cast(list[JsonType], payload["results"])
@@ -261,7 +274,6 @@ class ConfluenceSession:
261
274
  comment: Optional[str] = None,
262
275
  force: bool = False,
263
276
  ) -> None:
264
-
265
277
  if attachment_path is None and raw_data is None:
266
278
  raise ConfluenceError("required: `attachment_path` or `raw_data`")
267
279
 
@@ -422,6 +434,8 @@ class ConfluenceSession:
422
434
  return ConfluencePage(
423
435
  id=page_id,
424
436
  space_id=typing.cast(str, data["spaceId"]),
437
+ parent_id=typing.cast(str, data["parentId"]),
438
+ parent_type=ConfluencePageParentContentType(typing.cast(str, data["parentType"])),
425
439
  title=typing.cast(str, data["title"]),
426
440
  version=typing.cast(int, version["number"]),
427
441
  content=typing.cast(str, storage["value"]),
@@ -524,6 +538,8 @@ class ConfluenceSession:
524
538
  return ConfluencePage(
525
539
  id=typing.cast(str, data["id"]),
526
540
  space_id=typing.cast(str, data["spaceId"]),
541
+ parent_id=typing.cast(str, data["parentId"]),
542
+ parent_type=ConfluencePageParentContentType(typing.cast(str, data["parentType"])),
527
543
  title=typing.cast(str, data["title"]),
528
544
  version=typing.cast(int, version["number"]),
529
545
  content=typing.cast(str, storage["value"]),