Skip to main content

argot text markup -- a markdown dialect

Project description

Argot is a small set of extensions on the markdown markup language designed primarily for writing technical blog entries. The extensions are not “proper” markdown extensions; they are implemented as preprocessors that compile down into markdown or html syntax. In addition to markdown’s regular syntax, which argot does not interfere with, argot provides these features:

You can install argot with pip:

pip install argot

You can fork argot from its hg repository:

hg clone http://bitbucket.org/jmoiron/argot/

requirements

argot requires markdown and pygments. The optional amazon link processor, disabled by default, requires lxml.

version 0.5 notes

Version 0.5 of argot adds blockquote blocks, and is in this way incompatible with older versions. These blocks are unlikely to have occured by chance, so this should probably not be a problem.

A non-documented method of extending the way argot applied preprocessors that was nevertheless implied by the code has been removed as its presence was viewed as needless complexity. If you were extending argot by adding to enabled_extensions, you will have to find another entrypoint for your customizations. The old method of operation will not be restored in future versions.

moin-style highlighted code blocks

In markdown, code blocks are blocks of text one level of indentation removed from the body text. However, when dealing with more primative browser input mechanisms, indenting lots of text can be problematic (as tab often shifts input focus). In addition to allowing for this convention, argot implements moin/tracwiki style code blocks that feature syntax highlighting via pygments.

syntax

The general syntax is ‘{{{’ followed by an optional shebang and desired pygments parser, followed by your code block, and bookended with ‘}}}’:

{{{#!parser
    ... code ...
}}}

By default, if no parser is provided, argot uses pygments to try and guess what language is being used. It falls back to the plain text lexer. If you want to force the text lexer, use a lexer of text.

blockquote blocks

Like the moin-style highlighted code blocks, blockquote blocks are primarily intended for easy cut/paste insertion of quoted blocks into a body.

syntax

The syntax for blockquote blocks is similar to that of the code blocks, except that parens are used instead of braces:

((("citation url"
quoted text
)))

The quoted text is converted to HTML via regular markdown syntax rules. Nesting blockquote blocks is not supported. The optional citation url can be surrounded in single quotes (') or double quotes (").

argot command line tool

Like markdown, argot ships with a command line tool that will convert text files to html called argot. It’s usage is:

Usage: argot [options] file

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -r REFERER, --referer=REFERER
                        http referer for google link parser

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

Argot-0.5.tar.gz (8.4 kB view details)

Uploaded Source

File details

Details for the file Argot-0.5.tar.gz.

File metadata

  • Download URL: Argot-0.5.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Argot-0.5.tar.gz
Algorithm Hash digest
SHA256 b4f60990184fbc271f95c2399f2ae5e031ca12054d22d81a9b75248cc4b275b6
MD5 2f8bdbe8d658cd685d72e4a650f7a8d5
BLAKE2b-256 01327ac70441e271d228cf6bef6939e36155db02b52f0ac8b42b5ba72fe9b32f

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