> Linux Reviews > Features >

Interview with verde, aka Aurelio Marinho Jargas, txt2tags author and creator of numerous excellent small python scripts

Interview with verde, aka Aurelio Marinho Jargas, txt2tags author and creator of numerous excellent small python scripts v1.0 (en), xiando

txt2tags is a single python script that converts text files with minimal markup to into formatted HTML, SGML and other document formats. t2t documents makes data exchange easy as pie and the keep-it-simple approach grows more popular by the hour.

When, why and where did you come up with the idea of creating txt2tags?

It started in 1999 with a txt2html shell script I wrote to avoid making HTML tags manually. That script evoluted to a txt2sgml sed script, that I used at work to write technical documentation. Then in 2001 I was writing my Regular Expression Book and as the publisher worked with PageMaker, a friend Osvaldo told me: "I think PageMaker also has a tagged language, similar to HTML". So after some research and tests, the txt2sgml was changed to txt2pagemaker. So I could write it all in Vim and forget about the Adobe product. After the book was finished, I had 3 similar tools, so decided to join them all in one. So in July 2001 txt2tags has born, a generic text formatting tool. Besides html, sgml and pagemaker, the first version came with MoinMoin and Magic Point targets also.

Does the new 2.0 version satisfy your goals and visions? Or is there still important items left on your TODO list? What lies ahead?

Yes it satisfies, by now :) The base was made, so the program now can keep evolving. The next big step is to implement multi-page output (split), where a single document will turn into several HTML pages. Useful for slides and HOWTO-like documents. The RTF target is aimed also, but I still have to study it. Other is an alternative way to specify tables, using indent or something to allow more complicated structures and avoid the current looooooong lines.

Have you tried the new kate text editor txt2tags mode? What editor do you prefer?

In fact, the first time I've heard about this Kate editor was last week, when Juliano came with the txt2tags syntax highlight XML file for it. My editor is Vim, I use it for all my text editing needs since 1997 and feel very confortable with it. I do prefer the good old black screen with text. Icons, windows and buttons are nice, but I don't like them :)

Why did you choose to make txt2tags in python?

I was not just a technical decision. I have real pleasure when programming in Python. It is easy, clean, beautiful. It is hard to explain, but Python is good because it is. You have to give it a try to feel the "Python Experience". The interative prompt also helps a lot for quick tests.

If a newbie were to choose a programming language to learn, what would you recommend starting with?

Python. The syntax is very clean, with no { } for blocks and ( ) just were necessary. It is Object Oriented, but can program procedural if you want. But the killer argument is the interative prompt, were the beginner can test commands on the fly, with no need to create files or compile anything. But once again, it is a pleasure to do Python programming, the newbie will feel confortable in doing it.

How can large enterprises benefit from using txt2tags as the standard document format for both internal storage and for information exchange with outside sources?

For outside exchange it is kinda hard, because you just can't impose a new format on a doc/PDF world. But for internal storage I think txt2tags can be a good choice for documents with no complicated structures. In fact, being simple it forces you to write in a simple way, using basic forms as lists and tables. For technical documentation, there is no need to abuse of formatting capabilities, so txt2tags can handle the job. And using the same source for lots of different output formats makes it nice to store the documents as source only, converting to the desired target when needed. The fact that you can use any text editor is a strong point, so you let the user choose whatever editor he likes and feels confortable. The htmldoc tool is a great complement to txt2tags, doing the html->PDF convertion.

For what most people use txt2tags?

I've always saw txt2tags mainly as a technical documentation tool. But I'm really impressed how there are many personal homepages using it. People seem to hate to write HTML tags, and txt2tags allows them to write just text, and never care about tags. Then some CSS directives come to make the eye-candy part. There are many creative uses of the program out there, check on the Children List.

What is the second most popular program you have made, and what does it do?

I consider txt2tags the most complex and mature program I've made, but txt2regex is more popular, being included on several Linux/UNIX distributions out there and was reviewed on magazines. It is a Regular Expression Wizard written with bash builtins commands, and has a text interative interface. Oh, there is also the SedSokoban, which was slashdotted and many people talked about.

What mountains do you recommend climbing? Be sure to check out Jotunheimen if you ever visit Norway.

I'm really new on this climbing thing, but for sure the most impressing mountains I've knew was Los Andes, between Chile and Argentina, on the way to the Atacama Desert. They are big, titanic and beautiful. If you ever get a chance to go to the Atacama, don't miss it! And thanks for the Jotunheimen tip, it really seems to be a special place.

Thanks Řyvind for the interview and please continue to keep on the air this great source of information that linuxreviews.org is. I guess it is also the major "txt2tags powered" site out there, a nice case!

> Linux Reviews > Features >
Interview with verde, aka Aurelio Marinho Jargas, txt2tags author and creator of numerous excellent small python scripts