docs: organize tool pages by modality under /tools/<modality>/

Move all 157 tool pages into image/video/audio/pdf/data subfolders so URLs read /tools/<modality>/<id> (e.g. /tools/image/crop). Nest the image sub-categories under an Image group in the sidebar so the nav reads by modality. Add public/_redirects (301, clean + .html forms) mapping every old flat /tools/<id> URL to its new path so inbound links keep working. Rewrite all internal /tools links. Verified with a clean docs build (no dead links).
This commit is contained in:
SnapOtter
2026-06-18 14:12:28 +08:00
parent 03c1a5e36f
commit d24e244af4
162 changed files with 874 additions and 554 deletions
+49
View File
@@ -0,0 +1,49 @@
---
description: Create bar, line, or pie charts from CSV or JSON data.
---
# Chart Maker
Create bar, line, or pie charts from CSV or JSON data. Returns a PNG image of the rendered chart.
## API Endpoint
`POST /api/v1/tools/data/chart-maker`
Accepts multipart form data with a CSV or JSON file and a JSON `settings` field.
## Parameters
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| kind | string | No | `"bar"` | Chart type: `bar`, `line`, `pie` |
| title | string | No | - | Chart title (max 120 characters) |
| width | integer | No | `960` | Chart width in pixels (320--2048) |
| height | integer | No | `540` | Chart height in pixels (240--1536) |
## Example Request
```bash
curl -X POST http://localhost:1349/api/v1/tools/data/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
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/sales.png",
"originalSize": 1024,
"processedSize": 48500
}
```
## Notes
- Input must be a `.csv` or `.json` file. CSV files should have a header row with column names.
- The first column is used as the category axis; remaining numeric columns become data series.
- JSON input should be an array of objects with consistent keys.
- Output is always a PNG image regardless of input format.
+45
View File
@@ -0,0 +1,45 @@
---
description: Bundle multiple files into a single ZIP archive.
---
# Create ZIP
Bundle multiple files of any type into a single ZIP archive. Duplicate filenames are automatically deduplicated.
## API Endpoint
`POST /api/v1/tools/data/create-zip`
Accepts multipart form data with two or more files. No settings field is required.
## Parameters
This tool has no configurable parameters. Upload 2--50 files of any type to bundle.
## Example Request
```bash
curl -X POST http://localhost:1349/api/v1/tools/data/create-zip \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@report.pdf" \
-F "file=@data.csv" \
-F "file=@photo.jpg"
```
## 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
- Requires between 2 and 50 input files.
- Any file type is accepted; there are no restrictions on input format.
- If multiple files share the same name, they are automatically deduplicated with numeric suffixes.
- The output archive uses standard ZIP compression (deflate).
+56
View File
@@ -0,0 +1,56 @@
---
description: Convert between CSV and Excel (XLSX), both directions.
---
# CSV to Excel
Convert between CSV and Excel (XLSX) formats in both directions. Upload a CSV or TSV file to get XLSX, or upload an XLSX file to get CSV.
## API Endpoint
`POST /api/v1/tools/data/csv-excel`
Accepts multipart form data with a CSV, TSV, or XLSX file and a JSON `settings` field.
## Parameters
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| sheet | integer | No | `1` | Worksheet number to export when converting from XLSX (min 1) |
## Example Request
CSV to Excel:
```bash
curl -X POST http://localhost:1349/api/v1/tools/data/csv-excel \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@data.csv" \
-F 'settings={"sheet": 1}'
```
Excel to CSV:
```bash
curl -X POST http://localhost:1349/api/v1/tools/data/csv-excel \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@report.xlsx" \
-F 'settings={"sheet": 2}'
```
## 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
- Conversion direction is auto-detected from the input file extension: `.csv` or `.tsv` produces `.xlsx`, and `.xlsx` produces `.csv`.
- The `sheet` parameter only applies when converting from XLSX. It selects which worksheet to export.
- TSV (tab-separated values) files are supported alongside CSV.
+57
View File
@@ -0,0 +1,57 @@
---
description: Convert between CSV and JSON, both directions.
---
# CSV to JSON
Convert between CSV and JSON formats in both directions. Upload a CSV or TSV file to get a JSON array of objects, or upload a JSON array to get a CSV file.
## API Endpoint
`POST /api/v1/tools/data/csv-json`
Accepts multipart form data with a CSV, TSV, or JSON file and a JSON `settings` field.
## Parameters
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| pretty | boolean | No | `true` | Pretty-print JSON output with indentation |
## Example Request
CSV to JSON:
```bash
curl -X POST http://localhost:1349/api/v1/tools/data/csv-json \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@users.csv" \
-F 'settings={"pretty": true}'
```
JSON to CSV:
```bash
curl -X POST http://localhost:1349/api/v1/tools/data/csv-json \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@users.json" \
-F 'settings={}'
```
## 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
- Conversion direction is auto-detected from the input file extension: `.csv` or `.tsv` produces `.json`, and `.json` produces `.csv`.
- The `pretty` parameter only affects JSON output. When set to `false`, the output is a compact single-line JSON string.
- JSON input must be an array of objects with consistent keys. Each object becomes a row, and each key becomes a column header.
- TSV (tab-separated values) files are supported alongside CSV.
+43
View File
@@ -0,0 +1,43 @@
---
description: Safely extract files from a ZIP archive with bomb protection.
---
# Extract ZIP
Safely extract files from a ZIP archive. Single-file archives return the contained file directly; multi-file archives return a flat ZIP with the extracted contents.
## API Endpoint
`POST /api/v1/tools/data/extract-zip`
Accepts multipart form data with a ZIP file. No settings field is required.
## Parameters
This tool has no configurable parameters. Upload a `.zip` file to extract.
## Example Request
```bash
curl -X POST http://localhost:1349/api/v1/tools/data/extract-zip \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@archive.zip"
```
## Example Response
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/archive.zip",
"originalSize": 2800000,
"processedSize": 3500000
}
```
## Notes
- Only `.zip` files are accepted as input.
- If the archive contains a single file, that file is returned directly (not wrapped in a ZIP).
- If the archive contains multiple files, a flat ZIP is returned with all files extracted to the root level (nested directory structure is flattened).
- Built-in bomb protection rejects archives with excessive compression ratios or file counts to prevent resource exhaustion.
+56
View File
@@ -0,0 +1,56 @@
---
description: Convert between JSON and XML, both directions.
---
# JSON to XML
Convert between JSON and XML formats in both directions. Upload a JSON file to get XML, or upload an XML file to get JSON.
## API Endpoint
`POST /api/v1/tools/data/json-xml`
Accepts multipart form data with a JSON or XML file and a JSON `settings` field.
## Parameters
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| pretty | boolean | No | `true` | Pretty-print output with indentation |
## Example Request
JSON to XML:
```bash
curl -X POST http://localhost:1349/api/v1/tools/data/json-xml \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@config.json" \
-F 'settings={"pretty": true}'
```
XML to JSON:
```bash
curl -X POST http://localhost:1349/api/v1/tools/data/json-xml \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@config.xml" \
-F 'settings={"pretty": true}'
```
## 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
- Conversion direction is auto-detected from the input file extension: `.json` produces `.xml`, and `.xml` produces `.json`.
- The `pretty` parameter applies to both directions. When `false`, the output is compact with no indentation.
- XML attributes and nested structures are preserved during round-trip conversion where possible.
+45
View File
@@ -0,0 +1,45 @@
---
description: Combine multiple CSV or TSV files with matching columns into one.
---
# Merge CSVs
Combine multiple CSV or TSV files with matching columns into a single merged file. All input files must have the same column headers.
## API Endpoint
`POST /api/v1/tools/data/merge-csvs`
Accepts multipart form data with two or more CSV files. No settings field is required.
## Parameters
This tool has no configurable parameters. Upload 2--20 CSV or TSV files with matching column headers.
## Example Request
```bash
curl -X POST http://localhost:1349/api/v1/tools/data/merge-csvs \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@january.csv" \
-F "file=@february.csv" \
-F "file=@march.csv"
```
## 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
- Requires between 2 and 20 input files.
- All files must share the same column headers. The merge will fail if columns do not match.
- The header row is included once in the output; data rows from all files are concatenated in upload order.
- Both CSV and TSV files are accepted, but all files in a single request should use the same delimiter.
+47
View File
@@ -0,0 +1,47 @@
---
description: Split a CSV into smaller files by row count.
---
# Split CSV
Split a large CSV or TSV file into smaller files by row count. Returns a ZIP archive containing the parts.
## API Endpoint
`POST /api/v1/tools/data/split-csv`
Accepts multipart form data with a CSV file and a JSON `settings` field.
## Parameters
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| rowsPerFile | integer | No | `1000` | Number of data rows per output file (1--1,000,000) |
| keepHeader | boolean | No | `true` | Repeat the header row in each output file |
## Example Request
```bash
curl -X POST http://localhost:1349/api/v1/tools/data/split-csv \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@large-dataset.csv" \
-F 'settings={"rowsPerFile": 500, "keepHeader": true}'
```
## Example Response
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/large-dataset-split.zip",
"originalSize": 1048576,
"processedSize": 1050000
}
```
## Notes
- Output is always a ZIP archive containing the split CSV parts, named sequentially (e.g. `part-1.csv`, `part-2.csv`).
- When `keepHeader` is `true`, each part includes the original header row so each file can be used independently.
- Both CSV and TSV files are accepted as input.
- The row count refers to data rows only; the header row is not counted.
+43
View File
@@ -0,0 +1,43 @@
---
description: Extract repeating elements from XML into a CSV table.
---
# XML to CSV
Extract repeating elements from an XML file into a flat CSV table. The tool automatically finds the first array of objects in the XML tree and maps each element to a row.
## API Endpoint
`POST /api/v1/tools/data/xml-to-csv`
Accepts multipart form data with an XML file. No settings field is required.
## Parameters
This tool has no configurable parameters. The repeating element is auto-detected from the XML structure.
## Example Request
```bash
curl -X POST http://localhost:1349/api/v1/tools/data/xml-to-csv \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@catalog.xml"
```
## 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
- Only `.xml` files are accepted as input.
- The tool scans the XML tree for the first repeating set of sibling elements and uses those as rows.
- Each unique child element or attribute name becomes a CSV column header.
- This is a one-way conversion. For bidirectional JSON/XML conversion, use the [JSON to XML](/tools/data/json-xml) tool.
+52
View File
@@ -0,0 +1,52 @@
---
description: Convert between YAML and JSON, both directions.
---
# YAML / JSON
Convert between YAML and JSON formats in both directions. Upload a YAML file to get JSON, or upload a JSON file to get YAML.
## API Endpoint
`POST /api/v1/tools/data/yaml-json`
Accepts multipart form data with a YAML or JSON file. No settings field is required.
## Parameters
This tool has no configurable parameters. The conversion direction is determined by the input file extension.
## Example Request
YAML to JSON:
```bash
curl -X POST http://localhost:1349/api/v1/tools/data/yaml-json \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@config.yaml"
```
JSON to YAML:
```bash
curl -X POST http://localhost:1349/api/v1/tools/data/yaml-json \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@config.json"
```
## 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
- Conversion direction is auto-detected from the input file extension: `.yaml` or `.yml` produces `.json`, and `.json` produces `.yaml`.
- Both `.yaml` and `.yml` extensions are accepted.
- Multi-document YAML files (separated by `---`) are supported.