Category Archives: Releases

txt2tags 2.6

And when you thought txt2tags was hibernating inside a cold dark cave, guess what? We have a new release! :)

I’m very happy to announce the release of txt2tags 2.6, coming out after more than two years of development effort in the txt2tags SVN.

Thanks to the active and ever growing team, this is the most feature rich release to date: five new targets, five new command line options, a new mark for tagged text, a new command to include CSV files, updated documentation, more translations and tons of bug fixes and improvements.

New targets:

Now counting a total of 18 supported targets, txt2tags is one of the most versatile text conversion tool out there. To help you remember all of them, now we have the --targets option.

$ txt2tags --targets
adoc    AsciiDoc document
art     ASCII Art text
creole  Creole 1.0 document
dbk     DocBook document
doku    DokuWiki page
gwiki   Google Wiki page
html    HTML page
lout    Lout document
man     UNIX Manual page
mgp     MagicPoint presentation
moin    MoinMoin page
pm6     PageMaker document
pmw     PmWiki page
sgml    SGML document
tex     LaTeX document
txt     Plain Text
wiki    Wikipedia page
xhtml   XHTML page
$

The new %!csv command will read a CSV file and convert it to a nice table. This is a quick way to include a large table in your document if you already have the data in a CSV file. The usage is simple:

%!csv: monthly-report.csv

The new ''tagged'' mark is perfect to satisfy some popular user requests:

  • How can I insert HTML code in my document?
  • How can I insert LaTeX formulas?

Just put a pair of apostrophes around some text, ''like this'', and txt2tags will not touch it. You can insert arbitrary target code, such as ''<span id=a123>''marking some text''</span>'' with HTML tags inside a paragraph. If you want to add a whole block of code, use the three apostrophes block:

'''
<div id="mynicediv">
  <p style="color:red;">My text.</p>
</div>
'''

It’s very handy for things like Google Analytics code or YouTube embedded code in HTML pages. Or formulas in LaTeX. Or advanced wiki markup. Or… You name it.

How about to show a slide presentation just using your regular terminal? Now it’s possible with the new --slides option, used by the ASCII Art target. It breaks your text into pages, repeating the top title if necessary. You inform the size (lines and columns) with the new --height and --width options. You can even change the decoration characters with the new --art-chars option.

txt2tags -t art --slides --width 80 --height 25 -o - sample.t2t | more

Check out the ChangeLog for a complete list of all the changes and download your shiny new txt2tags!

Oh, this new version requires Python 2.2 or newer. But not Python 3, because we’re not that cool :)

Advertisements

7 years of txt2tags

Seems like yesterday when we made five… But now we’re seven!

7 years!

To celebrate this very special date (it’s real hard to keep a spare-time one-man project like txt2tags for that long), there’s a new 2.5 version out there!

It’s not one. Not even two. But three new targets!

Maybe you’ll write an article on Wikipedia, maybe you’ll update your Google Code project or maybe you’ll edit some DokuWiki page. In any case, txt2tags is your friend!

Keep using the same **marks** //you// __already__ ``know`` and let txt2tags do the dirty job of converting them to those new targets. The new codes for the -t option are wiki, gwiki and doku. Enjoy!

Talking about marks, have you ever needed to strikeout something? Now you can! Txt2tags 2.5 brings a new mark: --strike--. Simple!

There’s also a new PHP interface, better UTF-8 support, local links for LaTeX, new tools and more!

Check out the new guide: How to add a new target to txt2tags. I guess the name is self-describing, right? How about to get involved to the project, adding a new target?

Talking about collaboration, this release was sponsored by a generous donation from Dmitri Popov, who runs the No Thick Manuals site and have already helped lots of open source projects. Thank you Dmitri!

What now? Try the new version (online) and download it.

txt2tags 2.4 released

Day 24, version 2.4. Got it? :)

Take all the dust and spiders out of your current txt2tags installation and upgrade to the fresh new stylish Christmas release.

Tons of bug fixes, new mark to comment multiple lines, more than one CSS per HTML file and user-defined .sty files for LaTeX are some of the news. Read them all.

Example of the new features:

My Test File
John Doe
Dec/2006

% Multiple CSS files are now supported
% They're applied on the same order you specify them
%
%!style(html): site.css
%!style(html): ie-gotchas.css
%!style(html): xmas-theme.css

% Now you can use your own LaTeX goodness
%
%!style(tex): ~/.mylatexrules.sty
%!style(tex): tex/mystyles/MathSettings.sty

Hello World

%%%
This is a commented block.
Three percentages to open, three more to close.
These lines won't appear on the converted file, they're commented.
%%%

Goodbye World

Yes, we’re growing!
No, we’re not bloat!

Minor version 2.3.2 released

Summary: New commented block mark and several bug fixes.

This release introduces a new mark for commented blocks: %%%. The syntax is similar to the Verbatim and Raw blocks, using the same mark to open and close the block. Kudos to Leo Rosa for sending the patch!

    This is a paragraph.

    %%%
    This is a commented block.
    Remember that the %%% must be at the line
    beginning with no leading spaces.
    %%%

    Another paragraph.

The txt2tags test suite was extended from 120 to 144 tests! Those new checks revealed very catchy bugs and some strange behavior. Even fatal errors raised from uncommon markup on the source file.

Now everything is fine. Oh if I had implemented that test suite thing since the beginning…

Vanished Bugs

Removed useless <P></P> after Table followed by blank line

    $ echo -e "\n| Table\n" | txt2tags-2.3 -t html -H -o- -i-
    <TABLE CELLPADDING="4">
    <TR>
    <TD>Table</TD>
    </TR>
    </TABLE>
    
    <P></P>
    
    $ echo -e "\n| Table\n" | txt2tags-2.3.2 -t html -H -o- -i-
    <TABLE CELLPADDING="4">
    <TR>
    <TD>Table</TD>
    </TR>
    </TABLE>

Raw doesn’t close Quote anymore

    $ echo -e '\n\tQuote\n""" Raw' | txt2tags-2.3 -t html -H -o- -i-
            <BLOCKQUOTE>
            Quote
            </BLOCKQUOTE>
    Raw
    
    $ echo -e '\n\tQuote\n""" Raw' | txt2tags-2.3.2 -t html -H -o- -i-
            <BLOCKQUOTE>
            Quote
    Raw
            </BLOCKQUOTE>

Bugfix: Macro at line beginning now closes Quote

    $ echo -e "\n\tQuote\n%%date" | txt2tags-2.3 -t html -H -o- -i-
            <BLOCKQUOTE>
            Quote
            20060809
            </BLOCKQUOTE>
    
    $ echo -e "\n\tQuote\n%%date" | txt2tags-2.3.2 -t html -H -o- -i-
            <BLOCKQUOTE>
            Quote
            </BLOCKQUOTE>
    <P>
    20060809
    </P>

Bugfix: Verbatim and Raw areas are now mutually exclusive

    $ echo -e '\n```\n"""\nRaw in Verb\n"""\n```' | txt2tags-2.3 -t html -H -o- -i-
    <PRE>
    </PRE>
    Raw in Verb
    <PRE>
    </PRE>
    
    $ echo -e '\n```\n"""\nRaw in Verb\n"""\n```' | txt2tags-2.3.2 -t html -H -o- -i-
    <PRE>
      """
      Raw in Verb
      """
    </PRE>

Bugfix: Fatal error on macro after table

    $ echo -e "\n| x |\n%%date" | txt2tags-2.3 -t html -H -o- -i-
    Sorry! Txt2tags aborted by an unknown error.
    
    $ echo -e "\n| x |\n%%date" | txt2tags-2.3.2 -t html -H -o- -i-
    <TABLE CELLPADDING="4" BORDER="1">
    <TR>
    <TD>x</TD>
    </TR>
    </TABLE>
    
    <P>
    20060809
    </P>

Bugfix: Fatal error on table inside deflist

    $ echo -e "\n: | Table inside List Term" | txt2tags-2.3 -t html -H -o- -i-
    Sorry! Txt2tags aborted by an unknown error.
    
    $ echo -e "\n: | Table inside List Term" | txt2tags-2.3.2 -t html -H -o- -i-
    <DL>
    <DT>| Table inside List Term</DT><DD>
    </DL>

Bugfix: Fatal error on empty table

    $ echo -e "\n| |" | txt2tags-2.3 -t html -H -o- -i-
    Sorry! Txt2tags aborted by an unknown error.
    
    $ echo -e "\n| |" | txt2tags-2.3.2 -t html -H -o- -i-
    <TABLE CELLPADDING="4" BORDER="1">
    <TR>
    <TD></TD>
    </TR>
    </TABLE>

Get the new code at the download page, under the Minor Releases section.

Minor version 2.3.1 released

After more than a year of silence, there is a new txt2tags version out!

It’s a minor release, mostly related to the Style option (–style or %!style). Now you can specify two or more CSS files for an HTML/XHTML page, or modules for LaTeX. Example:

    txt2tags -t html --style main.css --style fancy.css site.t2t

The –css-inside option was also improved to support multiple files and now warns when the CSS file is not found.

    <!-- Included main.css -->
    <STYLE TYPE="text/css">
    ...
    </STYLE>
    
    <!-- CSS include failed for fancy.css -->

A very ancient bug was fixed. It was introduced on version 0.7 (from 2002!) and remained unnoticed until recently. The automatic adding of protocol (like http://) was not working for uppercased URLs.

    $ echo -e "\\nWWW.FOO.COM" | txt2tags-2.3 -o- -H -t html -
    <P>
    <A HREF="WWW.FOO.COM">WWW.FOO.COM</A>
    </P>

    $ echo -e "\\nWWW.FOO.COM" | txt2tags-2.3.1 -o- -H -t html -
    <P>
    <A HREF="http://WWW.FOO.COM">WWW.FOO.COM</A>
    </P>

Since nobody noticed the bug before, this fix is invisible :)

Get the new code at the download page, under the Minor Releases section.

New “Release Early” Policy

I’ve always waited until many new features and bug fixes were done to then release a new version of txt2tags. The more changes, the better.

But experience show me that preparing big releases is a time consuming task, and it takes even longer when the period between versions becomes large. Since the latest version 2.3 was released 13 months ago, you can imagine how scared I am :)

We need change and we need it fast, Joey said.

Starting today, besides de KISS Principle, the program will also follow the “Release Early, Release Often” Principle. Minor releases will now be part of the project.

And when I said now, I mean --now! See next post.