mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
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:
@@ -0,0 +1,53 @@
|
||||
---
|
||||
description: "Buat grafik batang, garis, atau lingkaran dari data CSV atau JSON."
|
||||
i18n_source_hash: d3c39384457b
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: d6e29322db52
|
||||
---
|
||||
|
||||
# Chart Maker {#chart-maker}
|
||||
|
||||
Buat grafik batang, garis, atau lingkaran dari data CSV atau JSON. Mengembalikan gambar PNG dari grafik yang dirender.
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/files/chart-maker`
|
||||
|
||||
Menerima multipart form data berisi file CSV atau JSON dan field JSON `settings`.
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| kind | string | No | `"bar"` | Jenis grafik: `bar`, `line`, `pie` |
|
||||
| title | string | No | - | Judul grafik (maks 120 karakter) |
|
||||
| width | integer | No | `960` | Lebar grafik dalam piksel (320-2048) |
|
||||
| height | integer | No | `540` | Tinggi grafik dalam piksel (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}
|
||||
|
||||
- Input harus berupa file `.csv` atau `.json`. File CSV sebaiknya memiliki baris header dengan nama kolom.
|
||||
- Kolom pertama digunakan sebagai label kategori; kolom kedua harus numerik dan menyediakan nilai data. Hanya dua kolom yang digunakan.
|
||||
- Input JSON harus berupa array objek `{label, value}`, atau objek biasa yang key-nya menjadi label dan value-nya menjadi titik data.
|
||||
- Maksimum 100 titik data. Semua nilai harus nol atau lebih besar.
|
||||
- Output selalu berupa gambar PNG terlepas dari format input.
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
description: "Konversi antar format Word, OpenDocument, RTF, dan teks biasa."
|
||||
i18n_source_hash: 89771292569d
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 172c038b8cec
|
||||
---
|
||||
|
||||
# Convert Document {#convert-document}
|
||||
|
||||
Konversi dokumen antar format Word (DOCX), OpenDocument (ODT), RTF, dan teks biasa menggunakan LibreOffice.
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/files/convert-document`
|
||||
|
||||
Menerima multipart form data berisi file Word/ODT/RTF/TXT dan field JSON `settings`.
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| format | string | Yes | - | Format output: `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}
|
||||
|
||||
Mengembalikan `202 Accepted`. Lacak progres melalui SSE di `/api/v1/jobs/{jobId}/progress`.
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"async": true
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- Format input yang diterima: `.docx`, `.doc`, `.odt`, `.rtf`, `.txt`.
|
||||
- Konversi ditangani oleh LibreOffice yang berjalan headless di server.
|
||||
- Pemformatan kompleks (makro, objek tersemat) mungkin tidak bertahan pada konversi antar format.
|
||||
- Format output harus berbeda dari format input.
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
description: "Konversi antar format presentasi PowerPoint dan OpenDocument."
|
||||
i18n_source_hash: 08ba415d39ac
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 7d3fe3aec067
|
||||
---
|
||||
|
||||
# Convert Presentation {#convert-presentation}
|
||||
|
||||
Konversi presentasi antar format PowerPoint (PPTX) dan OpenDocument Presentation (ODP).
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/files/convert-presentation`
|
||||
|
||||
Menerima multipart form data berisi file PowerPoint/ODP dan field JSON `settings`.
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| format | string | Yes | - | Format output: `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}
|
||||
|
||||
Mengembalikan `202 Accepted`. Lacak progres melalui SSE di `/api/v1/jobs/{jobId}/progress`.
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"async": true
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- Format input yang diterima: `.pptx`, `.ppt`, `.odp`.
|
||||
- Konversi ditangani oleh LibreOffice yang berjalan headless di server.
|
||||
- Efek animasi dan transisi mungkin tidak dipertahankan antar format.
|
||||
- Format output harus berbeda dari format input.
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
description: "Konversi antar format Excel, OpenDocument, dan CSV."
|
||||
i18n_source_hash: b813b1b06962
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 1602c02777fb
|
||||
---
|
||||
|
||||
# Convert Spreadsheet {#convert-spreadsheet}
|
||||
|
||||
Konversi spreadsheet antar format Excel (XLSX), OpenDocument Spreadsheet (ODS), dan CSV. Workbook multi-sheet mengekspor sheet pertama saat dikonversi ke CSV.
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/files/convert-spreadsheet`
|
||||
|
||||
Menerima multipart form data berisi file Excel/ODS/CSV dan field JSON `settings`.
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| format | string | Yes | - | Format output: `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}
|
||||
|
||||
Mengembalikan `202 Accepted`. Lacak progres melalui SSE di `/api/v1/jobs/{jobId}/progress`.
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"async": true
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- Format input yang diterima: `.xlsx`, `.xls`, `.ods`, `.csv`.
|
||||
- Saat mengonversi workbook multi-sheet ke CSV, hanya sheet pertama yang diekspor.
|
||||
- Formula dievaluasi dan diekspor sebagai nilai statis dalam output CSV.
|
||||
- Format output harus berbeda dari format input.
|
||||
@@ -0,0 +1,48 @@
|
||||
---
|
||||
description: "Gabungkan beberapa file menjadi satu arsip ZIP."
|
||||
i18n_source_hash: 9ff1250dbd36
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: ba9c03e72009
|
||||
---
|
||||
|
||||
# Create ZIP {#create-zip}
|
||||
|
||||
Gabungkan beberapa file dari jenis apa pun menjadi satu arsip ZIP. Nama file duplikat secara otomatis dideduplikasi.
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/files/create-zip`
|
||||
|
||||
Menerima multipart form data berisi dua file atau lebih. Tidak diperlukan field settings.
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
Tool ini tidak memiliki parameter yang dapat dikonfigurasi. Unggah 2-50 file dari jenis apa pun untuk digabungkan.
|
||||
|
||||
## 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}
|
||||
|
||||
- Memerlukan antara 2 hingga 50 file input.
|
||||
- Jenis file apa pun diterima; tidak ada batasan pada format input.
|
||||
- Jika beberapa file memiliki nama yang sama, file tersebut secara otomatis dideduplikasi dengan sufiks numerik.
|
||||
- Arsip output menggunakan kompresi ZIP standar (deflate).
|
||||
@@ -0,0 +1,59 @@
|
||||
---
|
||||
description: "Konversi antar CSV dan Excel (XLSX), kedua arah."
|
||||
i18n_source_hash: 213297311e36
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: bccfe71483ad
|
||||
---
|
||||
|
||||
# CSV to Excel {#csv-to-excel}
|
||||
|
||||
Konversi antar format CSV dan Excel (XLSX) dalam kedua arah. Unggah file CSV atau TSV untuk mendapatkan XLSX, atau unggah file XLSX untuk mendapatkan CSV.
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/files/csv-excel`
|
||||
|
||||
Menerima multipart form data berisi file CSV, TSV, atau XLSX dan field JSON `settings`.
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| sheet | integer | No | `1` | Nomor worksheet yang diekspor saat mengonversi dari XLSX (min 1) |
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
CSV ke 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 ke 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}
|
||||
|
||||
- Arah konversi terdeteksi otomatis dari ekstensi file input: `.csv` atau `.tsv` menghasilkan `.xlsx`, dan `.xlsx` menghasilkan `.csv`.
|
||||
- Parameter `sheet` hanya berlaku saat mengonversi dari XLSX. Parameter ini memilih worksheet mana yang diekspor.
|
||||
- File TSV (nilai yang dipisahkan tab) didukung selain CSV.
|
||||
@@ -0,0 +1,60 @@
|
||||
---
|
||||
description: "Konversi antar CSV dan JSON, kedua arah."
|
||||
i18n_source_hash: 978c08ad46d3
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 690573599e35
|
||||
---
|
||||
|
||||
# CSV to JSON {#csv-to-json}
|
||||
|
||||
Konversi antar format CSV dan JSON dalam kedua arah. Unggah file CSV atau TSV untuk mendapatkan array objek JSON, atau unggah array JSON untuk mendapatkan file CSV.
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/files/csv-json`
|
||||
|
||||
Menerima multipart form data berisi file CSV, TSV, atau JSON dan field JSON `settings`.
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| pretty | boolean | No | `true` | Cetak-rapi output JSON dengan indentasi |
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
CSV ke 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 ke 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}
|
||||
|
||||
- Arah konversi terdeteksi otomatis dari ekstensi file input: `.csv` atau `.tsv` menghasilkan `.json`, dan `.json` menghasilkan `.csv`.
|
||||
- Parameter `pretty` hanya memengaruhi output JSON. Ketika diatur ke `false`, output berupa string JSON satu baris yang kompak.
|
||||
- Input JSON harus berupa array objek dengan key yang konsisten. Setiap objek menjadi baris, dan setiap key menjadi header kolom.
|
||||
- File TSV (nilai yang dipisahkan tab) didukung selain CSV.
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
description: "Konversi EPUB ke PDF, DOCX, HTML, atau Markdown."
|
||||
i18n_source_hash: 7d94fc18ca97
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: cf8d4169cf9e
|
||||
---
|
||||
|
||||
# Convert EPUB {#convert-epub}
|
||||
|
||||
Konversi e-book EPUB ke PDF, Word (DOCX), HTML, atau Markdown. Sumber daya jarak jauh di dalam buku tidak diambil.
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/files/epub-convert`
|
||||
|
||||
Menerima multipart form data berisi file EPUB dan field JSON `settings`.
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| format | string | Yes | - | Format output: `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}
|
||||
|
||||
Mengembalikan `202 Accepted`. Lacak progres melalui SSE di `/api/v1/jobs/{jobId}/progress`.
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"async": true
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- Format input yang diterima: `.epub`.
|
||||
- Sumber daya jarak jauh yang tersemat dalam EPUB (gambar eksternal, font) tidak diambil demi keamanan.
|
||||
- Kualitas gambar dalam output hasil konversi dapat bervariasi tergantung struktur EPUB.
|
||||
- Konversi ditangani oleh Pandoc di server.
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
description: "Konversi spreadsheet ke PDF."
|
||||
i18n_source_hash: 4dbe2a810ea6
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: cf5be447771f
|
||||
---
|
||||
|
||||
# Excel to PDF {#excel-to-pdf}
|
||||
|
||||
Konversi spreadsheet Excel, OpenDocument, atau CSV ke PDF. Sheet yang lebar dapat dipaginasi menjadi beberapa halaman.
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/files/excel-to-pdf`
|
||||
|
||||
Menerima multipart form data berisi file Excel/ODS/CSV.
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
Tool ini tidak memiliki parameter yang dapat dikonfigurasi. Unggah spreadsheet dan file tersebut akan dikonversi ke 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}
|
||||
|
||||
Mengembalikan `202 Accepted`. Lacak progres melalui SSE di `/api/v1/jobs/{jobId}/progress`.
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"async": true
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- Format input yang diterima: `.xlsx`, `.xls`, `.ods`, `.csv`.
|
||||
- Sheet yang lebar dapat dipecah menjadi beberapa halaman dalam PDF yang dihasilkan.
|
||||
- Grafik dan pemformatan bersyarat dirender dalam output PDF.
|
||||
- Konversi ditangani oleh LibreOffice yang berjalan headless di server.
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
description: "Ekstrak file dari arsip ZIP dengan aman disertai perlindungan bomb."
|
||||
i18n_source_hash: 484a1f1051b8
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 70a363ab5d2a
|
||||
---
|
||||
|
||||
# Extract ZIP {#extract-zip}
|
||||
|
||||
Ekstrak file dari arsip ZIP dengan aman. Arsip berisi satu file mengembalikan file yang terkandung secara langsung; arsip berisi banyak file mengembalikan ZIP datar dengan konten yang telah diekstrak.
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/files/extract-zip`
|
||||
|
||||
Menerima multipart form data berisi file ZIP. Tidak diperlukan field settings.
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
Tool ini tidak memiliki parameter yang dapat dikonfigurasi. Unggah file `.zip` untuk diekstrak.
|
||||
|
||||
## 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}
|
||||
|
||||
- Hanya file `.zip` yang diterima sebagai input.
|
||||
- Jika arsip berisi satu file, file tersebut dikembalikan secara langsung (tidak dibungkus dalam ZIP).
|
||||
- Jika arsip berisi banyak file, ZIP datar dikembalikan dengan semua file diekstrak ke level root (struktur direktori bersarang diratakan).
|
||||
- Perlindungan bomb bawaan menolak arsip dengan rasio kompresi atau jumlah file yang berlebihan untuk mencegah penipisan sumber daya.
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
description: "Konversi file HTML ke PDF."
|
||||
i18n_source_hash: 20b9ae147db5
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 8ea754992c7f
|
||||
---
|
||||
|
||||
# HTML to PDF {#html-to-pdf}
|
||||
|
||||
Konversi file HTML menjadi dokumen PDF yang tergaya. Sumber daya jarak jauh (gambar eksternal, stylesheet, skrip) dinonaktifkan demi privasi.
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/files/html-to-pdf`
|
||||
|
||||
Menerima multipart form data berisi file HTML.
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
Tool ini tidak memiliki parameter yang dapat dikonfigurasi. Unggah file HTML dan file tersebut akan dikonversi ke 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}
|
||||
|
||||
Mengembalikan `202 Accepted`. Lacak progres melalui SSE di `/api/v1/jobs/{jobId}/progress`.
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"async": true
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- Format input yang diterima: `.html`, `.htm`.
|
||||
- Sumber daya jarak jauh (gambar, stylesheet, skrip yang dirujuk via URL) tidak diambil demi privasi dan keamanan.
|
||||
- Gaya inline dan gambar tersemat (data URI) dipertahankan.
|
||||
- Konversi ditangani oleh WeasyPrint di server.
|
||||
@@ -0,0 +1,59 @@
|
||||
---
|
||||
description: "Konversi antar JSON dan XML, kedua arah."
|
||||
i18n_source_hash: b3a6ded0c64a
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: d1e21e81a2e4
|
||||
---
|
||||
|
||||
# JSON to XML {#json-to-xml}
|
||||
|
||||
Konversi antar format JSON dan XML dalam kedua arah. Unggah file JSON untuk mendapatkan XML, atau unggah file XML untuk mendapatkan JSON.
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/files/json-xml`
|
||||
|
||||
Menerima multipart form data berisi file JSON atau XML dan field JSON `settings`.
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| pretty | boolean | No | `true` | Cetak-rapi output dengan indentasi |
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
JSON ke 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 ke 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}
|
||||
|
||||
- Arah konversi terdeteksi otomatis dari ekstensi file input: `.json` menghasilkan `.xml`, dan `.xml` menghasilkan `.json`.
|
||||
- Parameter `pretty` berlaku untuk kedua arah. Ketika `false`, output menjadi kompak tanpa indentasi.
|
||||
- Atribut XML dan struktur bersarang dipertahankan selama konversi bolak-balik jika memungkinkan.
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
description: "Konversi file Markdown ke dokumen Word (DOCX)."
|
||||
i18n_source_hash: 979cb8ee13f2
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 8e47521a61e3
|
||||
---
|
||||
|
||||
# Markdown to Word {#markdown-to-word}
|
||||
|
||||
Konversi file Markdown menjadi dokumen Word (DOCX), mempertahankan heading, daftar, blok kode, dan pemformatan lainnya.
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/files/markdown-to-docx`
|
||||
|
||||
Menerima multipart form data berisi file Markdown.
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
Tool ini tidak memiliki parameter yang dapat dikonfigurasi. Unggah file Markdown dan file tersebut akan dikonversi ke 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}
|
||||
|
||||
- Format input yang diterima: `.md`, `.markdown`.
|
||||
- Ini adalah tool cepat (sinkron) yang mengembalikan hasil secara langsung.
|
||||
- Heading, tebal, miring, tautan, blok kode, dan daftar dipetakan ke gaya Word.
|
||||
- Konversi ditangani oleh Pandoc di server.
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
description: "Konversi file Markdown ke halaman HTML mandiri."
|
||||
i18n_source_hash: 3ef805e8fc8c
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: f31cb7836032
|
||||
---
|
||||
|
||||
# Markdown to HTML {#markdown-to-html}
|
||||
|
||||
Konversi file Markdown menjadi halaman HTML mandiri. Gambar jarak jauh yang dirujuk dalam sumber dibiarkan apa adanya pada output.
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/files/markdown-to-html`
|
||||
|
||||
Menerima multipart form data berisi file Markdown.
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
Tool ini tidak memiliki parameter yang dapat dikonfigurasi. Unggah file Markdown dan file tersebut akan dikonversi ke 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}
|
||||
|
||||
- Format input yang diterima: `.md`, `.markdown`.
|
||||
- Ini adalah tool cepat (sinkron) yang mengembalikan hasil secara langsung.
|
||||
- Output berupa halaman HTML mandiri dengan gaya inline.
|
||||
- URL gambar jarak jauh dalam sumber Markdown dipertahankan apa adanya dan tidak diambil.
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
description: "Konversi berkas Markdown menjadi PDF bergaya."
|
||||
i18n_source_hash: 18474dc8772a
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: f7abdf1cddf6
|
||||
---
|
||||
|
||||
# Markdown ke PDF {#markdown-to-pdf}
|
||||
|
||||
Konversi berkas Markdown menjadi dokumen PDF bergaya. Sumber daya jarak jauh dinonaktifkan demi privasi.
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/files/markdown-to-pdf`
|
||||
|
||||
Menerima data formulir multipart dengan berkas Markdown.
|
||||
|
||||
## Parameter {#parameters}
|
||||
|
||||
Alat ini tidak memiliki parameter yang dapat dikonfigurasi. Unggah berkas Markdown dan berkas tersebut akan dikonversi menjadi PDF.
|
||||
|
||||
## Contoh Permintaan {#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"
|
||||
```
|
||||
|
||||
## Contoh Respons {#example-response}
|
||||
|
||||
Mengembalikan `202 Accepted`. Lacak progres melalui SSE di `/api/v1/jobs/{jobId}/progress`.
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"async": true
|
||||
}
|
||||
```
|
||||
|
||||
## Catatan {#notes}
|
||||
|
||||
- Format input yang diterima: `.md`, `.markdown`.
|
||||
- Sumber daya jarak jauh (gambar, lembar gaya yang dirujuk melalui URL) tidak diambil demi privasi dan keamanan.
|
||||
- Markdown pertama-tama dirender ke HTML, lalu dikonversi menjadi PDF melalui WeasyPrint.
|
||||
- Blok kode, tabel, dan elemen Markdown lainnya diberi gaya dalam keluaran PDF.
|
||||
@@ -0,0 +1,48 @@
|
||||
---
|
||||
description: "Gabungkan beberapa berkas CSV atau TSV dengan kolom yang cocok menjadi satu."
|
||||
i18n_source_hash: 109b5f399ac8
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: cefbd1f5633d
|
||||
---
|
||||
|
||||
# Gabungkan CSV {#merge-csvs}
|
||||
|
||||
Gabungkan beberapa berkas CSV atau TSV dengan kolom yang cocok menjadi satu berkas gabungan. Semua berkas input harus memiliki header kolom yang sama.
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/files/merge-csvs`
|
||||
|
||||
Menerima data formulir multipart dengan dua atau lebih berkas CSV. Tidak diperlukan bidang pengaturan.
|
||||
|
||||
## Parameter {#parameters}
|
||||
|
||||
Alat ini tidak memiliki parameter yang dapat dikonfigurasi. Unggah 2-20 berkas CSV atau TSV dengan header kolom yang cocok.
|
||||
|
||||
## Contoh Permintaan {#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"
|
||||
```
|
||||
|
||||
## Contoh Respons {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/merged.csv",
|
||||
"originalSize": 30000,
|
||||
"processedSize": 28500
|
||||
}
|
||||
```
|
||||
|
||||
## Catatan {#notes}
|
||||
|
||||
- Memerlukan antara 2 hingga 20 berkas input.
|
||||
- Semua berkas harus memiliki header kolom yang sama. Penggabungan akan gagal jika kolom tidak cocok.
|
||||
- Baris header disertakan sekali dalam keluaran; baris data dari semua berkas digabungkan sesuai urutan pengunggahan.
|
||||
- Baik berkas CSV maupun TSV diterima, tetapi semua berkas dalam satu permintaan harus menggunakan pembatas yang sama.
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
description: "Konversi presentasi menjadi PDF."
|
||||
i18n_source_hash: 49bd71c46bed
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 4bf864dbebcf
|
||||
---
|
||||
|
||||
# PowerPoint ke PDF {#powerpoint-to-pdf}
|
||||
|
||||
Konversi presentasi PowerPoint atau OpenDocument menjadi PDF, dengan satu slide per halaman.
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/files/powerpoint-to-pdf`
|
||||
|
||||
Menerima data formulir multipart dengan berkas PowerPoint/ODP.
|
||||
|
||||
## Parameter {#parameters}
|
||||
|
||||
Alat ini tidak memiliki parameter yang dapat dikonfigurasi. Unggah presentasi dan presentasi tersebut akan dikonversi menjadi PDF.
|
||||
|
||||
## Contoh Permintaan {#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"
|
||||
```
|
||||
|
||||
## Contoh Respons {#example-response}
|
||||
|
||||
Mengembalikan `202 Accepted`. Lacak progres melalui SSE di `/api/v1/jobs/{jobId}/progress`.
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"async": true
|
||||
}
|
||||
```
|
||||
|
||||
## Catatan {#notes}
|
||||
|
||||
- Format input yang diterima: `.pptx`, `.ppt`, `.odp`.
|
||||
- Setiap slide menjadi satu halaman dalam PDF.
|
||||
- Konversi ditangani oleh LibreOffice yang berjalan headless di server.
|
||||
- Animasi dan transisi tidak disertakan dalam keluaran PDF.
|
||||
@@ -0,0 +1,50 @@
|
||||
---
|
||||
description: "Pisahkan CSV menjadi berkas-berkas lebih kecil berdasarkan jumlah baris."
|
||||
i18n_source_hash: a35dce4a99a3
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 8e7485f67004
|
||||
---
|
||||
|
||||
# Pisahkan CSV {#split-csv}
|
||||
|
||||
Pisahkan berkas CSV atau TSV besar menjadi berkas-berkas lebih kecil berdasarkan jumlah baris. Mengembalikan arsip ZIP yang berisi bagian-bagiannya.
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/files/split-csv`
|
||||
|
||||
Menerima data formulir multipart dengan berkas CSV dan bidang JSON `settings`.
|
||||
|
||||
## Parameter {#parameters}
|
||||
|
||||
| Parameter | Tipe | Wajib | Bawaan | Deskripsi |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| rowsPerFile | integer | Tidak | `1000` | Jumlah baris data per berkas keluaran (1-1.000.000) |
|
||||
| keepHeader | boolean | Tidak | `true` | Ulangi baris header di setiap berkas keluaran |
|
||||
|
||||
## Contoh Permintaan {#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}'
|
||||
```
|
||||
|
||||
## Contoh Respons {#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
|
||||
}
|
||||
```
|
||||
|
||||
## Catatan {#notes}
|
||||
|
||||
- Keluaran selalu berupa arsip ZIP yang berisi bagian-bagian CSV yang dipisahkan, dinamai secara berurutan (mis. `part-1.csv`, `part-2.csv`).
|
||||
- Ketika `keepHeader` bernilai `true`, setiap bagian menyertakan baris header asli sehingga setiap berkas dapat digunakan secara mandiri.
|
||||
- Baik berkas CSV maupun TSV diterima sebagai input.
|
||||
- Jumlah baris hanya merujuk pada baris data; baris header tidak dihitung.
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
description: "Konversi berkas Word, Markdown, HTML, atau teks biasa menjadi EPUB."
|
||||
i18n_source_hash: 63e1afa91c52
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: fa7e6db41fb7
|
||||
---
|
||||
|
||||
# Konversi ke EPUB {#convert-to-epub}
|
||||
|
||||
Konversi dokumen Word, Markdown, HTML, atau berkas teks biasa menjadi format e-book EPUB.
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/files/to-epub`
|
||||
|
||||
Menerima data formulir multipart dengan berkas Word/Markdown/HTML/TXT.
|
||||
|
||||
## Parameter {#parameters}
|
||||
|
||||
Alat ini tidak memiliki parameter yang dapat dikonfigurasi. Unggah dokumen dan dokumen tersebut akan dikonversi menjadi EPUB.
|
||||
|
||||
## Contoh Permintaan {#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"
|
||||
```
|
||||
|
||||
## Contoh Respons {#example-response}
|
||||
|
||||
Mengembalikan `202 Accepted`. Lacak progres melalui SSE di `/api/v1/jobs/{jobId}/progress`.
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"async": true
|
||||
}
|
||||
```
|
||||
|
||||
## Catatan {#notes}
|
||||
|
||||
- Format input yang diterima: `.docx`, `.md`, `.html`, `.txt`.
|
||||
- Keluaran EPUB mengikuti spesifikasi EPUB 3.
|
||||
- Judul dalam dokumen sumber digunakan untuk menghasilkan daftar isi.
|
||||
- Konversi ditangani oleh Pandoc di server.
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
description: "Konversi dokumen Word menjadi PDF."
|
||||
i18n_source_hash: f814ba1a1a53
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 1289f9ccc0c1
|
||||
---
|
||||
|
||||
# Word ke PDF {#word-to-pdf}
|
||||
|
||||
Konversi dokumen Word, teks OpenDocument, RTF, atau berkas teks biasa menjadi PDF.
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/files/word-to-pdf`
|
||||
|
||||
Menerima data formulir multipart dengan berkas Word/ODT/RTF/TXT.
|
||||
|
||||
## Parameter {#parameters}
|
||||
|
||||
Alat ini tidak memiliki parameter yang dapat dikonfigurasi. Unggah dokumen dan dokumen tersebut akan dikonversi menjadi PDF.
|
||||
|
||||
## Contoh Permintaan {#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"
|
||||
```
|
||||
|
||||
## Contoh Respons {#example-response}
|
||||
|
||||
Mengembalikan `202 Accepted`. Lacak progres melalui SSE di `/api/v1/jobs/{jobId}/progress`.
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"async": true
|
||||
}
|
||||
```
|
||||
|
||||
## Catatan {#notes}
|
||||
|
||||
- Format input yang diterima: `.docx`, `.doc`, `.odt`, `.rtf`, `.txt`.
|
||||
- Konversi ditangani oleh LibreOffice yang berjalan headless di server.
|
||||
- Font yang tertanam dalam dokumen digunakan jika tersedia; jika tidak, font sistem menjadi penggantinya.
|
||||
- Header, footer, tabel, dan gambar dipertahankan dalam keluaran PDF.
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
description: "Ekstrak elemen berulang dari XML ke dalam tabel CSV."
|
||||
i18n_source_hash: 3ab1019bff8a
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: c0b5517a5c0c
|
||||
---
|
||||
|
||||
# XML ke CSV {#xml-to-csv}
|
||||
|
||||
Ekstrak elemen berulang dari berkas XML ke dalam tabel CSV datar. Alat ini secara otomatis menemukan larik objek pertama dalam pohon XML dan memetakan setiap elemen ke sebuah baris.
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/files/xml-to-csv`
|
||||
|
||||
Menerima data formulir multipart dengan berkas XML. Tidak diperlukan bidang pengaturan.
|
||||
|
||||
## Parameter {#parameters}
|
||||
|
||||
Alat ini tidak memiliki parameter yang dapat dikonfigurasi. Elemen berulang dideteksi secara otomatis dari struktur XML.
|
||||
|
||||
## Contoh Permintaan {#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"
|
||||
```
|
||||
|
||||
## Contoh Respons {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/catalog.csv",
|
||||
"originalSize": 4500,
|
||||
"processedSize": 1800
|
||||
}
|
||||
```
|
||||
|
||||
## Catatan {#notes}
|
||||
|
||||
- Hanya berkas `.xml` yang diterima sebagai input.
|
||||
- Alat ini memindai pohon XML untuk menemukan kumpulan elemen bersaudara berulang pertama dan menggunakannya sebagai baris.
|
||||
- Setiap nama elemen anak atau atribut yang unik menjadi header kolom CSV.
|
||||
- Ini adalah konversi satu arah. Untuk konversi JSON/XML dua arah, gunakan alat [JSON ke XML](/id/tools/files/json-xml).
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
description: "Konversi antara YAML dan JSON, dua arah."
|
||||
i18n_source_hash: acf8ca21ee99
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 5e593eb54bf0
|
||||
---
|
||||
|
||||
# YAML / JSON {#yaml-json}
|
||||
|
||||
Konversi antara format YAML dan JSON dalam kedua arah. Unggah berkas YAML untuk mendapatkan JSON, atau unggah berkas JSON untuk mendapatkan YAML.
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/files/yaml-json`
|
||||
|
||||
Menerima data formulir multipart dengan berkas YAML atau JSON. Tidak diperlukan bidang pengaturan.
|
||||
|
||||
## Parameter {#parameters}
|
||||
|
||||
Alat ini tidak memiliki parameter yang dapat dikonfigurasi. Arah konversi ditentukan oleh ekstensi berkas input.
|
||||
|
||||
## Contoh Permintaan {#example-request}
|
||||
|
||||
YAML ke 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 ke 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"
|
||||
```
|
||||
|
||||
## Contoh Respons {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/config.json",
|
||||
"originalSize": 620,
|
||||
"processedSize": 780
|
||||
}
|
||||
```
|
||||
|
||||
## Catatan {#notes}
|
||||
|
||||
- Arah konversi dideteksi secara otomatis dari ekstensi berkas input: `.yaml` atau `.yml` menghasilkan `.json`, dan `.json` menghasilkan `.yaml`.
|
||||
- Baik ekstensi `.yaml` maupun `.yml` diterima.
|
||||
- Hanya dokumen pertama dalam berkas YAML multi-dokumen yang dikonversi; dokumen tambahan yang dipisahkan oleh `---` diabaikan.
|
||||
Reference in New Issue
Block a user