ssb-pubmd 0.1.0__py3-none-any.whl → 0.1.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.
- ssb_pubmd/__init__.py +4 -0
- ssb_pubmd/__main__.py +2 -13
- ssb_pubmd/adapters/content_parser.py +185 -0
- ssb_pubmd/adapters/document_processor.py +149 -0
- ssb_pubmd/adapters/publish_client.py +117 -0
- ssb_pubmd/adapters/storage.py +42 -0
- ssb_pubmd/cli.py +102 -0
- ssb_pubmd/config.py +27 -17
- ssb_pubmd/domain/document_publisher.py +46 -0
- ssb_pubmd/notebook_client.py +133 -0
- ssb_pubmd/templates/__init__.py +0 -0
- ssb_pubmd/templates/template.qmd +138 -0
- {ssb_pubmd-0.1.0.dist-info → ssb_pubmd-0.1.2.dist-info}/METADATA +8 -5
- ssb_pubmd-0.1.2.dist-info/RECORD +18 -0
- ssb_pubmd/adapters/cli.py +0 -21
- ssb_pubmd/adapters/cms_client.py +0 -47
- ssb_pubmd/adapters/local_storage.py +0 -72
- ssb_pubmd/adapters/secret_manager_client.py +0 -66
- ssb_pubmd/enonic_cms_manager.py +0 -30
- ssb_pubmd/models.py +0 -28
- ssb_pubmd/ports.py +0 -57
- ssb_pubmd-0.1.0.dist-info/RECORD +0 -15
- {ssb_pubmd-0.1.0.dist-info → ssb_pubmd-0.1.2.dist-info}/LICENSE +0 -0
- {ssb_pubmd-0.1.0.dist-info → ssb_pubmd-0.1.2.dist-info}/WHEEL +0 -0
- {ssb_pubmd-0.1.0.dist-info → ssb_pubmd-0.1.2.dist-info}/entry_points.txt +0 -0
ssb_pubmd/ports.py
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
from pathlib import Path
|
|
2
|
-
from typing import Protocol
|
|
3
|
-
|
|
4
|
-
from ssb_pubmd.models import CmsResponse
|
|
5
|
-
from ssb_pubmd.models import Content
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class CmsManager(Protocol):
|
|
9
|
-
"""An interface (primary port) for managing a CMS.
|
|
10
|
-
|
|
11
|
-
An implementing class is tailored to a specific CMS application.
|
|
12
|
-
"""
|
|
13
|
-
|
|
14
|
-
def sync(self, content_file_path: str) -> str:
|
|
15
|
-
"""Requests that the CMS stores and renders the given content file.
|
|
16
|
-
|
|
17
|
-
:param content_file_path: The path to the content file to be rendered.
|
|
18
|
-
:return: A URL to the rendered preview.
|
|
19
|
-
"""
|
|
20
|
-
...
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
class CmsClient(Protocol):
|
|
24
|
-
"""An interface (secondary port) for communicating with a CMS.
|
|
25
|
-
|
|
26
|
-
An implementing class is tailored to a specific CMS, with its specific exposed services and token authentication flow.
|
|
27
|
-
"""
|
|
28
|
-
|
|
29
|
-
def send(self, token: str, content: Content) -> CmsResponse: ...
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
class ContentFileHandler(Protocol):
|
|
33
|
-
"""An interface (secondary port) for handling content files, including extraction and handling of metadata."""
|
|
34
|
-
|
|
35
|
-
def get_file_id(self, file_path: Path) -> str:
|
|
36
|
-
"""
|
|
37
|
-
Returns the id of a given file path.
|
|
38
|
-
If no id is registered for the given file path,
|
|
39
|
-
it returns an empty string.
|
|
40
|
-
"""
|
|
41
|
-
...
|
|
42
|
-
|
|
43
|
-
def set_file_id(self, file_path: Path, content_id: str) -> None:
|
|
44
|
-
"""Sets the id of a given file path."""
|
|
45
|
-
...
|
|
46
|
-
|
|
47
|
-
def get_content(self, file_path: Path) -> Content:
|
|
48
|
-
"""
|
|
49
|
-
Extracts the content of a given file.
|
|
50
|
-
"""
|
|
51
|
-
...
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
class SecretManagerClient(Protocol):
|
|
55
|
-
"""An interface (secondary port) for communicating with a secret manager and generating tokens."""
|
|
56
|
-
|
|
57
|
-
def generate_token(self) -> str: ...
|
ssb_pubmd-0.1.0.dist-info/RECORD
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
ssb_pubmd/__main__.py,sha256=rjxFBSqNHykkGrEfY6t9e1gZfv2vksjsT3YJSjOvNlc,816
|
|
2
|
-
ssb_pubmd/adapters/cli.py,sha256=DO5HVGUH2FEZDoLpJs-kUCln1D6uapHVXQfeaIoQHGg,627
|
|
3
|
-
ssb_pubmd/adapters/cms_client.py,sha256=vPA2xhffb4ubDr9_9qMN4MuNp2gg2SLjOVoZAnWgo2o,1699
|
|
4
|
-
ssb_pubmd/adapters/local_storage.py,sha256=3LPWRlmQSdlDhmU23yBD33x13HWKjYuvKfg2i8Ghh0A,2595
|
|
5
|
-
ssb_pubmd/adapters/secret_manager_client.py,sha256=fmFUiWzt9Ajvn5dYswFdh23JV7_zkDM15tunSfaHCXM,1839
|
|
6
|
-
ssb_pubmd/config.py,sha256=ZSynxkTY4s-qUKG6DO_Ss_txGjtB20um46hV1pbEndw,838
|
|
7
|
-
ssb_pubmd/enonic_cms_manager.py,sha256=lNYTkydPXkYvXhVQZcOqzy4J8iKQTPVEgTS72ZnqcW0,1264
|
|
8
|
-
ssb_pubmd/models.py,sha256=Lbi5qaEbJhOl3Cp9Fx2-ie74o3J4ptodLasPyuBGyFM,626
|
|
9
|
-
ssb_pubmd/ports.py,sha256=sTZ06jVrUy_fk0G3yeduo13nmXa9ZiXyts_UVBNUFow,1703
|
|
10
|
-
ssb_pubmd/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
-
ssb_pubmd-0.1.0.dist-info/LICENSE,sha256=tF5bnYv09fgH5ph9t1EpH1MGrVOGTQeswL4dzVeZ_ak,1073
|
|
12
|
-
ssb_pubmd-0.1.0.dist-info/METADATA,sha256=YYgpiyNdhQCXAZFa1TUbPuqCpRRTL7XSbYYSWbmyvfA,3996
|
|
13
|
-
ssb_pubmd-0.1.0.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
|
14
|
-
ssb_pubmd-0.1.0.dist-info/entry_points.txt,sha256=o4oU99zbZNIBKGYWdgdEG6ev-62ZRWEJOe7EOjJaajk,53
|
|
15
|
-
ssb_pubmd-0.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|