Skip to content

About

Daily auto-poster for Instagram + Facebook Page + Threads — curated GitHub-trending topics, local ComfyUI images · 每日自動發 IG/FB粉專/Threads,策展 GitHub 熱門 + 本機 ComfyUI 生圖

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

daily-social-autopost

Lightweight Python toolkit that auto-posts a daily, curated GitHub-trending / tech-news update to Instagram + a Facebook Page + Threads — one local image, three platform-native captions, one command. Images are generated locally with ComfyUI (photoreal sci-fi ↔ anime, randomized).

自動把每日「GitHub trending / 科技新聞」策展貼文發到 IG + FB 粉專 + Threads:本機生圖、三平台各自文案、一鍵發完。中文說明見下

Author: Lee-unhn · narrative formulas adapted from the open-source social-post skill by Hao (MIT).


How it works

flowchart LR
  A([Trending source<br/>GitHub · Hacker News]):::input --> F[/fetch_topic.py/]:::proc
  F --> C[/captions<br/>one per platform/]:::proc
  F --> G[/gen_image.py/]:::proc
  M[(ComfyUI<br/>DreamShaper · Animagine)]:::res --> G
  C --> P
  G --> U[(ImgBB<br/>public URL)]:::res --> P
  subgraph P[publish_all.py]
    IG[Instagram]:::out
    FB[Facebook Page]:::out
    TH[Threads]:::out
  end
  P --> N[/notify.py<br/>email result/]:::proc
  classDef input fill:#74c7ec,color:#1e1e2e
  classDef proc fill:#f9e2af,color:#1e1e2e
  classDef res fill:#a6e3a1,color:#1e1e2e
  classDef out fill:#f5c2e7,color:#1e1e2e
Loading

Features

  • Three platforms, one call — publish_all.py uploads the image once and posts IG (+ first-comment link), FB Page, and Threads, each with its own caption.
  • Local image generation — gen_image.py drives a local ComfyUI; randomly switches between photoreal sci-fi (DreamShaper) and anime (Animagine), randomizes the character, and you vary the action per post.
  • Topic discovery — fetch_topic.py pulls GitHub trending (official Search API) and Hacker News, with simple URL de-duplication.
  • Result emails — notify.py / emailer.py send a one-line success/failure report so a missed day is visible.
  • No secrets in code — everything reads from a local .env (gitignored).

Setup

  1. cp .env.example .env and fill it in (see comments in the file).
  2. Meta tokens: convert your IG to a Creator/Business account, link it to a Facebook Page, and generate a token with instagram_content_publish + pages_manage_posts. Threads uses its own token (Threads use-case "User token generator").
  3. Image host: a free ImgBB key.
  4. Local ComfyUI running on 127.0.0.1:8188 with dreamshaper-xl-turbo and/or animagine-xl-4.0 checkpoints.
  5. Python 3.10+ (standard library only — no pip installs).

Usage

# generate an image (style random; --style scifi|comic to force)
python gen_image.py --prompt "developer workspace, walking, wide shot" --out out.png

# post one image + three captions to all platforms
python publish_all.py --image out.png \
  --ig-caption "..." --fb-caption "..." --threads-text "..." \
  --link "github.com/owner/repo"

# Threads text-only with a link preview card
python publish_threads.py --text "..." --link "https://github.com/owner/repo"

Run it daily with your OS scheduler (cron / Task Scheduler) or a Claude Code scheduled task.

Notes

  • Personal Facebook profiles have no publishing API — only Pages do. This toolkit targets a Page + IG + Threads.
  • API-posted Instagram does not auto-cross-post to FB/Threads, so each platform is posted independently.

中文說明

每天自動把一則「GitHub trending / 科技新聞」策展內容,發到 Instagram + Facebook 粉專 + Threads:本機用 ComfyUI 生圖(科幻寫實 ↔ 動漫隨機切換、人物隨機、動作每天變),三平台各寫一版文案,一個指令發完,發完寄一封成功/失敗回報信。

  • 三平台一次發:publish_all.py 圖只上傳一次,IG(+第一則留言放連結)、FB 粉專、Threads 各自文案。
  • 本機生圖:gen_image.py 接本機 ComfyUI,隨機切寫實/動漫風與人物外型。
  • 題材探索:fetch_topic.py 抓 GitHub trending + Hacker News,含 URL 去重。
  • 結果回報:notify.py / emailer.py 寄一行成功/失敗,漏發看得到。
  • 程式不含金鑰:全部讀本地 .env(已 gitignore)。

設定見上方英文 Setup;敘事公式改編自 Hao 的 social-post skill。

License

MIT © 2026 Lee-unhn. Narrative formulas adapted from Hao's social-post skill (MIT).

About

Daily auto-poster for Instagram + Facebook Page + Threads — curated GitHub-trending topics, local ComfyUI images · 每日自動發 IG/FB粉專/Threads,策展 GitHub 熱門 + 本機 ComfyUI 生圖

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages