mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Add API /api/export/exportResources to export files and folders (#8841)
This commit is contained in:
parent
9ee922794e
commit
0c7e16e558
5 changed files with 162 additions and 0 deletions
40
API.md
40
API.md
|
|
@ -47,6 +47,7 @@
|
|||
* [List files](#List-files)
|
||||
* [Export](#Export)
|
||||
* [Export Markdown](#Export-Markdown)
|
||||
* [Export Files and Folders](#Export-files-and-folders)
|
||||
* [Conversion](#Conversion)
|
||||
* [Pandoc](#Pandoc)
|
||||
* [Notification](#Notification)
|
||||
|
|
@ -1118,6 +1119,45 @@ View API token in <kbd>Settings - About</kbd>, request header: `Authorization: T
|
|||
* `hPath`: human-readable path
|
||||
* `content`: Markdown content
|
||||
|
||||
### Export files and folders
|
||||
|
||||
* `/api/export/exportResources`
|
||||
* Parameters
|
||||
|
||||
```json
|
||||
{
|
||||
"paths": [
|
||||
"/conf/appearance/boot",
|
||||
"/conf/appearance/langs",
|
||||
"/conf/appearance/emojis/conf.json",
|
||||
"/conf/appearance/icons/index.html",
|
||||
],
|
||||
"name": "zip-file-name"
|
||||
}
|
||||
```
|
||||
|
||||
* `paths`: A list of file or folder paths to be exported, the same filename/folder name will be overwritten
|
||||
* `name`: (Optional) The exported file name, which defaults to `export-YYYY-MM-DD_hh-mm-ss.zip` when not set
|
||||
* Return value
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
"msg": "",
|
||||
"data": {
|
||||
"path": "temp/export/zip-file-name.zip"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
* `path`: The path of `*.zip` file created
|
||||
* The directory structure in `zip-file-name.zip` is as follows:
|
||||
* `zip-file-name`
|
||||
* `boot`
|
||||
* `langs`
|
||||
* `conf.json`
|
||||
* `index.html`
|
||||
|
||||
## Conversion
|
||||
|
||||
### Pandoc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue