Skip to main content

Convert between markup languages

Project description

Build Status Code style: black

Txt2tags

Txt2tags is a document generator. It reads a text file with minimal markup such as **bold** and //italic// and converts it to the following formats:

  • AsciiDoc
  • Creole 1.0
  • DocBook
  • DokuWiki
  • Google Wiki
  • HTML
  • LaTeX
  • Lout
  • MagicPoint
  • Markdown
  • MoinMoin
  • PmWiki
  • Plain Text
  • SGML
  • UNIX Manpage
  • Wikipedia/MediaWiki

You can use it as a command line program or in a Python application.

Installation

We recommend using pipx to install and run txt2tags in an isolated environment without affecting any system packages:

python3 -m pip install --user pipx
python3 -m pipx ensurepath
pipx install txt2tags
txt2tags --help

Of course you can also use pip to install txt2tags globally or in a virtual environment:

pip install -U txt2tags

Usage

Simple example for command line usage:

  1. Write a text file like this (leave 1st line blank):

    = Hello =
    I'm a robot. You're my **master**!
    [smile.jpg]
    
  2. Run this command:

    txt2tags --target html --no-headers file.t2t

  3. The result is:

    <H1>Hello</H1>
    <P>
    I'm a robot. You're my <B>master</B>!
    <IMG ALIGN="middle" SRC="smile.jpg" BORDER="0" ALT="">
    </P>
    

History

Aurelio Jargas started the development of Txt2tags in 2001. The program saw several releases from 2001 to 2010, the last of which was version 2.6. Afterwards, Aurelio became less involved in the development. Still, many new features were added in the main repository (https://github.com/txt2tags/txt2tags), but they were never officially released. In my opinion, many of the new features are only useful for a very small set of users. The extra code adds bloat to the program and makes it hard to maintain the code. Unfortunately, these concerns are not shared by the whole Txt2tags development team. Therefore, I decided to branch off version 2.6 and maintain a simpler txt2tags version that works on Python 3. The file TODO.md lists the goals for the project.

If you'd like to help out with any of the tasks, please get in touch. Pull requests are very welcome!

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

txt2tags-3.5.tar.gz (46.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

txt2tags-3.5-py2.py3-none-any.whl (53.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file txt2tags-3.5.tar.gz.

File metadata

  • Download URL: txt2tags-3.5.tar.gz
  • Upload date:
  • Size: 46.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.9

File hashes

Hashes for txt2tags-3.5.tar.gz
Algorithm Hash digest
SHA256 1249bde26e2a917847eaaedba874a0a6bfe2c32833bbc9806bf76bdb913128dd
MD5 b9d62cbf0e8e8dd6ddb3ee2e7cdd55fa
BLAKE2b-256 aa8690beef984f50ae4e72f0540a2920ba3cc1325dfc9fc472c43f81e238e481

See more details on using hashes here.

File details

Details for the file txt2tags-3.5-py2.py3-none-any.whl.

File metadata

  • Download URL: txt2tags-3.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 53.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.9

File hashes

Hashes for txt2tags-3.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8ed1548cf778dedc66f9618a5a626b2a8d1038f27682ac699f5ae7a5adb34d2c
MD5 eadbc0451250872eaf5bb4150bfa9fed
BLAKE2b-256 5b520e3d0dc81bd9f409ae74892722e25d57967f250bb5e08b05d79fb4977821

See more details on using hashes here.

Supported by

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