feat(docs-i18n): translate all documentation into 20 languages

All 181 docs markdown files translated into 20 languages (apps/docs/<locale>/**). Companion to the i18n code PR; admin-merged because the file count exceeds GitHub's per-PR CI trigger limit. Validated by pnpm i18n:check (all surfaces, 0 stale/missing) and a clean all-locale docs build.
This commit is contained in:
SnapOtter
2026-07-11 13:52:47 +08:00
committed by GitHub
parent 00b651c9f8
commit 4963ab3bbd
3620 changed files with 306134 additions and 0 deletions
@@ -0,0 +1,53 @@
---
description: "從 CSV 或 JSON 資料建立長條圖、折線圖或圓餅圖。"
i18n_source_hash: d3c39384457b
i18n_provenance: human
i18n_output_hash: d800a1d08d7c
---
# 圖表製作 {#chart-maker}
從 CSV 或 JSON 資料建立長條圖、折線圖或圓餅圖。回傳所繪製圖表的 PNG 影像。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/files/chart-maker`
接受包含一個 CSV 或 JSON 檔案以及一個 JSON `settings` 欄位的 multipart form data。
## Parameters {#parameters}
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| kind | string | No | `"bar"` | 圖表類型:`bar``line``pie` |
| title | string | No | - | 圖表標題(最多 120 個字元) |
| width | integer | No | `960` | 圖表寬度(像素)(320-2048 |
| height | integer | No | `540` | 圖表高度(像素)(240-1536 |
## Example Request {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/chart-maker \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@sales.csv" \
-F 'settings={"kind": "line", "title": "Monthly Sales", "width": 960, "height": 540}'
```
## Example Response {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/sales_chart.png",
"originalSize": 1024,
"processedSize": 48500
}
```
## Notes {#notes}
- 輸入必須是 `.csv``.json` 檔案。CSV 檔案應含有帶欄位名稱的標題列。
- 第一欄會作為類別標籤;第二欄必須為數值,用來提供資料值。只會使用兩欄。
- JSON 輸入應為一個 `{label, value}` 物件的陣列,或是一個純物件,其鍵會成為標籤、值會成為資料點。
- 最多 100 個資料點。所有值都必須為零或以上。
- 無論輸入格式為何,輸出一律為 PNG 影像。
@@ -0,0 +1,49 @@
---
description: "在 Word、OpenDocument、RTF 與純文字格式之間轉換。"
i18n_source_hash: 89771292569d
i18n_provenance: human
i18n_output_hash: 0d64247d89d1
---
# 轉換文件 {#convert-document}
使用 LibreOffice 在 WordDOCX)、OpenDocumentODT)、RTF 與純文字格式之間轉換文件。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/files/convert-document`
接受包含一個 Word/ODT/RTF/TXT 檔案以及一個 JSON `settings` 欄位的 multipart form data。
## Parameters {#parameters}
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| format | string | Yes | - | 輸出格式:`docx``odt``rtf``txt` |
## Example Request {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/convert-document \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@report.docx" \
-F 'settings={"format": "odt"}'
```
## Example Response {#example-response}
回傳 `202 Accepted`。透過 `/api/v1/jobs/{jobId}/progress` 的 SSE 追蹤進度。
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"async": true
}
```
## Notes {#notes}
- 接受的輸入格式:`.docx``.doc``.odt``.rtf``.txt`
- 轉換由在伺服器上以無介面模式執行的 LibreOffice 處理。
- 複雜的格式(巨集、內嵌物件)在不同格式之間轉換時可能無法保留。
- 輸出格式必須與輸入格式不同。
@@ -0,0 +1,49 @@
---
description: "在 PowerPoint 與 OpenDocument 簡報格式之間轉換。"
i18n_source_hash: 08ba415d39ac
i18n_provenance: human
i18n_output_hash: e7611e1add96
---
# 轉換簡報 {#convert-presentation}
在 PowerPointPPTX)與 OpenDocument 簡報(ODP)格式之間轉換簡報。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/files/convert-presentation`
接受包含一個 PowerPoint/ODP 檔案以及一個 JSON `settings` 欄位的 multipart form data。
## Parameters {#parameters}
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| format | string | Yes | - | 輸出格式:`pptx``odp` |
## Example Request {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/convert-presentation \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@slides.pptx" \
-F 'settings={"format": "odp"}'
```
## Example Response {#example-response}
回傳 `202 Accepted`。透過 `/api/v1/jobs/{jobId}/progress` 的 SSE 追蹤進度。
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"async": true
}
```
## Notes {#notes}
- 接受的輸入格式:`.pptx``.ppt``.odp`
- 轉換由在伺服器上以無介面模式執行的 LibreOffice 處理。
- 動畫與轉場效果在不同格式之間可能無法保留。
- 輸出格式必須與輸入格式不同。
@@ -0,0 +1,49 @@
---
description: "在 Excel、OpenDocument 與 CSV 格式之間轉換。"
i18n_source_hash: b813b1b06962
i18n_provenance: human
i18n_output_hash: 22aa356329b5
---
# 轉換試算表 {#convert-spreadsheet}
在 ExcelXLSX)、OpenDocument 試算表(ODS)與 CSV 格式之間轉換試算表。多工作表的活頁簿在轉換為 CSV 時會匯出第一個工作表。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/files/convert-spreadsheet`
接受包含一個 Excel/ODS/CSV 檔案以及一個 JSON `settings` 欄位的 multipart form data。
## Parameters {#parameters}
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| format | string | Yes | - | 輸出格式:`xlsx``ods``csv` |
## Example Request {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/convert-spreadsheet \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@data.xlsx" \
-F 'settings={"format": "csv"}'
```
## Example Response {#example-response}
回傳 `202 Accepted`。透過 `/api/v1/jobs/{jobId}/progress` 的 SSE 追蹤進度。
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"async": true
}
```
## Notes {#notes}
- 接受的輸入格式:`.xlsx``.xls``.ods``.csv`
- 將多工作表的活頁簿轉換為 CSV 時,只會匯出第一個工作表。
- 公式會被計算,並在 CSV 輸出中以靜態值匯出。
- 輸出格式必須與輸入格式不同。
+48
View File
@@ -0,0 +1,48 @@
---
description: "將多個檔案打包成單一 ZIP 壓縮檔。"
i18n_source_hash: 9ff1250dbd36
i18n_provenance: human
i18n_output_hash: 73948f9e778b
---
# 建立 ZIP {#create-zip}
將任意類型的多個檔案打包成單一 ZIP 壓縮檔。重複的檔名會自動去除重複。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/files/create-zip`
接受包含兩個或以上檔案的 multipart form data。不需要 settings 欄位。
## Parameters {#parameters}
此工具沒有可設定的參數。上傳 2 至 50 個任意類型的檔案來打包。
## Example Request {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/create-zip \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@report.pdf" \
-F "file=@data.csv" \
-F "file=@photo.jpg"
```
## Example Response {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/archive.zip",
"originalSize": 3500000,
"processedSize": 2800000
}
```
## Notes {#notes}
- 需要 2 到 50 個輸入檔案。
- 接受任何檔案類型;對輸入格式沒有限制。
- 若多個檔案共用相同名稱,會以數字後綴自動去除重複。
- 輸出壓縮檔使用標準的 ZIP 壓縮(deflate)。
+59
View File
@@ -0,0 +1,59 @@
---
description: "在 CSV 與 ExcelXLSX)之間雙向轉換。"
i18n_source_hash: 213297311e36
i18n_provenance: human
i18n_output_hash: 8104b315b8cc
---
# CSV 轉 Excel {#csv-to-excel}
在 CSV 與 Excel(XLSX)格式之間雙向轉換。上傳 CSV 或 TSV 檔案以取得 XLSX,或上傳 XLSX 檔案以取得 CSV。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/files/csv-excel`
接受包含一個 CSV、TSV 或 XLSX 檔案以及一個 JSON `settings` 欄位的 multipart form data。
## Parameters {#parameters}
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| sheet | integer | No | `1` | 從 XLSX 轉換時要匯出的工作表編號(最小值 1) |
## Example Request {#example-request}
CSV 轉 Excel
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/csv-excel \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@data.csv" \
-F 'settings={"sheet": 1}'
```
Excel 轉 CSV
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/csv-excel \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@report.xlsx" \
-F 'settings={"sheet": 2}'
```
## Example Response {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/data.xlsx",
"originalSize": 2048,
"processedSize": 5120
}
```
## Notes {#notes}
- 轉換方向會依輸入檔案的副檔名自動偵測:`.csv``.tsv` 會產生 `.xlsx`,而 `.xlsx` 會產生 `.csv`
- `sheet` 參數只在從 XLSX 轉換時適用。它會選擇要匯出哪個工作表。
- 除了 CSV 之外,也支援 TSV(以定位字元分隔的值)檔案。
+60
View File
@@ -0,0 +1,60 @@
---
description: "在 CSV 與 JSON 之間雙向轉換。"
i18n_source_hash: 978c08ad46d3
i18n_provenance: human
i18n_output_hash: ce5593935126
---
# CSV 轉 JSON {#csv-to-json}
在 CSV 與 JSON 格式之間雙向轉換。上傳 CSV 或 TSV 檔案以取得一個物件的 JSON 陣列,或上傳一個 JSON 陣列以取得 CSV 檔案。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/files/csv-json`
接受包含一個 CSV、TSV 或 JSON 檔案以及一個 JSON `settings` 欄位的 multipart form data。
## Parameters {#parameters}
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| pretty | boolean | No | `true` | 以縮排美化輸出 JSON |
## Example Request {#example-request}
CSV 轉 JSON
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/csv-json \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@users.csv" \
-F 'settings={"pretty": true}'
```
JSON 轉 CSV
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/csv-json \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@users.json" \
-F 'settings={}'
```
## Example Response {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/users.json",
"originalSize": 1500,
"processedSize": 2200
}
```
## Notes {#notes}
- 轉換方向會依輸入檔案的副檔名自動偵測:`.csv``.tsv` 會產生 `.json`,而 `.json` 會產生 `.csv`
- `pretty` 參數只會影響 JSON 輸出。設為 `false` 時,輸出為緊湊的單行 JSON 字串。
- JSON 輸入必須是一個具有一致鍵的物件陣列。每個物件會成為一列,每個鍵會成為一個欄位標題。
- 除了 CSV 之外,也支援 TSV(以定位字元分隔的值)檔案。
@@ -0,0 +1,49 @@
---
description: "將 EPUB 轉換為 PDF、DOCX、HTML 或 Markdown。"
i18n_source_hash: 7d94fc18ca97
i18n_provenance: human
i18n_output_hash: bd20a836a10a
---
# 轉換 EPUB {#convert-epub}
將 EPUB 電子書轉換為 PDF、WordDOCX)、HTML 或 Markdown。書中的遠端資源不會被抓取。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/files/epub-convert`
接受包含一個 EPUB 檔案以及一個 JSON `settings` 欄位的 multipart form data。
## Parameters {#parameters}
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| format | string | Yes | - | 輸出格式:`pdf``docx``html``md` |
## Example Request {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/epub-convert \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@book.epub" \
-F 'settings={"format": "pdf"}'
```
## Example Response {#example-response}
回傳 `202 Accepted`。透過 `/api/v1/jobs/{jobId}/progress` 的 SSE 追蹤進度。
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"async": true
}
```
## Notes {#notes}
- 接受的輸入格式:`.epub`
- EPUB 中內嵌的遠端資源(外部影像、字型)基於安全考量不會被抓取。
- 轉換後輸出的影像品質可能會因 EPUB 結構而有所不同。
- 轉換由伺服器上的 Pandoc 處理。
@@ -0,0 +1,46 @@
---
description: "將試算表轉換為 PDF。"
i18n_source_hash: 4dbe2a810ea6
i18n_provenance: human
i18n_output_hash: 1a36cc850d4b
---
# Excel 轉 PDF {#excel-to-pdf}
將 Excel、OpenDocument 或 CSV 試算表轉換為 PDF。過寬的工作表可能會跨多頁分頁。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/files/excel-to-pdf`
接受包含一個 Excel/ODS/CSV 檔案的 multipart form data。
## Parameters {#parameters}
此工具沒有可設定的參數。上傳試算表,它就會被轉換為 PDF。
## Example Request {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/excel-to-pdf \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@budget.xlsx"
```
## Example Response {#example-response}
回傳 `202 Accepted`。透過 `/api/v1/jobs/{jobId}/progress` 的 SSE 追蹤進度。
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"async": true
}
```
## Notes {#notes}
- 接受的輸入格式:`.xlsx``.xls``.ods``.csv`
- 過寬的工作表在產生的 PDF 中可能會跨多頁分割。
- 圖表與設定格式化條件會在 PDF 輸出中呈現。
- 轉換由在伺服器上以無介面模式執行的 LibreOffice 處理。
@@ -0,0 +1,46 @@
---
description: "安全地從 ZIP 壓縮檔中解壓縮檔案,並具備壓縮炸彈防護。"
i18n_source_hash: 484a1f1051b8
i18n_provenance: human
i18n_output_hash: e43d9bbdf846
---
# 解壓縮 ZIP {#extract-zip}
安全地從 ZIP 壓縮檔中解壓縮檔案。單一檔案的壓縮檔會直接回傳所含的檔案;多檔案的壓縮檔則會回傳一個包含解壓縮內容的扁平 ZIP。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/files/extract-zip`
接受包含一個 ZIP 檔案的 multipart form data。不需要 settings 欄位。
## Parameters {#parameters}
此工具沒有可設定的參數。上傳一個 `.zip` 檔案來解壓縮。
## Example Request {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/extract-zip \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@archive.zip"
```
## Example Response {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/archive_extracted.zip",
"originalSize": 2800000,
"processedSize": 3500000
}
```
## Notes {#notes}
- 只接受 `.zip` 檔案作為輸入。
- 若壓縮檔只含有單一檔案,該檔案會被直接回傳(不會包在 ZIP 中)。
- 若壓縮檔含有多個檔案,會回傳一個扁平 ZIP,所有檔案都解壓縮至根層級(巢狀的目錄結構會被展平)。
- 內建的壓縮炸彈防護會拒絕壓縮比或檔案數量過高的壓縮檔,以防止資源耗盡。
@@ -0,0 +1,46 @@
---
description: "將 HTML 檔案轉換為 PDF。"
i18n_source_hash: 20b9ae147db5
i18n_provenance: human
i18n_output_hash: 35aea922dbe5
---
# HTML 轉 PDF {#html-to-pdf}
將 HTML 檔案轉換為帶樣式的 PDF 文件。為了保護隱私,遠端資源(外部影像、樣式表、指令碼)會被停用。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/files/html-to-pdf`
接受包含一個 HTML 檔案的 multipart form data。
## Parameters {#parameters}
此工具沒有可設定的參數。上傳 HTML 檔案,它就會被轉換為 PDF。
## Example Request {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/html-to-pdf \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@page.html"
```
## Example Response {#example-response}
回傳 `202 Accepted`。透過 `/api/v1/jobs/{jobId}/progress` 的 SSE 追蹤進度。
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"async": true
}
```
## Notes {#notes}
- 接受的輸入格式:`.html``.htm`
- 為了保護隱私與安全,遠端資源(透過 URL 引用的影像、樣式表、指令碼)不會被抓取。
- 內嵌樣式與內嵌影像(data URI)會被保留。
- 轉換由伺服器上的 WeasyPrint 處理。
+59
View File
@@ -0,0 +1,59 @@
---
description: "在 JSON 與 XML 之間雙向轉換。"
i18n_source_hash: b3a6ded0c64a
i18n_provenance: human
i18n_output_hash: cec9997b2d97
---
# JSON 轉 XML {#json-to-xml}
在 JSON 與 XML 格式之間雙向轉換。上傳 JSON 檔案以取得 XML,或上傳 XML 檔案以取得 JSON。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/files/json-xml`
接受包含一個 JSON 或 XML 檔案以及一個 JSON `settings` 欄位的 multipart form data。
## Parameters {#parameters}
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| pretty | boolean | No | `true` | 以縮排美化輸出 |
## Example Request {#example-request}
JSON 轉 XML
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/json-xml \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@config.json" \
-F 'settings={"pretty": true}'
```
XML 轉 JSON
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/json-xml \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@config.xml" \
-F 'settings={"pretty": true}'
```
## Example Response {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/config.xml",
"originalSize": 850,
"processedSize": 1200
}
```
## Notes {#notes}
- 轉換方向會依輸入檔案的副檔名自動偵測:`.json` 會產生 `.xml`,而 `.xml` 會產生 `.json`
- `pretty` 參數對兩個方向都適用。當為 `false` 時,輸出為緊湊且不含縮排。
- 在來回轉換過程中,會盡可能保留 XML 屬性與巢狀結構。
@@ -0,0 +1,46 @@
---
description: "將 Markdown 檔案轉換為 Word 文件(DOCX)。"
i18n_source_hash: 979cb8ee13f2
i18n_provenance: human
i18n_output_hash: ca638a5a70be
---
# Markdown 轉 Word {#markdown-to-word}
將 Markdown 檔案轉換為 Word 文件(DOCX),保留標題、清單、程式碼區塊及其他格式。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/files/markdown-to-docx`
接受包含一個 Markdown 檔案的 multipart form data。
## Parameters {#parameters}
此工具沒有可設定的參數。上傳 Markdown 檔案,它就會被轉換為 DOCX。
## Example Request {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/markdown-to-docx \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@README.md"
```
## Example Response {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/README.docx",
"originalSize": 4500,
"processedSize": 18200
}
```
## Notes {#notes}
- 接受的輸入格式:`.md``.markdown`
- 這是一個快速(同步)工具,會直接回傳結果。
- 標題、粗體、斜體、連結、程式碼區塊與清單都會對應至 Word 樣式。
- 轉換由伺服器上的 Pandoc 處理。
@@ -0,0 +1,46 @@
---
description: "將 Markdown 檔案轉換為獨立的 HTML 頁面。"
i18n_source_hash: 3ef805e8fc8c
i18n_provenance: human
i18n_output_hash: f343b45722eb
---
# Markdown 轉 HTML {#markdown-to-html}
將 Markdown 檔案轉換為獨立的 HTML 頁面。原始檔中引用的遠端影像會在輸出中原樣保留。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/files/markdown-to-html`
接受包含一個 Markdown 檔案的 multipart form data。
## Parameters {#parameters}
此工具沒有可設定的參數。上傳 Markdown 檔案,它就會被轉換為 HTML。
## Example Request {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/markdown-to-html \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@notes.md"
```
## Example Response {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/notes.html",
"originalSize": 3200,
"processedSize": 5800
}
```
## Notes {#notes}
- 接受的輸入格式:`.md``.markdown`
- 這是一個快速(同步)工具,會直接回傳結果。
- 輸出是一個含內嵌樣式的自足式 HTML 頁面。
- Markdown 原始檔中的遠端影像 URL 會原樣保留,不會被抓取。
@@ -0,0 +1,46 @@
---
description: "將 Markdown 檔案轉換為帶樣式的 PDF。"
i18n_source_hash: 18474dc8772a
i18n_provenance: human
i18n_output_hash: 9949063284c6
---
# Markdown to PDF {#markdown-to-pdf}
將 Markdown 檔案轉換為帶樣式的 PDF 文件。基於隱私考量,遠端資源已停用。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/files/markdown-to-pdf`
接受包含 Markdown 檔案的 multipart form data。
## Parameters {#parameters}
此工具沒有可設定的參數。上傳一個 Markdown 檔案,它就會被轉換為 PDF。
## Example Request {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/markdown-to-pdf \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@document.md"
```
## Example Response {#example-response}
回傳 `202 Accepted`。可透過 SSE 在 `/api/v1/jobs/{jobId}/progress` 追蹤進度。
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"async": true
}
```
## Notes {#notes}
- 接受的輸入格式:`.md``.markdown`
- 基於隱私與安全考量,不會抓取遠端資源(透過 URL 參照的圖片、樣式表)。
- Markdown 會先被算繪為 HTML,再透過 WeasyPrint 轉換為 PDF。
- 程式碼區塊、表格及其他 Markdown 元素會在 PDF 輸出中套用樣式。
+48
View File
@@ -0,0 +1,48 @@
---
description: "將多個欄位相符的 CSV 或 TSV 檔案合併為一個。"
i18n_source_hash: 109b5f399ac8
i18n_provenance: human
i18n_output_hash: f5e59e94d33e
---
# Merge CSVs {#merge-csvs}
將多個欄位相符的 CSV 或 TSV 檔案合併為單一檔案。所有輸入檔案必須具有相同的欄位標頭。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/files/merge-csvs`
接受包含兩個以上 CSV 檔案的 multipart form data。不需要 settings 欄位。
## Parameters {#parameters}
此工具沒有可設定的參數。上傳 2 至 20 個欄位標頭相符的 CSV 或 TSV 檔案。
## Example Request {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/merge-csvs \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@january.csv" \
-F "file=@february.csv" \
-F "file=@march.csv"
```
## Example Response {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/merged.csv",
"originalSize": 30000,
"processedSize": 28500
}
```
## Notes {#notes}
- 需要 2 至 20 個輸入檔案。
- 所有檔案必須共用相同的欄位標頭。若欄位不符,合併將會失敗。
- 標頭列在輸出中僅包含一次;所有檔案的資料列會依上傳順序串接。
- CSV 與 TSV 檔案皆可接受,但單一請求中的所有檔案應使用相同的分隔符號。
@@ -0,0 +1,46 @@
---
description: "將簡報轉換為 PDF。"
i18n_source_hash: 49bd71c46bed
i18n_provenance: human
i18n_output_hash: 36860a37bf0c
---
# PowerPoint to PDF {#powerpoint-to-pdf}
將 PowerPoint 或 OpenDocument 簡報轉換為 PDF,每張投影片對應一頁。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/files/powerpoint-to-pdf`
接受包含 PowerPoint/ODP 檔案的 multipart form data。
## Parameters {#parameters}
此工具沒有可設定的參數。上傳一個簡報,它就會被轉換為 PDF。
## Example Request {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/powerpoint-to-pdf \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@slides.pptx"
```
## Example Response {#example-response}
回傳 `202 Accepted`。可透過 SSE 在 `/api/v1/jobs/{jobId}/progress` 追蹤進度。
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"async": true
}
```
## Notes {#notes}
- 接受的輸入格式:`.pptx``.ppt``.odp`
- 每張投影片會成為 PDF 中的一頁。
- 轉換由伺服器上以無介面模式執行的 LibreOffice 處理。
- 動畫與轉場效果不會包含在 PDF 輸出中。
+50
View File
@@ -0,0 +1,50 @@
---
description: "依列數將 CSV 分割為較小的檔案。"
i18n_source_hash: a35dce4a99a3
i18n_provenance: human
i18n_output_hash: 405b1598f6c3
---
# Split CSV {#split-csv}
依列數將大型 CSV 或 TSV 檔案分割為較小的檔案。回傳包含各部分的 ZIP 壓縮檔。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/files/split-csv`
接受包含 CSV 檔案及 JSON `settings` 欄位的 multipart form data。
## Parameters {#parameters}
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| rowsPerFile | integer | No | `1000` | 每個輸出檔案的資料列數(1-1,000,000 |
| keepHeader | boolean | No | `true` | 在每個輸出檔案中重複標頭列 |
## Example Request {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/split-csv \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@large-dataset.csv" \
-F 'settings={"rowsPerFile": 500, "keepHeader": true}'
```
## Example Response {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/large-dataset_parts.zip",
"originalSize": 1048576,
"processedSize": 1050000
}
```
## Notes {#notes}
- 輸出一律為包含分割後 CSV 各部分的 ZIP 壓縮檔,並依序命名(例如 `part-1.csv``part-2.csv`)。
- 當 `keepHeader``true` 時,每個部分都會包含原始標頭列,因此每個檔案都能獨立使用。
- CSV 與 TSV 檔案皆可作為輸入。
- 列數僅指資料列;標頭列不計入。
+46
View File
@@ -0,0 +1,46 @@
---
description: "將 Word、Markdown、HTML 或純文字檔案轉換為 EPUB。"
i18n_source_hash: 63e1afa91c52
i18n_provenance: human
i18n_output_hash: 8653fa464907
---
# Convert to EPUB {#convert-to-epub}
將 Word 文件、Markdown、HTML 或純文字檔案轉換為 EPUB 電子書格式。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/files/to-epub`
接受包含 Word/Markdown/HTML/TXT 檔案的 multipart form data。
## Parameters {#parameters}
此工具沒有可設定的參數。上傳一個文件,它就會被轉換為 EPUB。
## Example Request {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/to-epub \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@manuscript.docx"
```
## Example Response {#example-response}
回傳 `202 Accepted`。可透過 SSE 在 `/api/v1/jobs/{jobId}/progress` 追蹤進度。
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"async": true
}
```
## Notes {#notes}
- 接受的輸入格式:`.docx``.md``.html``.txt`
- EPUB 輸出遵循 EPUB 3 規範。
- 來源文件中的標題會用來產生目錄。
- 轉換由伺服器上的 Pandoc 處理。
@@ -0,0 +1,46 @@
---
description: "將 Word 文件轉換為 PDF。"
i18n_source_hash: f814ba1a1a53
i18n_provenance: human
i18n_output_hash: 24dc9904a254
---
# Word to PDF {#word-to-pdf}
將 Word 文件、OpenDocument 文字、RTF 或純文字檔案轉換為 PDF。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/files/word-to-pdf`
接受包含 Word/ODT/RTF/TXT 檔案的 multipart form data。
## Parameters {#parameters}
此工具沒有可設定的參數。上傳一個文件,它就會被轉換為 PDF。
## Example Request {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/word-to-pdf \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@report.docx"
```
## Example Response {#example-response}
回傳 `202 Accepted`。可透過 SSE 在 `/api/v1/jobs/{jobId}/progress` 追蹤進度。
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"async": true
}
```
## Notes {#notes}
- 接受的輸入格式:`.docx``.doc``.odt``.rtf``.txt`
- 轉換由伺服器上以無介面模式執行的 LibreOffice 處理。
- 若文件中嵌入了字型則會使用該字型;否則會以系統字型替代。
- 頁首、頁尾、表格與圖片會在 PDF 輸出中保留。
+46
View File
@@ -0,0 +1,46 @@
---
description: "從 XML 擷取重複元素並匯出為 CSV 表格。"
i18n_source_hash: 3ab1019bff8a
i18n_provenance: human
i18n_output_hash: caf29cc797cb
---
# XML to CSV {#xml-to-csv}
從 XML 檔案擷取重複元素並匯出為扁平的 CSV 表格。此工具會自動找出 XML 樹狀結構中第一個物件陣列,並將每個元素對應為一列。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/files/xml-to-csv`
接受包含 XML 檔案的 multipart form data。不需要 settings 欄位。
## Parameters {#parameters}
此工具沒有可設定的參數。重複元素會從 XML 結構自動偵測。
## Example Request {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/xml-to-csv \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@catalog.xml"
```
## Example Response {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/catalog.csv",
"originalSize": 4500,
"processedSize": 1800
}
```
## Notes {#notes}
- 僅接受 `.xml` 檔案作為輸入。
- 此工具會掃描 XML 樹狀結構,找出第一組重複的同層元素,並將其作為列。
- 每個唯一的子元素或屬性名稱都會成為一個 CSV 欄位標頭。
- 這是單向轉換。若需要 JSON/XML 雙向轉換,請使用 [JSON to XML](/zh-TW/tools/files/json-xml) 工具。
+55
View File
@@ -0,0 +1,55 @@
---
description: "在 YAML 與 JSON 之間雙向轉換。"
i18n_source_hash: acf8ca21ee99
i18n_provenance: human
i18n_output_hash: 53f7c91d3528
---
# YAML / JSON {#yaml-json}
在 YAML 與 JSON 格式之間雙向轉換。上傳 YAML 檔案可取得 JSON,或上傳 JSON 檔案可取得 YAML。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/files/yaml-json`
接受包含 YAML 或 JSON 檔案的 multipart form data。不需要 settings 欄位。
## Parameters {#parameters}
此工具沒有可設定的參數。轉換方向由輸入檔案的副檔名決定。
## Example Request {#example-request}
YAML 轉 JSON
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/yaml-json \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@config.yaml"
```
JSON 轉 YAML
```bash
curl -X POST http://localhost:1349/api/v1/tools/files/yaml-json \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@config.json"
```
## Example Response {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/config.json",
"originalSize": 620,
"processedSize": 780
}
```
## Notes {#notes}
- 轉換方向會從輸入檔案的副檔名自動偵測:`.yaml``.yml` 會產生 `.json`,而 `.json` 會產生 `.yaml`
- `.yaml``.yml` 兩種副檔名皆可接受。
- 在多文件的 YAML 檔案中,只會轉換第一個文件;以 `---` 分隔的其他文件會被忽略。