← 전체로 돌아가기
프로젝트 메모 web -home-son-prj-notion

notion-source-ids

포트폴리오 사이트용 Notion DB ID랑 데이터 추출 로직 정리

notionportfoliopythonrest-api

SSW Notion portfolio reproduction source ids

Profile page id 875bf305-254d-4271-a9ec-cca18e72c646

All Projects (한글) DB - data_source: d026bef0-6d20-4ec2-bb3b-ef3a25cae806 - database: bb0ce266-9024-4292-9d60-a02ff93ba1a8

Eng 버전이나 stale한 건 무시하고 한글 DB만 쓰면 됨.

DB schema props - 이름(title), Status(status), Date, Summary(rich_text), Type(select), Client(rich_text), Skill & Library(multi_select)

Content re-sync flow 1. DB re-query & page blocks re-fetch 2. js/data/profile.js & js/data/projects.js 업데이트

Detail extraction (notion_extract.py) MCP tool은 S3 URL 때문에 토큰 너무 많이 먹어서 직접 REST API 호출함.

  • Notion token: ~/.claude.jsonmcpServers.notion.env.NOTION_TOKEN에 있음
  • Process:
  • notion_extract.py (+ slugs.py) 실행
  • fe/js/data/details/<slug>.json 생성 (normalized block model)
  • 이미지 다운로드 -> fe/assets/img/projects/<slug>/NN.png
  • extract/optimize_images.py로 이미지 리사이징 (Pillow 사용, 1280px 이하로 굽기)

Client-side rendering js/notion/{richtext,blocks,render}.js 사용해서 project.html?id=<slug>에서 뿌려줌.

여기서 배울 것

  1. MCP tool은 토큰 소모 심해서 직접 API 호출하는 게 나음
  2. 이미지는 그냥 쓰면 무거우니까 Pillow로 리사이징해서 굽기
  3. Notion DB ID랑 data_source ID 구분해서 관리해야 꼬이지 않음
원본 파일 보기 (.claude/projects/-home-son-prj-notion/memory/notion-source-ids.md)
---
name: notion-source-ids
description: Notion page/data-source IDs for the SSW Notion portfolio reproduction
metadata: 
  node_type: memory
  type: reference
  originSessionId: 066633f9-0c35-4e25-a5a5-084b3eb783e5
---

Source of the dev.ericfromkorea.com portfolio reproduction (workspace: **SSW Notion**, MCP bot "aoo"):

- Profile page **🙋‍♂️개발자 손승우입니다.** — page id `875bf305-254d-4271-a9ec-cca18e72c646`
- **All Projects (한글)** DB — data_source `d026bef0-6d20-4ec2-bb3b-ef3a25cae806`, database `bb0ce266-9024-4292-9d60-a02ff93ba1a8`. This is the active one (linked from the profile page); there are also stale "All Projects (Eng)" and "All Projects" data sources — ignore those.

DB schema props: 이름(title), Status(status: Not started/In progress/Done), Date, Summary(rich_text), Type(select: Main/Optional/Hidden), Client(rich_text), Skill & Library(multi_select). Profile preview shows non-Hidden projects; projects.html shows all with filters.

To re-sync content, re-query the DB and re-fetch the page blocks, then update `js/data/profile.js` and `js/data/projects.js`. See [[dev-portfolio-deploy]].

**Detail bodies**: each project's inner Notion blocks are extracted by `/home/son/prj/dev_portfolio/extract/notion_extract.py` (+ `slugs.py` mapping slug→page-id) calling the Notion REST API directly — the MCP tool returns are too token-heavy (S3 signed URLs bloat each block). The Notion integration token lives in `~/.claude.json` under `mcpServers.notion.env.NOTION_TOKEN` (`ntn_...`); pass it as `NOTION_TOKEN` env. Output: one `fe/js/data/details/<slug>.json` per project (normalized block model) + images downloaded to `fe/assets/img/projects/<slug>/NN.png`, then `extract/optimize_images.py` (Pillow) resizes to ≤1280px. Rendered client-side by `js/notion/{richtext,blocks,render}.js` on `project.html?id=<slug>`.