Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Supported backup formats are based on Bookstack API and shown [here](https://dem
2. pdf
3. markdown
4. plaintext
5. zip

### Use Case
The main use case is to backup all docs in a relational directory-tree format to cover the scenarios:
Expand All @@ -79,6 +80,7 @@ formats: # md only example
# - html
# - pdf
# - plaintext
# - zip
output_path: "bkps/"
assets:
export_images: false
Expand Down Expand Up @@ -229,6 +231,7 @@ formats:
- html
- pdf
- plaintext
- zip
http_config:
verify_ssl: false
timeout: 30
Expand Down Expand Up @@ -275,7 +278,7 @@ More descriptions can be found for each section below:
| `credentials` | `object` | `false` | Optional section where Bookstack tokenId and tokenSecret can be specified. Env variable for credentials may be supplied instead. See [Authentication](#authentication) for more details. |
| `credentials.token_id` | `str`| `false` if specified through env var instead, otherwise `true` | A valid Bookstack tokenId. |
| `credentials.token_secret` | `str` | `false` if specified through env var instead, otherwise `true` | A valid Bookstack tokenSecret. |
| `formats` | `list<str>` | `true` | Which export formats to use for Bookstack page content. Valid options are: `["markdown", "html", "pdf", "plaintext"]`|
| `formats` | `list<str>` | `true` | Which export formats to use for Bookstack page content. Valid options are: `["markdown", "html", "pdf", "plaintext", "zip"]`|
| `output_path` | `str` | `false` | Optional (default: `cwd`) which directory (relative or full path) to place exports. User who runs the command should have access to read/write to this directory. This directory and any parent directories will be attempted to be created if they do not exist. If not provided, will use current run directory by default. If using docker, this option can be omitted. |
| `assets` | `object` | `false` | Optional section to export additional assets from pages. |
| `assets.export_images` | `bool` | `false` | Optional (default: `false`), export all images for a page to an `image` directory within page directory. See [Backup Behavior](#backup-behavior) for more information on layout |
Expand Down
1 change: 1 addition & 0 deletions bookstack_file_exporter/archiver/page_archiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"html": ".html",
"pdf": ".pdf",
"plaintext": ".txt",
"zip": ".zip",
"meta": _META_FILE_SUFFIX,
"tar": _TAR_SUFFIX,
"tgz": _TAR_GZ_SUFFIX
Expand Down
2 changes: 1 addition & 1 deletion bookstack_file_exporter/config_helper/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class UserInput(BaseModel):
"""YAML schema for user provided configuration file"""
host: str
credentials: Optional[BookstackAccess] = BookstackAccess()
formats: List[Literal["markdown", "html", "pdf", "plaintext"]]
formats: List[Literal["markdown", "html", "pdf", "plaintext", "zip"]]
output_path: Optional[str] = ""
assets: Optional[Assets] = Assets()
minio: Optional[ObjectStorageConfig] = None
Expand Down
1 change: 1 addition & 0 deletions examples/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ formats:
- html
- pdf
- plaintext
- zip
# optional how to handle additional content for pages
assets:
# optional export of all the images used in a page(s).
Expand Down
1 change: 1 addition & 0 deletions examples/minio_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ formats:
- html
- pdf
- plaintext
- zip
minio:
# a host/ip + port combination is also allowed
# example: "minio.yourdomain.com:8443"
Expand Down