Skip to content

About

knowlege-base-for-Insty-Marketing

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

38 Commits

Folders and files

Repository files navigation

Insty Marketing Pipeline

YouTube μ½˜ν…μΈ  발꡴ β†’ Instagram Reels 슀크립트 μžλ™ 생성 νŒŒμ΄ν”„λΌμΈ.

νƒ€κ²Ÿ 페λ₯΄μ†Œλ‚˜(AI-powered solopreneur)에 λ§žλŠ” YouTube μ˜μƒμ„ μžλ™μœΌλ‘œ μ°Ύκ³ , μžλ§‰μ„ μΆ”μΆœν•œ λ’€, AI(Gemini)둜 Reels 슀크립트λ₯Ό μƒμ„±ν•˜μ—¬ Notion DB + CSV에 μ €μž₯ν•©λ‹ˆλ‹€.

ν‚€μ›Œλ“œ 생성 (페λ₯΄μ†Œλ‚˜ β†’ Gemini)
  β†’ YouTube 검색 (Data API v3)
  β†’ 필터링 + μŠ€μ½”μ–΄λ§ (쑰회수/μ’‹μ•„μš”/λŒ“κΈ€/μ΅œμ‹ μ„±)
  β†’ μžλ§‰ μΆ”μΆœ (youtube-transcript-api)
  β†’ Reels 슀크립트 생성 (Gemini 2.5 Flash)
  β†’ Notion DB μ €μž₯ + CSV λ°±μ—…

사전 μ€€λΉ„

1. Docker Desktop μ„€μΉ˜

OS μ„€μΉ˜ 방법
Windows Docker Desktop for Windows λ‹€μš΄λ‘œλ“œ β†’ μ„€μΉ˜ β†’ μž¬λΆ€νŒ…
Ubuntu sudo apt install docker.io docker-compose-v2
Mac Docker Desktop for Mac

Windows μ°Έκ³ : Docker Desktop μ„€μΉ˜ μ‹œ WSL 2 λ°±μ—”λ“œλ₯Ό μ‚¬μš©ν•©λ‹ˆλ‹€. μ„€μΉ˜ κ³Όμ •μ—μ„œ WSL 2 ν™œμ„±ν™”λ₯Ό μ•ˆλ‚΄ν•˜λ©΄ κ·ΈλŒ€λ‘œ λ”°λΌν•˜μ„Έμš”.

μ„€μΉ˜ 확인:

docker --version        # Docker version 2x.x.x
docker compose version  # Docker Compose version v2.x.x

2. ν”„λ‘œμ νŠΈ 클둠

git clone https://github.com/Insty-team/Insty-Marketing.git
cd Insty-Marketing

3. API ν‚€ λ°œκΈ‰ (λͺ¨λ‘ 무료)

YouTube Data API Key

  1. Google Cloud Console 접속
  2. μƒˆ ν”„λ‘œμ νŠΈ 생성 (λ˜λŠ” κΈ°μ‘΄ ν”„λ‘œμ νŠΈ 선택)
  3. API 및 μ„œλΉ„μŠ€ β†’ 라이브러리 β†’ "YouTube Data API v3" 검색 β†’ μ‚¬μš© μ„€μ •
  4. API 및 μ„œλΉ„μŠ€ β†’ μ‚¬μš©μž 인증 정보 β†’ μ‚¬μš©μž 인증 정보 λ§Œλ“€κΈ° β†’ API ν‚€
  5. μƒμ„±λœ ν‚€ 볡사

무료 ν• λ‹ΉλŸ‰: 일 10,000 units. νŒŒμ΄ν”„λΌμΈ 1회 μ‹€ν–‰ β‰ˆ 300 units.

Gemini API Key

  1. Google AI Studio 접속
  2. API ν‚€ λ§Œλ“€κΈ° 클릭
  3. μƒμ„±λœ ν‚€ 볡사

무료 ν• λ‹ΉλŸ‰: Gemini 2.5 Flash κΈ°μ€€ 일 500 RPD.

Notion Integration Token

  1. Notion Integrations 접속
  2. μƒˆ 톡합 λ§Œλ“€κΈ° β†’ 이름 μž…λ ₯ β†’ μ›Œν¬μŠ€νŽ˜μ΄μŠ€ 선택 β†’ 제좜
  3. λ‚΄λΆ€ 톡합 μ‹œν¬λ¦Ώ 볡사
  4. (μ€‘μš”) Notionμ—μ„œ Content Pipeline DB νŽ˜μ΄μ§€ μ—΄κΈ° β†’ 우츑 상단 Β·Β·Β· β†’ μ—°κ²° β†’ λ§Œλ“  톡합 μΆ”κ°€

4. ν™˜κ²½λ³€μˆ˜ μ„€μ •

ν”„λ‘œμ νŠΈ λ£¨νŠΈμ— .env νŒŒμΌμ„ μƒμ„±ν•©λ‹ˆλ‹€.

Windows (PowerShell):

Copy-Item .env.example .env
notepad .env

Linux / Mac:

cp .env.example .env
nano .env

.env λ‚΄μš©:

YOUTUBE_API_KEY=λ°œκΈ‰λ°›μ€_YouTube_API_ν‚€
GEMINI_API_KEY=λ°œκΈ‰λ°›μ€_Gemini_API_ν‚€
NOTION_TOKEN=λ°œκΈ‰λ°›μ€_Notion_Integration_Token
NOTION_DB_ID=Notion_DB_ID
AI_BACKEND=gemini

NOTION_DB_IDλŠ” Notion DB URLμ—μ„œ μΆ”μΆœν•©λ‹ˆλ‹€. https://notion.so/xxxxx?v=... β†’ xxxxx λΆ€λΆ„ (32자리 hex)


μ‹€ν–‰ 방법 (Docker β€” Windows/Ubuntu/Mac 곡톡)

이미지 λΉŒλ“œ (졜초 1회, μ½”λ“œ λ³€κ²½ μ‹œ)

docker compose build

μˆ˜λ™ μ‹€ν–‰

# 전체 νŒŒμ΄ν”„λΌμΈ (발꡴ β†’ μžλ§‰ β†’ 슀크립트 β†’ μ €μž₯)
docker compose run --rm pipeline manual

# μ½˜μ…‰νŠΈ μ§€μ •
docker compose run --rm pipeline manual --concept tutorial
docker compose run --rm pipeline manual --concept numbered_tips
docker compose run --rm pipeline manual --concept numbered_lessons

# μΉ΄ν…Œκ³ λ¦¬ μ§€μ • + μ΅œλŒ€ μ˜μƒ 수
docker compose run --rm pipeline manual --category ai_tools --max-videos 3

# μ£Όκ°„ 10개 λͺ¨λ“œ (talking head 5개 + numbered 5개)
docker compose run --rm pipeline weekly

단일 μŠ€ν… μ‹€ν–‰

docker compose run --rm pipeline discovery   # μ˜μƒ 발꡴만
docker compose run --rm pipeline keywords    # ν‚€μ›Œλ“œ κ°±μ‹ 

μžλ™ μ‹€ν–‰ (크둠 λͺ¨λ“œ β€” μΌœλ‘λ©΄ μžλ™μœΌλ‘œ λŒμ•„κ°)

# λ°±κ·ΈλΌμš΄λ“œ μ‹œμž‘ (μ›”/수/금 09:00 KST μžλ™ μ‹€ν–‰)
docker compose up -d

# μ‹€ν–‰ μƒνƒœ 확인
docker compose ps

# 둜그 μ‹€μ‹œκ°„ 확인
docker compose logs -f

# 쀑지
docker compose down

κ²°κ³Όλ¬Ό 확인

μ‹€ν–‰ κ²°κ³ΌλŠ” output/ 폴더에 μ €μž₯λ©λ‹ˆλ‹€ (Docker λ³Όλ₯¨μœΌλ‘œ ν˜ΈμŠ€νŠΈμ™€ 곡유):

output/
  csv/    ← 발꡴/처리 κ²°κ³Ό CSV (λ‚ μ§œλ³„)
  logs/   ← μ‹€ν–‰ 둜그

Notion DB에도 μžλ™ μ €μž₯λ©λ‹ˆλ‹€ (integration μ—°κ²° ν•„μˆ˜).


μ‹€ν–‰ 방법 (둜컬 Python β€” Docker 없이)

Docker 없이 Python으둜 직접 μ‹€ν–‰ν•  μˆ˜λ„ μžˆμŠ΅λ‹ˆλ‹€.

# Python 3.10+ ν•„μš”
pip install -r requirements.txt

# ν‚€μ›Œλ“œ 생성 (졜초 1회)
python -m scripts.run_keyword_refresh

# 전체 νŒŒμ΄ν”„λΌμΈ
python -m scripts.run_pipeline

# μ½˜μ…‰νŠΈ μ§€μ •
python -m scripts.run_pipeline --concept numbered_tips

# μ£Όκ°„ 10개 λͺ¨λ“œ
python -m scripts.run_pipeline --mode all

# μ˜μƒ 발꡴만
python -m scripts.run_discovery

# νŠΉμ • μ˜μƒ 슀크립트 생성
python -m scripts.run_script_gen "https://www.youtube.com/watch?v=VIDEO_ID"

Windowsμ—μ„œλŠ” python3 λŒ€μ‹  python을 μ‚¬μš©ν•©λ‹ˆλ‹€.


슀크립트 μ½˜μ…‰νŠΈ

Talking Head (직접 λ§ν•˜κΈ°)

μ½˜μ…‰νŠΈ ꡬ쑰 μš©λ„
tutorial Hook β†’ Why β†’ How β†’ Summary β†’ CTA 도ꡬ νŠœν† λ¦¬μ–Ό, κ°€μ΄λ“œ
tips Hook β†’ Why β†’ Tip1 β†’ Tip2 β†’ Tip3 β†’ CTA 팁 λͺ¨μŒ, 비ꡐ
celebrity Hook β†’ Why β†’ Lesson β†’ Application β†’ CTA 인터뷰, κ°•μ—°

Numbered (μžλ§‰ + B-roll + μŒμ•…)

μ½˜μ…‰νŠΈ ꡬ쑰 μš©λ„
numbered_tips Hook β†’ 4-7 numbered items β†’ CTA 도ꡬ 비ꡐ, κΏ€νŒ
numbered_lessons Hook β†’ 3-5 numbered lessons β†’ CTA 유λͺ…인 μΈμ‚¬μ΄νŠΈ

Numbered 포맷: λ§ν•˜κΈ° 없이 ν…μŠ€νŠΈ μ˜€λ²„λ ˆμ΄ + μž‘μ—…/이동 B-roll + λ°°κ²½ μŒμ•…μœΌλ‘œ μ œμž‘. 촬영 μ‹œκ°„ λŒ€ν­ μ ˆμ•½!


νŒŒμ΄ν”„λΌμΈ λͺ¨λ“œ

λͺ¨λ“œ Docker λͺ…λ Ή μ„€λͺ…
단일 μ½˜μ…‰νŠΈ manual --concept tutorial 1개 μ½˜μ…‰νŠΈλ‘œλ§Œ 생성
talking manual --mode talking talking head 3μ’…μœΌλ‘œ 생성
numbered manual --mode numbered numbered 2μ’…μœΌλ‘œ 생성
전체 (μ£Όκ°„) weekly 5μ’… μ½˜μ…‰νŠΈ λͺ¨λ‘ (μ£Ό 10개 λͺ©ν‘œ)

ν”„λ‘œμ νŠΈ ꡬ쑰

config/
  settings.py                  β€” ν™˜κ²½λ³€μˆ˜, ν•„ν„° μ„€μ •, μŠ€μ½”μ–΄λ§ κ°€μ€‘μΉ˜
  keywords.py                  β€” κ²€μ¦λœ 검색 ν‚€μ›Œλ“œ (μΉ΄ν…Œκ³ λ¦¬λ³„)
src/
  youtube_discovery.py         β€” YouTube API 검색 + 필터링 + μŠ€μ½”μ–΄λ§
  transcript_extractor.py      β€” μžλ§‰ μΆ”μΆœ (νƒ€μž„μŠ€νƒ¬ν”„ 포함)
  keyword_generator.py         β€” 페λ₯΄μ†Œλ‚˜ 기반 ν‚€μ›Œλ“œ μžλ™ 생성 (Gemini)
  keyword_validator.py         β€” ν‚€μ›Œλ“œ YouTube 검증
  script_generator.py          β€” Reels 슀크립트 생성 (Gemini)
  notion_writer.py             β€” Notion DB μ €μž₯ + 쀑볡 체크
  csv_backup.py                β€” CSV λ°±μ—…
scripts/
  run_pipeline.py              β€” 전체 νŒŒμ΄ν”„λΌμΈ
  run_discovery.py             β€” μ˜μƒ 발꡴ 단독 μ‹€ν–‰
  run_script_gen.py            β€” 슀크립트 생성 단독 μ‹€ν–‰
  run_keyword_refresh.py       β€” ν‚€μ›Œλ“œ κ°±μ‹ 
  entrypoint.sh                β€” Docker μ—”νŠΈλ¦¬ν¬μΈνŠΈ
prompts/
  reels_tutorial.txt           β€” νŠœν† λ¦¬μ–Ό (talking head)
  reels_tips.txt               β€” 팁 리슀트 (talking head)
  reels_celebrity.txt          β€” 유λͺ…인 레슨 (talking head)
  reels_numbered_tips.txt      β€” λ„˜λ²„λ§ 팁 (μžλ§‰ + μŒμ•…)
  reels_numbered_lessons.txt   β€” λ„˜λ²„λ§ 레슨 (μžλ§‰ + μŒμ•…)
output/
  csv/                         β€” CSV λ°±μ—…
  logs/                        β€” μ‹€ν–‰ 둜그

필터링 κΈ°μ€€

  • 쑰회수 β‰₯ 5,000
  • μ˜μƒ 길이 4~40λΆ„
  • 졜근 6κ°œμ›” 이내
  • μŠ€μ½”μ–΄λ§: 쑰회수 40% + μ’‹μ•„μš” 30% + λŒ“κΈ€ 20% + μ΅œμ‹ μ„± 10%

μ›” 운영 λΉ„μš©

ν•­λͺ© λΉ„μš©
YouTube Data API $0 (일 10,000 units 무료)
youtube-transcript-api $0
Gemini API $0 (무료 tier)
Notion API $0
합계 $0/μ›”

ν…ŒμŠ€νŠΈ

# Docker
docker compose run --rm pipeline pytest tests/ -v

# 둜컬
python -m pytest tests/ -v

νŠΈλŸ¬λΈ”μŠˆνŒ…

Windowsμ—μ„œ docker compose λͺ…λ Ήμ–΄κ°€ μ•ˆ 됨

  • Docker Desktop이 μ‹€ν–‰ 쀑인지 확인 (μ‹œμŠ€ν…œ νŠΈλ ˆμ΄μ— Docker μ•„μ΄μ½˜)
  • PowerShell λ˜λŠ” CMDλ₯Ό κ΄€λ¦¬μž κΆŒν•œμœΌλ‘œ μ‹€ν–‰
  • docker compose λŒ€μ‹  docker-compose (ν•˜μ΄ν”ˆ)도 μ‹œλ„

Gemini rate limit (429 μ—λŸ¬)

  • 무료 tier 일일 ν•œλ„ 초과. 24μ‹œκ°„ ν›„ μžλ™ 리셋
  • νŒŒμ΄ν”„λΌμΈμ— μžλ™ μž¬μ‹œλ„ 둜직 λ‚΄μž₯ (3회, 25초 간격)

Notion μ €μž₯ μ‹€νŒ¨ (404 μ—λŸ¬)

  • Notion DBλ₯Ό integration에 κ³΅μœ ν–ˆλŠ”μ§€ 확인
  • DB νŽ˜μ΄μ§€ β†’ 우츑 상단 Β·Β·Β· β†’ μ—°κ²° β†’ λ§Œλ“  톡합 선택

Windowsμ—μ„œ python λͺ…λ Ήμ–΄κ°€ μ•ˆ 됨 (둜컬 μ‹€ν–‰ μ‹œ)

  • Python 곡식 μ‚¬μ΄νŠΈμ—μ„œ 3.10+ μ„€μΉ˜
  • μ„€μΉ˜ μ‹œ "Add Python to PATH" 체크 ν•„μˆ˜
  • PowerShell μž¬μ‹œμž‘ ν›„ python --version 확인

About

knowlege-base-for-Insty-Marketing

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages