Thursday, March 10, 2005

Advogato and Bad HTML

web :: programming :: python :: html

I don't know if I'm the only one who's trying to use Advogato in
non-ordinary ways (and I'd guess that at least Titus Brown is), but
I'm having a hell of a time getting mechanize to
work with the site. I love vi and I won't apologize for it ;-) I love
using it as my IDE as well as my CMS. I want to be able to edit
valuable information in a vi/vim terminal window. Sean Reifschneider wrote a nifty little python
script for editing messages in vi (I forget which RFC to which they
were compliant) and posting to websites. Alex Levy did something related, where you
could edit pickled data files via command line editors. I just totally
dig that stuff. I've written three mini-CMSs in PHP, perl, and python
(over the past 5 years) that use the command line as the primary means
of adding and editing data. Now, I want to do the same thing with my
Advogato account.

Alas, this is proving very difficult so far. Advogato does not seem to
be using proper html! So far, none of the text input fields in the
forms I have looked at are labled type="text" -- they are missing the
"type" attribute all together. As a result (at least, I think the lack
of "type" is the cause), mechanize does not see these inputs as
controls, and I can therefore not manipulate them. This means that I
cannot login and I cannot update my account settings. Very troublesome.
Additionally, it would be wonderful if the forms could be given
name attributes for easy access. I would love for someone to point out
a way around this or my misunderstanding of mechanize.

Of course, there is always the hope that the Advogato XML-RPC API will
be extended to allow for the managing of account data as well as for
publishing articles. Then I wouldn't care how the html gets abused ;-)

It seems that I can, in fact, get controls for all the account form
elements in mechanize, even though the text boxes are missing the
"type" attribute. However, I am still unable to process the login form
via mechanize. I am able to login, but that requires passing the
passphrase for the account in a GET, the consequence being that the
account password will turn up in log files.

No comments:

Post a Comment