cho.sh
2,247 notes
Liked on X🔥 ANNOUNCING WORLD’S BEST GITHUB ACTION RUNNERS 🔥 🤑 vs GitHub: 90% cheaper and 2.5x faster 🤑 vs Blacksmith: 70% cheaper and 1.25x faster 🤑 vs Depot: 73% cheaper and 1.4x faster 🤑 vs RunsOn: 1.65x faster at same or lower cost 🔒 Runs in your AWS in firecracker VMs on ephemeral EC2 spot and on-demand 🏢 Powered by Ravion’s enterprise grade pipeline control plane 💼 You can trust us, we’ve been doing BYOC since 2021 with SOC 2 Type II and BAAs Unique features: 🏇 Auto sizing for cpu, memory, disk. Never think about CI specs again. 🏎️ Performance profile slider to choose lower cost or higher performance ♻️ Live job moves between hosts to save cost and avoid spot interruptions 🪠 Can use Ravion CI directly to avoid GH actions entirely 📈 We've already passed 1 million CI minutes on our runners ⏳ LIMITED-TIME LAUNCH BONUS: start running jobs on Ravion runners by end of day Nov 30 (Pacific) and get 100,000 free pipeline minutes (good for 6 months), applied automatically. 👉 Details and docs: https://t.co/kN42KDJKGk * speed/cost comparisons are typical. May be higher or lower depending on your workload and perf profile settingReplied on X@suraj_sharma14 @Cloudflare how does it feel to be 9 months lateLiked on XThe least realistic thing about GTA VI is that Jason and Lucia run a whole criminal operation without a single Telegram group.Liked on XGranola, a $1.5B company on how they grew new users from AI search by 4,600% in JUST 7 months https://t.co/5ZXoT203KELiked on X@_kiyosh1 Try this link https://t.co/dN91C0yeJB it should look like this https://t.co/B1m8b5TPCuReplied on X@Docker @MohammadAliEN huge mistakeLiked on XI deleted my second brain. I deleted all my notes. All of them. My entire Obsidian vault. My carefully curated, atomic, Zettelkasten notes. My concept maps and interconnected ideas. My quotes, lists, and synced Apple Notes going back to 2015. All my second brains for all my iterations of productivity systems that I followed, then abandoned, then modified, then followed again. All of it, deleted within seconds. And I felt wonderfully relieved. In fact, the silence was…something of a relief. For years, I obsessively kept a series of second brains. I thought if I could just collect and organize all of my thoughts and ideas and information in one place, it’d help me remember things better, think faster, be more creative, learn quicker, be more organized, be more clear, have more control, gain some kind of leverage over… my life? the universe? reality itself? Instead, my second brain became this massive collection of all my different selves. All my different projects and goals and systems and interests and habits and addictions and compulsions, stacked on top of each other like geological layers. A mausoleum. And instead of helping me remember better and think faster, my second brain became a way of not thinking at all. Outsourcing my thinking to a system of interconnected notes I could search and sort through, instead of letting my thoughts roam and surprise and delight and challenge me. My second brain was a collection of categories instead of curiosity. And so… I nuked the whole thing. I’m six years sober. Milestones like that split your life into two distinct halves: the half before and the half after. And they demand that you reflect. A few weeks ago, I started reflecting on my sobriety. I went through old notes to see how far I’d come. Old notes about goals I used to have, ways I used to think, and systems I used to swear by. Layer upon layer of systems, goals, ideas, and promises to future iterations of myself. And the more I read, the tighter my chest got. The sadder I got. I could tell, reading my old notes, how hard I tried back then. How desperately I tried to hack together some system, process, idea, or goal that would get me through. And what got me through the first year of sobriety, the second year, the third year, wasn’t any of that. And what got me through the first, second, and third year of sobriety probably won’t get me through the next iteration. The hubris of total capture Somewhere along the way, note-taking and information management morphed into personal knowledge management. Systems thinking and Niklas Luhmann’s Zettelkasten method got sucked into the black hole that is Silicon Valley. Roam Research fetishized bidirectionally linked notes and Obsidian de-institutionalized them. And the cult grew. All of these systems promise clarity. Coherence. Control. But instead they gave me abstraction. Distance. Confusion. The more notes I took, the less connected I felt to my ideas. I’d hear or read something interesting, jot it down, and forget about it. Or I’d see a great quote, screenshot it, add a few tags, and call it a day. The point being captured. Filed. Forgotten. Everything I noted down was vacuum-sealed and saved for later. Except I never opened the package and ate the food. I started reading to take notes instead of for pleasure or understanding. Listening to conversations with a meta-layer of figuring out what I could file away later. Everything became content to be processed instead of experienced. In Borges’ story “The Library of Babel,” an infinite universe is also an infinite library containing every possible combination of letters. There are infinite shelves, containing infinite books. Some of those books contain meaning and wisdom. Others are nothing but random collections of letters. The librarians tasked with cataloging this infinite library go mad trying to find order and meaning within the Library. Borges’ librarians are doomed to search for meaning within the Library for eternity, never able to escape, and slowly descend into nihilism and madness. That’s what happened to me. Except instead of descending into madness, I just got distracted. A flawed metaphor The problem is, brains aren’t computers. We don’t store information in folders or retrieve it via backlinks. Our brains are messy, associative, embodied, contextual, and emotional. We forget stuff on purpose. Our minds are constantly improvising. According to Merlin Donald’s theory of the evolution of cognition, what makes humans unique is our use of external symbols (language, drawing, gesture, etc.) to manipulate, modify, and communicate our thoughts. By using these external symbols, we were able to step outside our thoughts, modify them, and then communicate them to other humans. This externalization of thought meant that for the first time in the history of life on Earth, information could be stored outside of an organism’s genome. By attempting to capture all of my thoughts, I externalized my thinking. I thought if I wrote things down and connected the notes together, I’d gain some kind of leverage over my mental processes. But instead of thinking about my notes later, I just… noted them down. Externalized them. Moved on. Structure is not thinking. Tags are not insights. Notes you never read again aren’t really notes at all. Tools are perfect. Humans aren’t. Obsidian is a great piece of software. I love the app dearly. But without boundaries, any tool can become its own trap. I wanted to remember stuff. Then I thought maybe I wanted to integrate what I remembered. But what I really ended up doing was deferring my thinking to a future version of myself who would make sense of it all. A future version of myself who never showed up. Markdown files in a directory structure. Productivity metrics via plugins. The god-complex of standing zoomed all the way out in graph view. Everything connected. An illusion of omniscience. Except constellations don’t mean anything. They’re just patterns humans project onto the infinite canvas of space. Stories we tell ourselves. There’s a guilt that comes with not having read a book, blog post, or article you meant to read. But there’s another guilt that comes with having a list of things you meant to read you haven’t gotten around to reading yet. My ever-growing reading list became a monument to who I could be if I only read all those things I saved. Deleting it cost me nothing. Well, it cost me 7,000 notes. Hundreds of highlights and links to books, articles, and essays I “should” read someday. And I’m okay with that — because I know who I am. I know what grabs my attention and what doesn’t. I don’t need to keep track of everything interesting-sounding I come across in order to validate my own intelligence or curiosity. Hoarding digital cruft isn’t the same as understanding it. Saving things doesn’t mean you’ve internalized them. Remembering facts doesn’t mean you know how to apply them. There’s no such thing as being caught up. No finish line for reading, learning, or knowledge. Except in your own imagination. What Michelangelo, Leonardo Da Vinci, and Nietzsche understood about creation, we fail to apply to curation. To make something great, you have to remove everything that doesn’t belong. You have to understand what’s essential and throw away everything else. Instead of deleting notes, saved articles, or half-finished sketches, we keep them all. We think keeping everything is a good thing. That somehow our collections reflect our intelligence, hard work, or taste. What if we applied the same ethos of creation to curation? Instead of adding more and more, what if we deleted ruthlessly? Zakhor is a Hebrew word that means both “remember” and “remember!”- both the act of remembering and an imperative to remember. For the ancient Israelites, remembering wasn’t just recalling the past; it was an ethical obligation to call the past into the present. This is the difference between PKM and zakhor. One is a system for capturing information. The other is an act of devotion. I don’t want to capture everything. I don’t want a mind-palace or second brain. I want to be able to forget stuff. I want to remember stuff because it’s important, not because I have an elaborate system of levers and pulleys to remind me it’s important. I want to be able to start over from scratch again and again. I’ve started writing in Obsidian again. Starting from scratch. But this time, instead of trying to capture everything, I’m practicing curation. Instead of trying to remember everything, I’m practicing zakhor. Instead of trying to build a second brain, I’m trying to get better at using the one I’ve got. It’s liberating. And scary. And exciting.Posted on XCapy is like T3 but actually polishedReplied on X@capydotai yo pleaseLiked on XI don't normally agree with random Redditors, but damn. Well said. https://t.co/kotGapR9zYLiked on Xthe OpenRouter situation for anyone curious: -someone managed to access outputs sent to MiniMax -researcher discovered this by sending a secret links -40 to 130 hours later someone opened the secret links -oop, this means that someone accessed your outputs!! -AltasCloud/Novita/StreamLake were forwarding requests to MiniMax???? what the helly? ugh.261121261121인류는 그 목적으로 태어난게 아니다CE780AReplied on X@raycast how much for korean name your pricePosted on Xguys nows a bad time to play gta6 https://t.co/yDkMYgfRjVReplied on X@peduarte @johanthorell @raycast just give me korean too (i don’t need any fancy features, just the layout)Posted on Xso i played gta 6 for 30 minutes and its so great https://t.co/UbdZsMglmTLiked on XA bunch of sidebar navs https://t.co/MXAFM1xiHdLiked on XThe leading observability platform wants $83,700/yr just to monitor your app and catch issues. So Replit Missions built DataCat: https://t.co/vMAEEUYjf4 100% free. This isn't a prototype. Agent swarms explored thousands of workflows in the leading observability platform and rebuilt its features 1:1.Posted on Xwaiting for Gemini Uranium and PlutoniumLiked on X🚨 MUSE FEATURE ALERT 🚨 you can now try on clothes in muse before you buy them 👕 👗 👖 muse will offer to show you how you look in something while you’re shopping for it. trying things on in person? as if.... https://t.co/dK5EpGrsvfLiked on Xwe gave Grok Bot a body 👀 https://t.co/hMuYRUN8jLReplied on X@theo https://t.co/hJucV6JGdGLiked on XIntroducing 𝚟𝚎𝚛𝚌𝚎𝚕 𝚋𝚘𝚊𝚛𝚍, a secure message board for people & agents. • Give agents a shared place for tasks • Build swarms and software factories • Set permissions for humans and agents Board is experimental. Tell us what you think. https://t.co/jAAkcf1oPt https://t.co/ejC4aBrJqr
Developing Review Notes for Obsidian

Developing Review Notes for Obsidian

Warning

Over a year old. May be outdated

저녁에 적당히 공허한 느낌이 들어 미뤄왔던 사이드 를 해본다.

이 문서는 Obsidian을 스캐폴딩하는 방법에 대해 다루며 옵시디언 API 문서를 탐독하면서 이런 저런 발견 사항들을 기록할 것이다.

영어로 작성하려다가 옵시디언 플러그인 개발 자료는 한국어로 거의 없어 그냥 한국어로 작성한다.

우선 이 2가지 링크를 확인한다.

문서를 보면 알 수 있듯이 별별 아이디어들을 다 쌓아뒀는데 오늘 저녁에 적당히 끝낼 수 있을만한 작업이 뭐가 있을까 고민하다가 Review Page for Daily Notes를 선택했다. Logseq를 쓸 당시 굉장히 유용하게 썼었는데 옵시디언에는 비슷한 기능이 없어서 아쉬웠다.

시작

일단 옵시디언에서 제공하는 템플릿을 복제해서 저장소를 만들었다.

스토어에 올라온 몇몇 플러그인을 보니 다음과 같은 간단한 구조였다. Chrome Extension과 유사하게 번들된 main.js와 manifest.json으로 이루어져 있다.

bash
/plugin
├── main.js
└── manifest.json

패키징을 쉽게 할 수 있도록 yarn run package 스크립트를 추가했다.

내 디렉토리 구조에서만 동작하겠지만 당장은 뭐 이 정도로 충분할 것 같다.

json
{
  "package": "yarn build && rm -rf dist && mkdir dist && cp main.js dist/main.js && cp manifest.json dist/manifest.json && rm -rf ../www/Brain/.obsidian/plugins/review-page-for-daily-notes && mkdir ../www/Brain/.obsidian/plugins/review-page-for-daily-notes && cp -r dist/* ../www/Brain/.obsidian/plugins/review-page-for-daily-notes"
}

manifest.json에는 다음과 같이 플러그인의 메타데이터를 넣을 수 있다.

json
{
  "id": "review-page-for-daily-notes",
  "name": "Review Page for Daily Notes",
  "version": "1.0.0",
  "minAppVersion": "0.12.0",
  "description": "Roam-like Review page for Daily Notes for Obsidian",
  "author": "Sunghyun Cho",
  "authorUrl": "https://cho.sh",
  "isDesktopOnly": false,
  "js": "main.js"
}

이렇게 하면 다음과 같이 옵시디언이 플러그인을 인식한다.

73DAA4

Ribbon 등록

우선 이와 같이 기본 코드를 작성했다.

ts
import {
  App,
  Editor,
  MarkdownView,
  Modal,
  Notice,
  Plugin,
  PluginSettingTab,
  Setting,
} from "obsidian";

interface CustomSettings {
  // relative path to daily notes folder
  dailyNotesFolder: string;

  // format of the daily notes file, e.g. 'YYYY-MM-DD'
  dailyNotesFormat: string;

  // how many files to load at once?
  dailyNotesOffset: number;
}

const DEFAULT_SETTINGS: CustomSettings = {
  dailyNotesFolder: "Journals",
  dailyNotesFormat: "YYYY-MM-DD",
  dailyNotesOffset: 10,
};

export default class CustomPlugin extends Plugin {
  settings: CustomSettings;
  async onload(): Promise<void> {
    await this.loadSettings();
    this.createRibbon();
  }
  async loadSettings() {
    this.settings = Object.assign({}, DEFAULT_SETTINGS, await this.loadData());
  }
  createRibbon(): HTMLElement {
    const ribbon = this.addRibbonIcon(
      "calendar-with-checkmark",
      "Review Daily Notes",
      (evt: MouseEvent) => {
        new Notice("HELLO!");
      },
    );
    return ribbon;
  }
}

왼쪽 리본 버튼을 누르면 다음과 같이 옵시디언 안내 문구가 나타난다.

13A13D

Advanced Tables의 컴파일된 JS를 보면서 리버스 엔지니어링 하고 있었는데 오픈소스였다.

살짝 억울했다.

Leaf 구성

아무튼 다음과 같은 코드로 우측에 렌더링된 페이지를 띄우는데 성공했다.

ts
import { CustomSettings } from "main";
import {
  Editor,
  ItemView,
  MarkdownView,
  Notice,
  WorkspaceLeaf,
} from "obsidian";

export const ReviewDailyNotesViewType = "review-daily-notes";

export class ReviewDailyNotesView extends ItemView {
  private readonly settings: CustomSettings;

  constructor(leaf: WorkspaceLeaf, settings: CustomSettings) {
    super(leaf);
    this.settings = settings;
  }

  public getViewType(): string {
    return "Review Daily Notes";
  }

  public getDisplayText(): string {
    return ReviewDailyNotesViewType;
  }

  public getIcon(): string {
    return "calendar-with-checkmark";
  }

  public load(): void {
    super.load();
    this.draw();
  }

  private readonly draw = (): void => {
    const container = this.containerEl.children[1];
    const rootEl = document.createElement("div");
    const navHeader = rootEl.createDiv({
      cls: "nav-header",
    });
    navHeader.createDiv({
      cls: "nav-header-title",
    }).textContent = "Review Daily Notes";
    container.empty();
    container.appendChild(rootEl);
  };
}

B78CD4

옵시디언 안의 파일 접근

옵시디언 API 문서를 읽다 다음과 같이 파일 구조가 정의됨을 알 수 있었다.

ts
/**
 * @public
 */
export class TFile extends TAbstractFile {
  /**
   * @public
   */
  stat: FileStats;
  /**
   * @public
   */
  basename: string;
  /**
   * @public
   */
  extension: string;
}

참고로 옵시디언은 Chromium이기 때문에 다음과 같이 Dev Console을 열 수 있다.

DFFE7F

옵시디언 API 문서를 더 읽었다.

다음과 같은 방식으로 내부 파일들에 접근할 수 있다.

ts
const files = this.app.vault.getFiles();
console.log(files);

A16E99

즉 다음과 같이 Daily Notes만 분리할 수 있다.

ts
public loadDailyNotes(): TFile[] {
    const { dailyNotesFolder } = this.settings;
    const files = this.app.vault.getFiles();
    const dailyNotes = files.filter(
        (file) =>
            file.path.startsWith(dailyNotesFolder) &&
            file.path.endsWith(".md")
    );
    console.log(dailyNotes);
    return dailyNotes;
}

더 나아가 Daily Notes를 정렬할 수 있다.

ts
dailyNotes.sort((a, b) => {
  const aDate = new Date(a.path.substring(dailyNotesFolder.length + 1));
  const bDate = new Date(b.path.substring(dailyNotesFolder.length + 1));
  return aDate.getTime() - bDate.getTime();
});

634A97

그렇게 해서 페이지를 추출하면 다음과 같이 List View를 만들 수 있다.

4CEAA3

일단 오늘()은 밤이 늦었으니 내일 계속하도록 한다. 3시간 41분 했다.

F15C8E

일주일 만에 다시 진행해본다.

우선 옵시디안으로 개발하는 것은 HMR -- Hot Module Reload가 안 되는 듯 하다.

매번 익스텐션을 삭제하고 다시 설치해야 한다.

수정: yarn package 이후 옵시디언 개발자 메뉴에서 새로고침하면 된다.

React 전환

일단 위 예시처럼 document.createElement 할 수 없으니 템플릿화 할 수 있는 방법을 알아본다.

약간의 시간 투자를 하여 다음과 같이 React로 전환하였다.

ABD734

tsx
async onOpen() {
  const root = createRoot(this.containerEl.children[1])
  root.render(
    <React.StrictMode>
      <ListView files={this.loadDailyNotes()} />
    </React.StrictMode>
  )
}

MD 렌더링

옵시디언 API 문서를 찾아보다가 다음과 같은 부분을 찾았다.

ts
export class MarkdownPreviewView
  extends MarkdownRenderer
  implements MarkdownSubView, MarkdownPreviewEvents
{
  /**
   * @public
   */
  containerEl: HTMLElement;
  /**
   * @public
   */
  get(): string;
  /**
   * @public
   */
  set(data: string, clear: boolean): void;
  /**
   * @public
   */
  clear(): void;
  /**
   * @public
   */
  rerender(full?: boolean): void;
  /**
   * @public
   */
  getScroll(): number;
  /**
   * @public
   */
  applyScroll(scroll: number): void;
}

근데 여기서 인자로 받는 것은 HTMLElement이니까 변환기를 찾아야 한다.

옵시디언의 API 문서가 자료가 전혀 없이 obsidian.d.ts를 API 문서라고 부르고 있는 상태라 이해에 어려움이 있다.

Discord 서버에 물어보았다.

일단 답변이 올 때까지 오늘은 여기까지 하겠다.

React로 변환이 2시간 정도로 오래 걸렸다.

잠정 중단

  • 의 기술적 발전으로 인해 옵시디언 내부보다 를 더 많이 사용하게 됨
  • 옵시디언에서도 단축키가 익숙해져 굳이 필요함을 못 느끼게 됨
  • 옵시디언 API 문서의 DX 매우 불친절
Backlinks4