Skip to main content

BindSympli

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.

Installation

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

Config

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

preprocessors:
    - bindsympli

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

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

Usage

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="https://app.sympli.io/app#!/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.

Release files for foliantcontrib.bindsympli 1.0.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for foliantcontrib.bindsympli 1.0.14
File Size Uploaded
foliantcontrib.bindsympli-1.0.14.tar.gz 6.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for foliantcontrib.bindsympli 1.0.14
File Interpreter ABI Platform
foliantcontrib.bindsympli-1.0.14-py3-none-any.whl Python 3 none any Details

Total release size: 13.7 kB

Release files / foliantcontrib.bindsympli-1.0.14.tar.gz

Download URL foliantcontrib.bindsympli-1.0.14.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
14ee38f031261b9bdbfadde9ad0232eae56f10a0d5f63205f4935413c47e0c88
BLAKE2b-256 checksum
How to use checksums
bd438377c6f9c986ba9c31512b73c8ffbb408d8c58c0610a80997bdedd79007e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.11.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

Release files / foliantcontrib.bindsympli-1.0.14-py3-none-any.whl

Download URL foliantcontrib.bindsympli-1.0.14-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
98b761f8a8897fa4183c2ab1e05ab97c390bfbc076d7804ee21ba1d69e009c13
BLAKE2b-256 checksum
How to use checksums
a05c4155bef6640e4f63eab5bd3fe2d11bb2c64f18e4314049ef34db25f8af53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.11.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

Release history Release notifications | RSS feed

This release

1.0.14 This release

2 release files

1.0.13

1 release file

1.0.12

1 release file

1.0.11

1 release file

1.0.10

1 release file

1.0.9

1 release file

1.0.8

1 release file

1.0.7

1 release file

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page