6 february 2001 - Current month previous updates: - 02 | 04 | 06 | |

1 - Auto HTML Generator (free for download!)

"am_on.exe" was coded in C. - Here are some of the functions that work for me... When the software leaves the beta stage, I will make the source code available

"am_on.exe" works in text mode - and only weights 60K. It was coded in "very ANSI C", so it can be compiled to run on virtually any computer.

HTML Automatic Generator Tool

The problem with most amateur websites, like this one, is the time it takes to update. I didn't have trouble building this site, I don't care about having nothing but expenses with arturmarques.com, and I don't have headaches to come up with updates ideas :)... but I do get troubled with repetitive tasks.

Repetitive tasks are time consuming and teach you nothing. You already know my opinion about TIME: its the sole thing money can't buy, so you'd better consume it very wisely... Nowadays, I am completely drowned on to-do lists: I must read dozens of books; I must code one huge project; I must improve myself on my day-to-day job; I must improve myself in my relationships... overall I must become a better person, each 24 hours... and TIME simply does not seem enough!

If you have to reorganize your agenda somewhere, make sure it is NOT on the things that you adore. This advise goes contrary to 99% of what you'll surely read elsewhere, but it is your best bet, at least on the long term. Do not become a robot!

Let me translate this advise to a precise situation: having to opt between (1) stop reading fiction books; (2) stop playing computer games; (3) stop updating the website; and (4) do something else, I would go for (4) and my "something else" would be to cut repetitive tasks.

How can you cut on repetitive tasks?! Easy: #1) identify what is repetitive on your life; #2) check for technology that automates the tasks. So I did.

One very obvious repetitive task is site updating, mainly when the site is built on templates. Templates help to have a clean design, but they also contribute to some lack of imagination. Well, arturmarques.com now clearly follows a template, at least for its fat "old_news" folder, where each update is stored. For example, you are now reading a HTML document (06_february_2001.htm) stored in that folder, and this document has the same structure as the previous one did...

What changes on each "old_news" document? The central text changes; the pictures change; the comments for the pictures change; and the links for the current month's previous updates also change. Nothing else changes. I can code a software to do this, for me!- I can, and I did...

The need for automation wasn't the only reason I coded the tools that now automate a bit of arturmarques.com updating. It all began last Christmas when, out of home, I had very modest computer resources available, and thus was having trouble refreshing the site with new contents. The computer that could help me, only had (has) 4 MB of RAM, monochromatic display, EGA graphics, and other Jurassic attributes. Nonetheless, that computer has a processor and a hard disk, so it can process and store the kind of data this website requires - what it can't do is run Dreamweaver, Adobe GoLive, and similar software, but it can run a C compiler...

In a matter of ~6 hours, I coded a console-mode program that receives as input, the name of text files that hold the contents required for the update: the main text, the side columns' contents, the links for the day, and the pictures' names. Yes, I still have to type the texts, but then, the HMTL is auto built! It has been worth the effort.

Since Christmas, I made some progress to that tool, which I call "am_on.exe", but not many. It is still very beta, and it is STRONGLY attached to my current document structure, but is coded on top of more generic functions that I can reuse, if one day I decided to go for another template.

Today, you can download my tool and examples of its usage. You can even use the tool for generating HTML to your own website, but keep in mind that the generated code hopes to find the folders' structure of this web, so - to say the least - unless you replicate the relevant part of this site's tree, you'll get broken links.

Download this example [ZIP 6 KB - link extinct 2005-01-01], that includes:

1) the text files I had to write, to send as input;

2) the output, as HTML.

The aforementioned example is for 080201 update.

Here are the instructions on how to use the program, after unzipping it:

#1) launch a command prompt task (accessories => command prompt), because the program doesn't have a Windows interface;

#2) launch the program, by entering its name "am_on";

#3) the program will now ask you a few questions, in portuguese, so take note of their translations:

#3.1) first question is:

=> "type in the name of the text file, where you describe the update's day and the current month's previous update:"

... write "080201.txt" and later check that file to understand its format;

#3.2) second question is:

=> "type in the name of the text file, where you describe the 5 links of the day:"

... write "080201_links.txt" and later check that file to understand its format;

#3.3) third question is:

=> "type in the name of the text file, that describes the left column:"

... write "080201_qx3_spider_c1.txt" and later check that file to understand its format;

#3.3) third question is:

=> "type in the name of the text file, that describes the center column (the main contents):"

... write "080201_qx3_spider.txt" and later check that file to understand its format;

#3.4) fourth question is:

=> "type in the name of the text file, that describes the right column:"

... write "080201_qx3_spider_c2.txt" and later check that file to understand its format;

#3.5) fifth question is:

=> "type in the name you want for the file that will hold the necessary HTML code:

... write "news_08_february_2001.htm" and later open that file to see it worked.

Make sure you completely understand each file's format, because if you fail doing it, there is a reasonable chance that the software won't work - it has been coded to work on very precise input patterns...

Enjoy!

This tool is amazingly simple - yet, it can spare me loads of time!

You just input 5 file names - and as soon as you hit "ENTER", your HTML is built!