http://rustycurry.pip.verisignlabs.com/ ([identity profile] rustycurry.pip.verisignlabs.com) wrote in [personal profile] marnanel 2010-12-18 06:47 am (UTC)

Psudo.

The reason to put it on identi.ca is rather than just a sync tool is to make sure that others can find the information later. That was the reason to put it on del.icio.us in the first place. But if sync works for you go with it.

I would think that while it's not quite xml spec, it is one of the html specs. as a result the python html library should be able to parse the content.

Presuming you can walk the content of the backup page for links, (
[Error: Irreparable invalid markup ('<a [...] ../a>') in entry. Owner must fix manually. Raw contents below.]

The reason to put it on identi.ca is rather than just a sync tool is to make sure that others can find the information later. That was the reason to put it on del.icio.us in the first place. But if sync works for you go with it.

I would think that while it's not quite xml spec, it is one of the html specs. as a result the python html library should be able to parse the content.

Presuming you can walk the content of the backup page for links, (<A HREF ../A> blocks) the parser should be able to give you the HREF, TAGS and description portions of the link as variables to handle. You then need to basically walk through the tags building a tag_string with each tag word preceded by a ' #' string.

Then you build a post_string as url + description + tag_string. Check to see if the length of the post_string is less than or equal to 140 character, if it is post using the identi.ca libraries for python, or through any tool you have automated already. (I would use a python script that would post through my xmlpp server, but that's a different topic.)

If the post_string is greater than 140 find out if you can run it through a url shortener and get something shorter. If it's already a shortened url, you may want to have it spit out the string to a separate file to go through on your own to see what you can do about shortening the description, or perhaps discarding or shortening tags.

Post a comment in response:

If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting