Skip to main content

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!

Metadata

Release files for txt2tags 3.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for txt2tags 3.9
File Size Uploaded
txt2tags-3.9.tar.gz 51.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for txt2tags 3.9
File Interpreter ABI Platform
txt2tags-3.9-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 104.2 kB

Release files / txt2tags-3.9.tar.gz

Download URL txt2tags-3.9.tar.gz
Size 51.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7e4244db6a63aaa58fc17fa4cdec62b6fb89cc41d3a00ba4edaffa37f27d6746
BLAKE2b-256 checksum
How to use checksums
2717c9cdebfc86e824e25592a20a8871225dad61b6b6c0101f4a2cb3434890dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / txt2tags-3.9-py2.py3-none-any.whl

Download URL txt2tags-3.9-py2.py3-none-any.whl
Size 52.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
7b1e037798cdf0714d8edfb399733a27978b91c2ac2a2a61de54a03c006115fa
BLAKE2b-256 checksum
How to use checksums
fd8997f8ac63d5d3cd7a1e9bc2e25fa7709db2fb2f082aea41fac3badfab4eb6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release history Release notifications | RSS feed

This release

3.9 This release

2 release files

3.8

2 release files

3.7

2 release files

3.6

2 release files

3.5

2 release files

3.4

2 release files

3.3

2 release files

3.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page