-
Notifications
You must be signed in to change notification settings - Fork 10
merge dev into main #723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
merge dev into main #723
Changes from all commits
4d1879a
1bc5c73
2eb1946
ae8fb33
df86ae2
0ba68e8
fb80f5d
a8033a1
0d2eb76
ef6fb29
df9ac9e
f8f31c7
f8dd169
469f5ea
710d47c
ba6ad16
24bf35a
424a58b
9bc5e11
154f911
c7e60a4
2eec408
5674f75
e376387
36c2de0
3137045
bc4f3ac
d9f2ade
590f283
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,7 @@ sidebar: | |
| FeedCraft includes a visual **HTML to RSS** tool that allows you to generate selectors for creating RSS feeds from websites that don't provide them natively. | ||
|
|
||
| :::note | ||
| This tool is designed for HTML pages. If you need to process a JSON API, use the [CURL to RSS](/en/guides/advanced/curl-to-rss/) instead. | ||
| This tool is designed for HTML pages. If you need to process a JSON API, use the [JSON to RSS](/en/guides/advanced/json-to-rss/) instead. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use a relative link and tidy the phrasing. Two small issues on this line:
📝 Proposed fix-This tool is designed for HTML pages. If you need to process a JSON API, use the [JSON to RSS](/en/guides/advanced/json-to-rss/) instead.
+This tool is designed for HTML pages. If you need to process a JSON API, use the [JSON to RSS](./json-to-rss/) guide instead.🤖 Prompt for AI Agents |
||
| ::: | ||
|
|
||
| ## Overview | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,5 +1,5 @@ | ||||||
| --- | ||||||
| title: 從 CURL 語句生成 RSS | ||||||
| title: 從 JSON 生成 RSS | ||||||
| description: 使用 jq 提取欄位,並透過可選模板將任意 JSON API 響應轉換為 RSS 訂閱源。 | ||||||
| sidebar: | ||||||
| order: 3 | ||||||
|
|
@@ -8,7 +8,7 @@ sidebar: | |||||
| variant: success | ||||||
| --- | ||||||
|
|
||||||
| FeedCraft 包含一個 **從 CURL 語句生成 RSS (CURL to RSS)** 工具,允許你從 JSON API 獲取資料,先用 `jq` 提取欄位,再透過可選模板將其轉換為 RSS 訂閱源。 | ||||||
| FeedCraft 包含一個 **從 JSON 生成 RSS (JSON to RSS)** 工具,允許你從 JSON API 獲取資料,先用 `jq` 提取欄位,再透過可選模板將其轉換為 RSS 訂閱源。 | ||||||
|
|
||||||
| ## 概覽 | ||||||
|
|
||||||
|
|
@@ -21,13 +21,13 @@ JSON RSS 生成器可以幫助你: | |||||
|
|
||||||
| ## 如何使用 | ||||||
|
|
||||||
| 在管理後台導航至 **工作台 > Curl 轉 RSS**。 | ||||||
| 在管理後台導航至 **工作台 > JSON 轉 RSS**。 | ||||||
|
|
||||||
| ### 第一步:請求配置 (Request Configuration) | ||||||
|
|
||||||
| 你需要定義如何獲取 JSON 資料。 | ||||||
|
|
||||||
| - **從 Curl 匯入 (Import from Curl)**:你可以貼上 `curl` 命令來自動填充 URL、方法、請求標頭和請求體。這在你從瀏覽器開發者工具複製請求時非常有用。 | ||||||
| - **從 cURL 匯入 (Import from cURL)**:你可以貼上 `curl` 命令來自動填充 URL、方法、請求標頭和請求體。這在你從瀏覽器開發者工具複製請求時非常有用。 | ||||||
| - **方法 (Method)**:選擇 `GET` 或 `POST`。 | ||||||
| - **URL**:API 端點 URL。 | ||||||
| - **Headers**:添加任何必要的請求標頭(例如 `Authorization`, `Content-Type`)。 | ||||||
|
|
@@ -50,6 +50,28 @@ JSON RSS 生成器可以幫助你: | |||||
| - **日期選取器 (Date Selector)**:(可選)發布日期的路徑。 | ||||||
| - **內容選取器 (Content Selector)**:(可選)完整內容或摘要的路徑。 | ||||||
|
|
||||||
| #### 使用模板 (可選) | ||||||
|
|
||||||
| 你可以使用 [Go Templates](https://pkg.go.dev/text/template) 語法對提取的值進行進一步處理。 | ||||||
|
|
||||||
| **可用變數:** | ||||||
|
|
||||||
| - `.Fields`:已解析的欄位值(例如 `.Fields.Title`, `.Fields.Link`, `.Fields.Date`, `.Fields.Description`)。 | ||||||
| - `.Item`:原始 JSON 列表項物件(例如 `.Item.id`, `.Item.author.name`)。 | ||||||
|
|
||||||
| **內建函數:** | ||||||
|
|
||||||
| - `trimSpace`:移除首尾的空白字元。 | ||||||
| - `trim`:移除首尾指定的字元。 | ||||||
| - `default`:如果欄位為空,提供一個預設值。 | ||||||
|
|
||||||
| **範例:** | ||||||
|
|
||||||
| - **清理標題空白字元**:`{{ .Fields.Title | trimSpace }}` | ||||||
| - **拼接完整連結**:`https://example.com/article/{{ .Item.id }}` | ||||||
| - **移除特定前缀**:`{{ .Fields.Description | trim "Prefix: " }}` | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 简体字误用: 在 zh-tw 繁體中文文件中,「缀」是簡體字,繁體應為「綴」。建議改為「前綴」。 📝 建議修改-- **移除特定前缀**:`{{ .Fields.Description | trim "Prefix: " }}`
+- **移除特定前綴**:`{{ .Fields.Description | trim "Prefix: " }}`As per coding guidelines: "For Traditional Chinese (zh-tw) documentation, use Taiwan-specific technical terms". 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| - **預設值兜底**:`{{ default .Fields.Description "暫無摘要" }}` | ||||||
|
|
||||||
| 點擊 **執行預覽 (Run Preview)** 驗證你的選取器,然後點擊 **下一步 (Next Step)**。 | ||||||
|
|
||||||
| ### 第三步:訂閱源元數據 (Feed Metadata) | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -65,12 +65,15 @@ sidebar: | |
|
|
||
| - **FC_PUPPETEER_HTTP_ENDPOINT**: Browserless/Chrome 实例的地址。`fulltext-plus` 功能必须。 | ||
| - **FC_REDIS_URI**: Redis 连接地址。用于缓存,加快处理速度并减少 AI Token 消耗。 | ||
| - **FC_HTTP_USER_AGENT_FEED**: (可选)feed 类外部请求的默认 `User-Agent`,例如抓取 RSS/XML 资源时使用。搜索提供方请求目前也临时归入这一规则。 | ||
| - **FC_HTTP_USER_AGENT_HTML**: (可选)HTML 页面抓取的默认 `User-Agent`,例如全文提取和 HTML 转 RSS 工具使用。**注意:** 如果该值包含空格或括号,必须使用引号括起来。 | ||
|
Comment on lines
+68
to
+69
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 文档不一致: 第 69 行为 📝 建议修改-- **FC_HTTP_USER_AGENT_FEED**: (可选)feed 类外部请求的默认 `User-Agent`,例如抓取 RSS/XML 资源时使用。搜索提供方请求目前也临时归入这一规则。
+- **FC_HTTP_USER_AGENT_FEED**: (可选)feed 类外部请求的默认 `User-Agent`,例如抓取 RSS/XML 资源时使用。搜索提供方请求目前也临时归入这一规则。**注意:** 如果该值包含空格或括号,必须使用引号括起来。🤖 Prompt for AI Agents |
||
| - **FC_LLM_API_KEY**: OpenAI 或兼容服务(如 DeepSeek, Gemini 等)的 API Key。 | ||
| - **FC_LLM_API_MODEL**: 默认使用的模型(如 `gemini-pro`, `gpt-3.5-turbo`)。**支持多个模型:** 你可以提供一个逗号分隔的模型列表(例如 `gpt-3.5-turbo,gpt-4`)。FeedCraft 会为每个请求随机选择一个模型,如果调用失败,会自动重试列表中的其他模型。 | ||
| - **FC_LLM_API_BASE**: API 接口地址。如果是兼容 OpenAI 的 API,通常以 `/v1` 结尾。 | ||
| - **FC_LLM_API_TYPE**: (可选) `openai` (默认) 或 `ollama`. | ||
| - **FC_LLM_MAX_CONCURRENCY**: (可选) 全局最大 LLM 并发请求数(默认: `3`)。用于限制并发请求数量以防止触发 API 速率限制。 | ||
| - **FC_DOMAIN_MAX_CONCURRENCY**: (可选) 网页抓取(如全文提取)时每个目标域名的最大并发数(默认: `3`)。防止抓取目标服务器负载过高。 | ||
| - **LOG_LEVEL**: (可选) 后端应用的日志级别 (例如 `info`, `debug`, `trace`)。覆盖 `ENV` 设置的默认级别。 | ||
|
|
||
| ### 外部服务 | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
pnpm/action-setup v6 breaking changes migration guide💡 Result:
pnpm/action-setup v6 introduces several breaking changes and known issues compared to v5. There is no official migration guide in the repository README or releases, but changes can be inferred from the v4...v6 compare view, release notes, and open issues. Key breaking changes: - Replaces bundled pnpm binary with npm + lockfile bootstrap using pnpm v11 bootstrap (commit 58e6119). This changes installation mechanism and may cause PATH shadowing issues. - Requires Node.js 24+ (feat!: run the action on Node.js 24, commit fc06bc1). - Updated version detection logic: now reads from devEngines.packageManager in addition to packageManager field, and skips installation if packageManager is set (allowing pnpm self-update). - Removed dist/pnpm.cjs and dist/worker.js (large binary bundles). - Examples updated to actions/checkout@v6 and pnpm version examples to 10.x. Known issues in early v6 releases (fixed in later patches like v6.0.2+): - Does not respect specified version (e.g., version: 10 installs v11 bootstrap instead): Issues
#225,#227. Fixed in v6.0.2 by swapping PATH add order (PR#230). - Modifies pnpm-lock.yaml unexpectedly when used with actions/setup-node cache: "pnpm" cache (Issue#226). Causes ERR_PNPM_LOCKFILE_CONFIG_MISMATCH or invalid YAML with multiple documents (Issue#228). pnpm v11 writes extra YAML document for packageManagerDependencies; fixed if packageManager is set in package.json or using latest pnpm v10+. - pnpm version commands like pnpm version patch --no-git-tag-version fail due to v11 bootstrap lacking npm passthrough. Migration steps: 1. Update to latest v6.x (e.g., v6.0.3 as of 2026-04-21): uses: pnpm/action-setup@v6 (pins to latest v6). Or pin to fixed commit: uses: pnpm/action-setup@2e223e0 # v6 (pre-fix). 2. Ensure Node.js >=24 via actions/setup-node. 3. Explicitly specify version: 10.x (latest stable) if not using packageManager field, as v6 defaults to v11 bootstrap. 4. If using packageManager: "pnpm@X.Y.Z" in package.json, omit version input - pnpm will self-update to match. 5. For cache issues: Set packageManager in package.json to avoid lockfile modifications, update lockfile with pnpm install, use latest pnpm v10+, or run pnpm install without --frozen-lockfile initially. Avoid auto-upgrades via Dependabot until issues resolved. 6. Test workflows thoroughly, especially with --frozen-lockfile, nx, or version commands. 7. If issues persist, pin to v5: uses: pnpm/action-setup@v5. Official releases: v6.0.0 (2026-04-10: pnpm v11 support), v6.0.2 (2026-04-18: PATH fix), v6.0.3 (2026-04-21: pnpm v11.0.0-rc.5).Citations:
package_json_filepnpm/action-setup#227Upgrade to pnpm/action-setup@v6 introduces breaking changes; verify compatibility before merging.
v6 requires Node.js 24+ and changes the pnpm installation mechanism. Early v6 releases had a bug where the
versioninput was ignored (installing v11 instead of v9), fixed in v6.0.2+. Ensure you:version: 10.x(latest stable) instead of 9, since v6 defaults to v11 bootstrap when no version is specifiedAlternatively, downgrade to v5 if these changes are not feasible.
🤖 Prompt for AI Agents