Skip to main content

Sympli integration preprocessor for Foliant.

Project description


BindSympli is a tool to download design layout images from Sympli CDN using certain Sympli account, to resize these images, and to bind them with the documentation project.


Before using BindSympli, you need to install Node.js, Puppeteer, wget, and ImageMagick.

BindSympli preprocessor code is written in Python, but it uses the external script written in JavaScript. This script is provided in BindSympli package:

$ pip install foliantcontrib.bindsympli


To enable the preprocessor, add bindsympli to preprocessors section in the project config:

    - bindsympli

The preprocessor has a number of options with the following default values:

    - 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
        max_attempts: 5

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).

max_attempts : Maximum number of attempts to run the script get_sympli_img_urls.js on fails.


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

Here’s an image from Sympli:

<<sympli caption="An optional caption" width="400" url="!/designs/0123456789abcdef01234567/specs/assets"></sympli>

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

You may specify an optional caption in the caption attribute, and an optional custom image width in the width attribute. The width attribute overrides the image_width config option for a certain image.

BindSympli preprocessor will replace such blocks with local image references.

Project details

Download files

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

Files for foliantcontrib.bindsympli, version 1.0.14
Filename, size File type Python version Upload date Hashes
Filename, size foliantcontrib.bindsympli-1.0.14-py3-none-any.whl (7.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size foliantcontrib.bindsympli-1.0.14.tar.gz (6.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page