📖 คู่มือใช้งาน 3 ระบบใหม่

AtomDekNurse · Podcast Pipeline · Search · Dashboard Updater

🎙️

Podcast Pipeline

สร้าง metadata, RSS feed, show notes อัตโนมัติ

🔧 ขั้นตอนเริ่มต้น

  1. สร้าง database — รันคำสั่ง init ครั้งแรก
  2. Import episodes — ใส่ไฟล์ markdown ที่มี script
  3. สร้าง RSS + HTML — สำหรับเผยแพร่

📝 คำสั่งที่ใช้บ่อย

# 1. สร้าง database (ทำครั้งเดียว)
cd scripts/orchestrator
python3 podcast_generator.py init
# 2. Import episodes จากไฟล์ markdown
python3 podcast_generator.py import ../../data/drafts/podcast/aged-care-knowledge-10-episodes.md
# 3. ดูรายการ episodes ทั้งหมด
python3 podcast_generator.py list
# 4. ดูรายละเอียด episode เดียว
python3 podcast_generator.py show 1
# 5. สร้าง RSS feed สำหรับ Spotify/Apple Podcasts
python3 podcast_generator.py rss
# 6. สร้างหน้า HTML podcast index
python3 podcast_generator.py index
# 7. Export metadata เป็น JSON
python3 podcast_generator.py export
# 8. ดูสถิติ podcast
python3 podcast_generator.py stats
💡 ตัวอย่างการใช้งานจริง

เขียน script 10 episodes เป็นไฟล์ .md → รัน import → ได้ RSS feed + HTML page + metadata JSON พร้อมเผยแพร่ทันที

  • Import episodes จาก markdown อัตโนมัติ
  • สร้าง chapters + show notes + tags อัตโนมัติ
  • RSS feed สำหรับ Spotify, Apple Podcasts
  • HTML podcast page พร้อมใช้
  • ตรวจจับ category + tags จากเนื้อหา
🔍

Content Search (FTS5)

ค้นหา content ทั้งหมดได้ทันที ด้วย full-text search

🔧 ขั้นตอนเริ่มต้น

  1. สร้าง index — รัน init + index ครั้งแรก
  2. ค้นหา — ใช้ search หา content ที่ต้องการ
  3. เปิด API — ถ้าต้องการให้ frontend เรียกใช้

📝 คำสั่งที่ใช้บ่อย

# 1. สร้าง FTS5 index (ทำครั้งแรก)
cd scripts/orchestrator
python3 content_search.py init
python3 content_search.py index
# 2. ค้นหา content
python3 content_search.py search "aged care"
python3 content_search.py search "PCA" --limit 5
python3 content_search.py search "dementia care"
# 3. ดูสถิติ index
python3 content_search.py stats
# 4. เริ่ม search API server (port 8082)
python3 content_search.py api_start

🌐 API Endpoints (เมื่อเปิด server)

# ค้นหา
GET http://localhost:8082/api/search?q=aged+care&limit=10

# แนะนำคำค้น
GET http://localhost:8082/api/suggest?q=nurs

# สถิติ
GET http://localhost:8082/api/stats
💡 ตัวอย่างการใช้งานจริง

ต้องการหาบทความที่เคยเขียนเรื่อง "dementia" → รัน search "dementia" → ได้ผลลัพธ์ทันที พร้อม snippet + category + word count

  • Full-text search เร็วมาก (FTS5)
  • 📂 Index ทั้ง content-drafts + dashboard + prompts
  • 🏷️ Auto-detect content type + category + tags
  • 📊 Search history + popular searches tracking
  • 🌐 HTTP API สำหรับ integrate กับ frontend
  • Snippet highlighting
📊

Dashboard Updater

อัปเดตข้อมูล dashboard จาก database อัตโนมัติ

🔧 ขั้นตอนเริ่มต้น

  1. ดูสถิติ — รัน stats เพื่อดูข้อมูลปัจจุบัน
  2. Update — รัน update เพื่อสร้าง JSON files
  3. Verify — รัน verify เพื่อตรวจสอบ data freshness

📝 คำสั่งที่ใช้บ่อย

# 1. ดูสถิติปัจจุบัน
cd scripts/orchestrator
python3 dashboard_updater.py stats
# 2. อัปเดตข้อมูลทั้งหมด
python3 dashboard_updater.py update
# 3. ตรวจสอบ data freshness
python3 dashboard_updater.py verify
# 4. สร้าง summary JSON
python3 dashboard_updater.py summary
💡 ตัวอย่างการใช้งานจริง

รัน update → ได้ไฟล์ JSON 3 ไฟล์ใน dashboard/data/ → dashboard HTML สามารถดึงข้อมูลไปแสดงได้ → ใช้ cron รันอัตโนมัติทุกวัน

📁 ไฟล์ที่สร้าง

dashboard/data/
├── providers-summary.json   # สถิติ drafts + reviews + feedback
├── drafts-by-status.json   # draft แยกตาม status
├── dashboard-summary.json  # สรุปทั้งหมด
└── update-log.json         # log การอัปเดต
  • 📊 อ่านข้อมูลจาก healthcare.db อัตโนมัติ
  • 📁 สร้าง summary JSON files
  • ตรวจวัด data freshness (fresh/stale/outdated)
  • 📝 Update log สำหรับ audit trail
  • 🔄 Cron-ready (silent if no changes)

Quick Reference — คำสั่งลัด

คัดลอกแล้วรันได้เลย

🚀 รันทั้ง 3 ระบบพร้อมกัน

# cd เข้า orchestrator
cd /home/deknerds/projects/atomdeknurse-hermes-agent/scripts/orchestrator

# Podcast: import + rss + index
python3 podcast_generator.py import ../../data/drafts/podcast/aged-care-knowledge-10-episodes.md
python3 podcast_generator.py rss
python3 podcast_generator.py index

# Search: init + index
python3 content_search.py init
python3 content_search.py index

# Dashboard: update
python3 dashboard_updater.py update

🔄 Daily Routine (แนะนำ)

# ทุกเช้า — ดูสถิติ
python3 dashboard_updater.py stats

# หลังเขียน content ใหม่ — re-index
python3 content_search.py index

# หลังเขียน podcast script — import
python3 podcast_generator.py import <file.md>