feat: 项目更名为张三,笔记规范升级
- 项目名:nerd-Brain/呆脑子 -> 张三 - 笔记规范:每次记录强制带时间戳 [YYYY-MM-DD HH:MM] - 标签更新:#memory/zhang-san - 同步 anchor_writer.py 时间戳功能
This commit is contained in:
@@ -48,9 +48,10 @@ def call_model(content):
|
||||
prompt = f"""Analyze this text. Output ONLY a valid JSON object. No markdown, no explanation.
|
||||
Keys:
|
||||
- summary (max 50 words, append URLs if external resources/GitHub mentioned)
|
||||
- tags (list of EXACTLY 2 strings, format '#Category/ProjectName', e.g., ['#memory/nerd-brain', '#llm/local-deploy'])
|
||||
- tags (list of EXACTLY 2 strings, format '#Category/ProjectName', e.g., ['#memory/zhang-san', '#llm/local-deploy'])
|
||||
- valence (-1.0 to 1.0)
|
||||
- arousal (0.0 to 1.0)
|
||||
- timestamp (current time in YYYY-MM-DD HH:MM format)
|
||||
Text: {content}"""
|
||||
|
||||
data = json.dumps({
|
||||
@@ -97,6 +98,7 @@ def save_memory(content):
|
||||
filepath = os.path.join(VAULT_DIR, filename)
|
||||
|
||||
# Construct Markdown with YAML frontmatter
|
||||
ts = meta.get('timestamp', now.strftime('%Y-%m-%d %H:%M'))
|
||||
md_content = f"""---
|
||||
title: {meta.get('summary', 'Untitled')[:30]}
|
||||
date: {now.strftime('%Y-%m-%d %H:%M')}
|
||||
@@ -109,6 +111,8 @@ status: active
|
||||
|
||||
# {meta.get('summary', 'Untitled')}
|
||||
|
||||
> 📅 {ts}
|
||||
|
||||
{content}
|
||||
"""
|
||||
with open(filepath, 'w', encoding='utf-8') as f:
|
||||
|
||||
Reference in New Issue
Block a user