Also use AI for the content
This commit is contained in:
8
main.py
8
main.py
@@ -23,7 +23,7 @@ from extractors.blog_extractor import BlogExtractor
|
||||
from extractors.instagram_extractor import InstagramExtractor
|
||||
from obsidian_writer import ObsidianWriter
|
||||
from config import Config
|
||||
from summarizer import summarize_text, SummarizationError
|
||||
from summarizer import summarize_text, SummarizationError, format_markdown_content
|
||||
|
||||
|
||||
def detect_source_type(url: str) -> str:
|
||||
@@ -103,6 +103,12 @@ def main():
|
||||
print("❌ No content could be extracted")
|
||||
sys.exit(1)
|
||||
|
||||
if content.get("content"):
|
||||
try:
|
||||
content["content"] = format_markdown_content(content["content"])
|
||||
except SummarizationError as e:
|
||||
print(f"⚠️ Content formatting failed: {e}")
|
||||
|
||||
# Generate AI summary + key points
|
||||
if args.summarize or Config.GENERATE_SUMMARY:
|
||||
source_text = "\n\n".join(
|
||||
|
||||
Reference in New Issue
Block a user