feat: add English vocab extraction and Anki card registration
- core/vocab.py: extract B1-B2 level vocabulary from English content via Gemini Flash - core/anki.py: register vocab cards to AnkiConnect (English::Vocabulary deck) - core/enricher.py: add language detection field + summary_ko (Korean summary) - core/obsidian.py: render Korean + English summary in note - daemon/worker.py: call vocab extraction and Anki registration for English content
This commit is contained in:
@@ -22,18 +22,20 @@ def save_note(
|
||||
source_url: str = "",
|
||||
author: str = "",
|
||||
date: str = "",
|
||||
summary_ko: str = "",
|
||||
) -> Path:
|
||||
"""Save a processed knowledge item as an Obsidian markdown file.
|
||||
|
||||
Args:
|
||||
content_type: One of 'youtube', 'url', 'text'.
|
||||
title: The note title.
|
||||
summary: LLM-generated summary.
|
||||
summary: LLM-generated summary in English.
|
||||
body: Full content text.
|
||||
tags: List of topic tags.
|
||||
source_url: Original URL (empty for plain text).
|
||||
author: Author name (may be empty).
|
||||
date: Publication date in ISO 8601 format (may be empty).
|
||||
summary_ko: Korean translation of the summary (may be empty).
|
||||
|
||||
Returns:
|
||||
Path of the created markdown file.
|
||||
@@ -59,6 +61,8 @@ def save_note(
|
||||
# Build YAML frontmatter tags
|
||||
tags_yaml = ", ".join(tags) if tags else ""
|
||||
|
||||
summary_section = f"## 요약\n{summary_ko}\n\n*(English)*\n{summary}" if summary_ko else f"## 요약\n{summary}"
|
||||
|
||||
content = f"""---
|
||||
title: {title}
|
||||
source_type: {content_type}
|
||||
@@ -71,8 +75,7 @@ created: {today}
|
||||
|
||||
# {title}
|
||||
|
||||
## 요약
|
||||
{summary}
|
||||
{summary_section}
|
||||
|
||||
## 원문
|
||||
{body}
|
||||
|
||||
Reference in New Issue
Block a user