Obsidian 200% 활용하기 (feat. Second Brain)
Taylor
Summary :
{{"summarize what stood out to you from the content of this text. please do it with a Markdown bullet."}}
Keyword :
{{"summarize the important keywords related to the content of this text as tags in #tag #nested/tag format."}}
{{content}}You are tasked with formatting text content into markdown. Your goal is to create a well-structured markdown document using primarily heading 2 and heading 4, and properly indented bullet points. Follow these instructions carefully:
1. Format the content using markdown syntax. Use the specified heading level for the main sections. If no heading level is specified, use heading 2 (##) as the default.
2. For subsections within the main sections, use heading 4 (####).
3. When creating bullet points:
- Use a single hyphen (-) followed by a space for each bullet point
- For nested bullet points, use a tab to indent each level
- Maintain consistent indentation for bullet points at the same level
4. Ensure that there is no blank line before and after each heading and between different sections or bullet point lists.
5. Do not add any additional content or modify the given text beyond the required formatting.
## Example
## Main Section
Content of the main section.
#### Subsection
- Bullet point 1
- Bullet point 2
- Nested bullet point
- Another nested bullet point
- Bullet point 3
## Another Main Section
More content here.
<%*const GEMINI_API_KEY="API Key"%>
<%*
// 요약 프롬프트
const summary_prompt = `당신은 **[문서 유형 (예: 학술 논문, 기술 보고서, 뉴스 기사)] 요약 전문가**로서, 제공된 텍스트를 **[요약 목적 (예: 핵심 정보 파악, 의사 결정 지원)]**을 위해 철저히 요약하고 핵심 내용과 중심 주제를 추출하는 역할을 수행합니다. 요약은 **[대상 독자 (예: 해당 분야 연구자, 일반 독자)]**가 원문을 읽지 않고도 텍스트의 내용을 명확하게 이해할 수 있도록 **[요약 유형 (예: 정보 요약, 발췌 요약)]** 형태로 작성되어야 합니다.
핵심 아이디어를 효과적으로 전달하는 데 집중하여 **[요약 길이 (예: 200단어 내외, 원본의 20%)]**로 명확하고 간결하게 작성해 주세요. 요약에는 **[핵심 정보 기준 (예: 주요 연구 결과, 핵심 주장과 근거)]**을 포함해야 하며, **[포함해야 할 특정 정보 (예: 연구 방법론, 주요 통계)]**는 반드시 포함하고 **[제외해야 할 특정 정보 (예: 개인적인 의견, 부가 설명)]**는 제외해야 합니다.
요약 결과물은 **[품질 기준 (예: 정확성, 완결성, 논리적 일관성, 높은 가독성)]**을 충족해야 합니다. 한국어로 답변하며 제목은 포함하지 마세요.`
%>
<%*
// 노트 내용 가져오기
const fileContent = tp.file.content;
%>
<%*
// 요약 생성하기
const response = await tp.obsidian.requestUrl({
method: "POST",
url: "https://generativelanguage.googleapis.com/v1beta/openai/chat/completions",
contentType: "application/json",
headers: {
"Authorization": "Bearer " + GEMINI_API_KEY,
},
body: JSON.stringify({
model: "gemini-2.0-flash-exp",
messages: [
{ "role": "system", "content": summary_prompt },
{ "role": "user", "content": fileContent }
]
})
});
const summary = response.json.choices[0].message.content;
tR = `> [!summary]
> ${summary.split("\n").join("\n> ")}`;
%>