Skip to main content

A Sphinx extension that enables watermarks for HTML output.

Project description

https://travis-ci.org/kallimachos/sphinxmark.svg?branch=master https://img.shields.io/pypi/status/sphinxmark.svg?style=flat https://img.shields.io/pypi/v/sphinxmark.svg?style=flat https://img.shields.io/badge/Python-2.7-brightgreen.svg?style=flat https://img.shields.io/badge/Python-3.4-brightgreen.svg?style=flat http://img.shields.io/badge/license-GPL-blue.svg?style=flat

sphinxmark is an extension for Sphinx that enables watermarks for HTML output.

Full documentation: https://kallimachos.github.io/sphinxmark/

Installation

Install sphinxmark using pip:

$ pip install sphinxmark

Usage

  1. Add sphinxmark to the list of extensions in conf.py:

    extensions = ['sphinxmark']
  2. Specify a static directory in conf.py for your image files. If the path does not exist, sphinxmark creates the directory and populates it with watermark.css and watermark-draft.png. If no value is given, the path defaults to _static.

    html_static_path = ['_static']
  3. Configure sphinxmark in conf.py as required:

    watermark_enable = True
    watermark_image = 'default'
    watermark_text = 'default'
    watermark_div = 'default'
    watermark_debug = False

Options

watermark_enable (bool)
  • True enable watermarks

  • False disable watermarks

  • Default = False

  • Example:

    watermark_enable = True

watermark_image (string)
  • image file in _static directory to use as watermark

  • text selects the text-based watermark specified in watermark_text option

  • Default = watermark-draft.png (included DRAFT image)

  • Examples:

    watermark_image = 'preview_mark.png'

    watermark_image = 'text'

watermark_text (string)
  • Text to use for watermark when text option is selected in watermark_image

  • Default = default

  • Example:

    watermark_text = 'Preview'

watermark_div (string)
  • CSS div where watermark is displayed

  • sphinxmark provides a template css file that uses the specified image as the watermark for any area defined as div.body by default. To use sphinxmark with themes that have the document body in a different div, specify the div using the watermark_div option.

  • Default = body (this works for default Sphinx theme)

  • Examples:

    sphinx_rtd_theme -> watermark_div = 'document'

    openstackdocstheme -> watermark_div = 'docs-body'

watermark_debug (bool)
  • True enable debugging output during Sphinx build

  • False disable debugging output during Sphinx build

  • Default = False

  • Example:

    watermark_debug = True

Project details


Download files

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

Source Distribution

sphinxmark-0.1.5.tar.gz (201.2 kB view details)

Uploaded Source

Built Distribution

sphinxmark-0.1.5-py2.py3-none-any.whl (201.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file sphinxmark-0.1.5.tar.gz.

File metadata

  • Download URL: sphinxmark-0.1.5.tar.gz
  • Upload date:
  • Size: 201.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for sphinxmark-0.1.5.tar.gz
Algorithm Hash digest
SHA256 775939393e4a082ab9a3c85342f255f0a6f4c6e400f6cda720ae56ee961900e5
MD5 8f8ea04164b0568761ab3ff61a756264
BLAKE2b-256 111114c4d7cd229e8e3a06ce83d79fce960f11ebb123e5365f07a4e8e44002f9

See more details on using hashes here.

File details

Details for the file sphinxmark-0.1.5-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for sphinxmark-0.1.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7d15e5aa9ad1b7e79b75e2eb8ac55d3c5e6275d5c217e0ff8280a4e9cf581528
MD5 7c03425f654053a318ac45dd948b492f
BLAKE2b-256 8979248f474aa1ab606d660dfa20923210aeb2fbfacc17ec178aa8d36c2506e6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page