Sign inSign up

penndu/ducircle

By penndu

•Updated 6 days ago

Image
0

1.8K

penndu/ducircle repository overview

⁠ducircle — 友链朋友圈

面向博客主的公开友链聚合服务:自动发现友链 RSS,自动识别博客框架,把好友的更新汇聚成一条时间流。

English

A public friend-circle (blogroll) aggregation service for bloggers. It auto-discovers RSS feeds from your friends' blogs, auto-detects the blog framework in use, and merges everyone's updates into a single timeline.

一个自托管的「友链朋友圈」服务:把散落在几十个博客里的更新收成一条时间线,一条 URL 就能嵌进你的博客。


⁠特性 / Features

自动发现填友链页地址或导入 OPML,RSS 自动探测
框架识别识别 Hexo / Hugo / VuePress / Ark 等,套用对应选择器抓取
失败明说抓不到时明确告诉你是哪个站、什么原因,不静默失败
自带 API一条 URL 渲染文章流,字段沿用 title/link/created/author/avatar
AI 摘要可选接入大模型生成摘要,按站点/用户配额控制
隐私优先ORM 层强制按 user_id 过滤,密码哈希存储
Auto-discoveryFeed a friend-link page or import an OPML; RSS is probed automatically
Framework detectionRecognises Hexo / Hugo / VuePress / Ark and applies the matching selectors
Explicit failuresTells you exactly which site failed and why — never fails silently
Ready-made APIOne URL renders the article stream; field names match common blogroll front-ends
AI summariesOptional LLM-generated summaries, with per-site / per-user quotas
Privacy firstQueries are hard-filtered by user_id; passwords are hashed

⁠快速开始 / Quick Start

docker run -d --name ducircle \
  -p 8000:8000 \
  -e MYSQL_HOST=your-mysql -e MYSQL_PORT=3306 \
  -e MYSQL_DATABASE=ducircle -e MYSQL_USER=ducircle -e MYSQL_PASSWORD=yourpass \
  -e REDIS_URL=redis://:yourpass@your-redis:6379/0 \
  -e SECRET_KEY="$(openssl rand -base64 48)" \
  -e BASE_URL=https://ducircle.example.com \
  penndu/ducircle:latest

更推荐用仓库里的 compose(已含 1Panel 网络与反代配置):

git clone [email protected]:penndu/ducircle.git
cd ducircle
cp .env.example .env        # 填数据库与 Redis 密码
docker compose -f deploy/docker-compose.yml up -d

The bundled compose file is the recommended path — it already wires the 1Panel network and reverse proxy.


⁠调用 API / Using the API

拿到 API Key(后台「设置」页可重新生成)后:

curl "https://ducircle.example.com/v1/all?start=0&end=20" \
  -H "X-API-Key: fc_你的密钥"
{
  "data": [
    {
      "title": "文章标题",
      "link": "https://example.com/post",
      "created": "2026-10-23T08:00:00",
      "author": "某个博客",
      "avatar": "https://example.com/avatar.png",
      "summary": "AI 生成的摘要(可能为空)",
      "score": 8.5
    }
  ],
  "total": 128,
  "start": 0,
  "end": 19
}

常用参数:start / end(条数偏移,非页码)、rule(created / updated / score)、site_id、only_summarized。完整接口见运行后的 /docs。


⁠抓取策略 / Crawl Strategy

四层策略,从上到下逐层降级:

第 0 层  你配的自定义规则   ← 完全信任,不再自动推断
第 1 层  RSS / Atom        ← 最省事也最可靠
第 2 层  框架指纹          ← 识别 Hexo/Hugo 等,用对应选择器
第 3 层  通用推断          ← 按文本密度猜文章容器

Four layers, degrading top to bottom: your own rules → RSS/Atom → framework fingerprint → generic inference.


⁠标签 / Tags

Tag说明
latest最新构建
YYYYMMDDHHMM时间戳版本,便于回滚

Tag summary

Content type

Image

Digest

sha256:d67bcf03e…

Size

106.4 MB

Last updated

6 days ago

docker pull penndu/ducircle