Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "python-catalyst"
version = "0.1.4"
version = "0.1.5"
description = "Python client for the PRODAFT CATALYST API"
readme = "README.md"
license = { file = "LICENSE" }
Expand Down
2 changes: 1 addition & 1 deletion python_catalyst/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""PRODAFT CATALYST API client package."""

__version__ = "0.1.0"
__version__ = "0.1.5"

from .client import CatalystClient
from .enums import ObservableType, PostCategory, TLPLevel
Expand Down
20 changes: 12 additions & 8 deletions python_catalyst/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ def create_report_from_member_content_with_references(
published_on = content.get("published_on", content.get("published_date"))
modified = content.get("updated_date", content.get("updated_on"))
content_id = content.get("id")
slug = content.get("slug", "")
slug = content.get("slug", "") # noqa: F841
tlp = content.get("tlp", TLPLevel.CLEAR.value)
self.converter = self.get_stix_converter(tlp)

Expand Down Expand Up @@ -695,17 +695,21 @@ def create_report_from_member_content_with_references(
)

# Get detailed content and create report
detailed_content = (
self.get_member_content(content_id)
if self.catalyst_authenticated
else self.get_member_content(slug)
)
content = detailed_content.get("content", "")
# For now, the summary will be used instead of detailed content.
# detailed_content = (
# self.get_member_content(content_id)
# if self.catalyst_authenticated
# else self.get_member_content(slug)
# )
# content = detailed_content.get("content", "")
content = summary or description
post_url = f"https://catalyst.prodaft.com/report/{content_id}" # noqa: E231
content += f"\n Access the full content at: {post_url}"

report = self.converter.create_report(
content_id=content_id,
title=title,
description=content or summary or description,
description=content,
published=published,
modified=modified,
object_refs=collected_object_refs,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="python-catalyst",
version="0.1.4",
version="0.1.5",
description="Python client for the PRODAFT CATALYST API",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down