feat: 그날 코디 — 무신사 인기 스냅에서 사람별 코디 선정, Claude 옷 목록 추출, Codex 참고 사진 첨부 생성(npm run card -- ootd --daily), 카드 이름표 목록 2줄 허용

This commit is contained in:
minaChoi committed 2026-10-26 10:40:21 +09:00
1 parent 5cde680cb6
commit 814e64931d
14 files changed
+506 -50

No files matched your search

+5 -4
View File
@@ -8,7 +8,7 @@ import stillNight from '../assets/intro/still-night.webp'
import type { CardData } from './data'
import { Frame, Lines } from './Frame'
import { tidy } from './text'
import { DEFAULT_STYLE, needsOuter, ootdBand, ootdOutfits, styleLabel } from './ootd'
import { DEFAULT_STYLE, dailyOutfits, needsOuter, ootdBand, ootdOutfits, styleLabel } from './ootd'
import { gakArt, gakByCode } from './gaks'
// 대주제(skin)마다 한 번 만든 배경 그림 (npm run gen-image -- tarot-bg <skin>). 없으면 민무늬 배경
@@ -60,11 +60,12 @@ const ootd: Template = {
// 예시: 17~22도 캐주얼 (Codex 그림 6장)
example: { style: 'casual', band: 'mild', theme: 'berry' },
post: (d, c) => ({
title: `오늘의 코디 · ${styleLabel(c.style)}`,
title: dailyOutfits(c) ? '오늘의 코디' : `오늘의 코디 · ${styleLabel(c.style)}`,
caption: `낮 최고 ${d.maxC}도, 20대부터 40대~까지 오늘 입을 옷을 넘겨 보세요`,
hashtags: '#날씨각 #오늘의코디 #OOTD #데일리룩 #옷차림 #코디추천 #날씨 #오늘날씨 #서울날씨 #일상',
}),
warnings: (d, c) => {
if (dailyOutfits(c)) return []
const missing = ootdOutfits(d.maxC, c.style, undefined, needsOuter(d.maxC, d.morningC)).filter((o) => !o.image)
const id = `${ootdBand(d.maxC).id}`
return missing.length
@@ -72,11 +73,11 @@ const ootd: Template = {
: []
},
slides: (d, c) =>
ootdOutfits(d.maxC, c.style, c.band, needsOuter(d.maxC, d.morningC)).map((o, i, all) => (
(dailyOutfits(c) ?? ootdOutfits(d.maxC, c.style, c.band, needsOuter(d.maxC, d.morningC))).map((o, i, all) => (
<Frame page={i} total={all.length} theme={c.theme} className="ootd" key={o.persona}>
<p className="meta">{d.dateLabel} · 오늘의 코디</p>
<h1 className="ootd-title">
<Lines text={`*${o.label}* ${styleLabel(c.style)}${c.title ? ` ${c.title}` : ''}`} />
<Lines text={`*${o.label}* ${o.style ?? styleLabel(c.style)}${c.title ? ` ${c.title}` : ''}`} />
</h1>
<div className="ootd-stage">
{o.image ? (