Sympli integration preprocessor for Foliant.
Project description
# BindSympli
BindSympli is a tool to download design layout images from [Sympli](https://sympli.io/) CDN using certain [Sympli](https://sympli.io/) account, to resize these images, and to bind them with the documentation project.
## Installation
Before using BindSympli, you need to install [Node.js](https://nodejs.org/en/), [Puppeteer](https://github.com/GoogleChrome/puppeteer), [wget](https://www.gnu.org/software/wget/), and [ImageMagick](https://imagemagick.org/).
BindSympli preprocessor code is written in Python, but it uses external scripts written in JavaScript and Perl. These scripts are provided in BindSympli package:
```bash
$ pip install foliantcontrib.bindsympli
```
## Config
To enable the preprocessor, add `bindsympli` to `preprocessors` section in the project config:
```yaml
preprocessors:
- bindsympli
```
The preprocessor has a number of options with the following default values:
```yaml
preprocessors:
- bindsympli:
get_sympli_design_urls_path: get_sympli_design_urls.pl
get_sympli_img_urls_path: get_sympli_img_urls.js
bind_sympli_imgs_path: bind_sympli_imgs.pl
wget_path: wget
convert_path: convert
cache_dir: !path bindsymplicache
sympli_login: ''
sympli_password: ''
image_width: 800
```
`get_sympli_design_urls_path`
: Path to the script `get_sympli_design_urls.pl` or alternative command that launches it (e.g. `perl /home/my_username/some_script.pl`). By default, it is assumed that you have this command and all other commands in `PATH`.
`get_sympli_img_urls_path`
: Path to the script `get_sympli_img_urls.js` or alternative command that launches it (e.g. `node some_another_script.js`).
`bind_sympli_imgs_path`
: Path to the script `bind_sympli_imgs.pl` or alternative command that launches it (e.g. `/usr/bin/perl /path/to/one_more_script.pl`).
`wget_path`
: Path to `wget` binary.
`convert_path`
: Path to `convert` binary, a part of [ImageMagick](https://imagemagick.org/).
`cache_dir`
: Directory to store downloaded and resized images.
`sympli_login`
: Your username in [Sympli](https://sympli.io/) account.
`sympli_password`
: Your password in [Sympli](https://sympli.io/) account.
`image_width`
: Width of resulting images in pixels (original images are too large).
BindSympli is a tool to download design layout images from [Sympli](https://sympli.io/) CDN using certain [Sympli](https://sympli.io/) account, to resize these images, and to bind them with the documentation project.
## Installation
Before using BindSympli, you need to install [Node.js](https://nodejs.org/en/), [Puppeteer](https://github.com/GoogleChrome/puppeteer), [wget](https://www.gnu.org/software/wget/), and [ImageMagick](https://imagemagick.org/).
BindSympli preprocessor code is written in Python, but it uses external scripts written in JavaScript and Perl. These scripts are provided in BindSympli package:
```bash
$ pip install foliantcontrib.bindsympli
```
## Config
To enable the preprocessor, add `bindsympli` to `preprocessors` section in the project config:
```yaml
preprocessors:
- bindsympli
```
The preprocessor has a number of options with the following default values:
```yaml
preprocessors:
- bindsympli:
get_sympli_design_urls_path: get_sympli_design_urls.pl
get_sympli_img_urls_path: get_sympli_img_urls.js
bind_sympli_imgs_path: bind_sympli_imgs.pl
wget_path: wget
convert_path: convert
cache_dir: !path bindsymplicache
sympli_login: ''
sympli_password: ''
image_width: 800
```
`get_sympli_design_urls_path`
: Path to the script `get_sympli_design_urls.pl` or alternative command that launches it (e.g. `perl /home/my_username/some_script.pl`). By default, it is assumed that you have this command and all other commands in `PATH`.
`get_sympli_img_urls_path`
: Path to the script `get_sympli_img_urls.js` or alternative command that launches it (e.g. `node some_another_script.js`).
`bind_sympli_imgs_path`
: Path to the script `bind_sympli_imgs.pl` or alternative command that launches it (e.g. `/usr/bin/perl /path/to/one_more_script.pl`).
`wget_path`
: Path to `wget` binary.
`convert_path`
: Path to `convert` binary, a part of [ImageMagick](https://imagemagick.org/).
`cache_dir`
: Directory to store downloaded and resized images.
`sympli_login`
: Your username in [Sympli](https://sympli.io/) account.
`sympli_password`
: Your password in [Sympli](https://sympli.io/) account.
`image_width`
: Width of resulting images in pixels (original images are too large).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for foliantcontrib.bindsympli-1.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ca844256e9032a1b98bebf7c5337305cf058ba1ccf52cdd68defe63510e938e |
|
MD5 | a417ca77d1693b27e925c7c625041c43 |
|
BLAKE2b-256 | 099c5bae4fd6fdc7dd096d74d99c111b5c57f220bcd87ef4e37941f70c4c37c1 |