Skip to content

Commit 582e3ec

Browse files
change description to summary (#6)
* change description to summary * add post url to summary
1 parent d05ee02 commit 582e3ec

4 files changed

Lines changed: 15 additions & 11 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "python-catalyst"
3-
version = "0.1.4"
3+
version = "0.1.5"
44
description = "Python client for the PRODAFT CATALYST API"
55
readme = "README.md"
66
license = { file = "LICENSE" }

python_catalyst/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""PRODAFT CATALYST API client package."""
22

3-
__version__ = "0.1.0"
3+
__version__ = "0.1.5"
44

55
from .client import CatalystClient
66
from .enums import ObservableType, PostCategory, TLPLevel

python_catalyst/client.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ def create_report_from_member_content_with_references(
526526
published_on = content.get("published_on", content.get("published_date"))
527527
modified = content.get("updated_date", content.get("updated_on"))
528528
content_id = content.get("id")
529-
slug = content.get("slug", "")
529+
slug = content.get("slug", "") # noqa: F841
530530
tlp = content.get("tlp", TLPLevel.CLEAR.value)
531531
self.converter = self.get_stix_converter(tlp)
532532

@@ -695,17 +695,21 @@ def create_report_from_member_content_with_references(
695695
)
696696

697697
# Get detailed content and create report
698-
detailed_content = (
699-
self.get_member_content(content_id)
700-
if self.catalyst_authenticated
701-
else self.get_member_content(slug)
702-
)
703-
content = detailed_content.get("content", "")
698+
# For now, the summary will be used instead of detailed content.
699+
# detailed_content = (
700+
# self.get_member_content(content_id)
701+
# if self.catalyst_authenticated
702+
# else self.get_member_content(slug)
703+
# )
704+
# content = detailed_content.get("content", "")
705+
content = summary or description
706+
post_url = f"https://catalyst.prodaft.com/report/{content_id}" # noqa: E231
707+
content += f"\n Access the full content at: {post_url}"
704708

705709
report = self.converter.create_report(
706710
content_id=content_id,
707711
title=title,
708-
description=content or summary or description,
712+
description=content,
709713
published=published,
710714
modified=modified,
711715
object_refs=collected_object_refs,

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setup(
77
name="python-catalyst",
8-
version="0.1.4",
8+
version="0.1.5",
99
description="Python client for the PRODAFT CATALYST API",
1010
long_description=long_description,
1111
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)