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.

Files for anchorman, version 0.0.7
Filename, size File type Python version Upload date Hashes
Filename, size anchorman-0.0.7.tar.gz (11.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

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