Skip to main content

Markup terms in text

Project description

Turn your text into hypertext. With anchorman you can markup terms, create anchors, links, annotate abbreviations or just highlight specific elements in text.

>>> import anchorman
>>> text = "The quick brown fox jumps over the lazy dog."
>>> links = [{'fox': {'value': '/wiki/fox'}},
             {'dog': {'value': '/wiki/dog'}}]
>>> a = anchorman.add(text, links)
>>> a.result
The quick brown <a href="/wiki/fox" class="anchorman">fox</a> jumps
over the lazy <a href="/wiki/dog" class="anchorman">dog</a>.

Features

  • global and item specific markups

  • html/xml tags or highlighting

  • handful of params to control replacements

  • remove annotations by selector

Installation

To install Anchorman, simply:

pip install anchorman

Documentation

For detailed usage examples read Documentation Status.

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

anchorman-0.0.7.tar.gz (11.1 kB view hashes)

Uploaded Source

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