Skip to main content

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 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 the external script written in JavaScript. This script is 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_img_urls_path: get_sympli_img_urls.js
wget_path: wget
convert_path: convert
cache_dir: !path .bindsymplicache
sympli_login: ''
sympli_password: ''
image_width: 800
```

`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`). By default, it is assumed that you have this command and all other commands in `PATH`.

`wget_path`
: Path to `wget` binary.

`convert_path`
: Path to `convert` binary, a part of ImageMagick.

`cache_dir`
: Directory to store downloaded and resized images.

`sympli_login`
: Your username in Sympli account.

`sympli_password`
: Your password in Sympli account.

`image_width`
: Width of resulting images in pixels (original images are too large).

## Usage

To insert a design layout image from Sympli into your documentation, use `<<sympli>...</sympli>` tags in Markdown source:

```markdown
Here’s an image from Sympli:

<<sympli caption="An optional caption" url="https://app.sympli.io/app#!/designs/0123456789abcdef01234567/specs/assets"></sympli>
```

You have to specify the URL of Sympli design layout page in `url` attribute.

BindSympli preprocessor will replace such blocks with local image references.

Project details


Release history Release notifications

This version
History Node

1.0.5

History Node

1.0.4

History Node

1.0.3

History Node

1.0.2

History Node

1.0.1

History Node

1.0.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
foliantcontrib.bindsympli-1.0.5.tar.gz (5.4 kB) Copy SHA256 hash SHA256 Source None Apr 20, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page