2003-04-17»
awww» It’d be unfair to give this as the reason I haven’t been blogging much lately. It is the reason I’ve been typing a lot slower:
It’d be unfair to give this as the reason I haven’t been blogging much lately. It is the reason I’ve been typing a lot slower:
Todd Larason wrote an even more automatic hyperlinker macro for blosxom called “autoluckygoogle “. Much better name!
Giles Turnbull asked if anyone had written an equivalent of the overenthusiastic hyperlinker for Mac as an OS X Service. I never worked out how to get Services to work, but a while back I did hack up something for Cory for BBEdit . It worked fine on my borrowed ibook, but I didn’t have time to work out how to get it to find Python libraries on his machine. Then the ibook broke :(. Here’s the code – stick it in /Applications/BBEdit 6.5/BBEdit Support/Unix Support/Unix Filters/ then spend ages trying to get it to find the pygoogle libraries (which you also need to download and install). Then give it out as a DMG for others to use. Yay!
1 |
#!/sw/bin/python import google import sys import re def main(argv): search=open(argv[0],"r").readline() data = google.doGoogleSearch(search) if (data.results[0].summary): title = data.results[0].summary else: title = data.results[0].title title = re.sub('</*b>','',title) print '<a href="%s" title="%s">%s</a>' % (data.results[0].URL, title, search) if __name__ == '__main__': main(sys.argv[1:]) |
Just select the text in BBEdit, and then – oh, I forget what you do. Some BBEdit option marked “Unix Filters” I imagine. I’m such a tease.
Here’s another from the bag of tricks I sent Cory – this automatically creates a new QuickTopic and subscribes you to it. Save it in the same place and give it a go. Just select the text you want as a title, and let her rip (you’ll need to change the yourname/yourmail stuff in it). It’ll spit out the URL for your discussion. I think Cory still uses this. It used to drive me crazy watching him jump through all these manual loops just to post one damn Boing Boing post. Like the boy hasn’t enough things to do.
1 |
#!/sw/bin/python import xmlrpclib import sys yourname = 'Your Name Here' yourmail = 'your@email.address.example.com' # ---------------------------------------------------------------------- print len(sys.argv) title=open(sys.argv[1],"r").readline() if (title == ''): title = "Boing Boing Discussion" quicktopic = xmlrpclib.Server("http://www.quicktopic.com/cgi-bin/xmlrpc.pl") result = quicktopic.tio.newTopic( yourname, # user name for topic creator yourmail, # email for creator 'boing', # forum ID (the part before the /H/ in the URL) title, # topic name '', # first message 1, # subscribe: get email for every post '', #linkfrom -- linked forum/topic '', #linksubject linked topic name 0, #privacy (currently unused option) '', #language (default is English) ) url = result.split(",")[0] print ' <a href="%s">Discuss</a>' % url |
The Humanity Libraries Project is the sort of resource we were looking for after we came back from Kaindu in Africa in 2001: freely redistributable practical information for developing countries.
In order to achieve broad public participation to the pressing global issues, we propose that core UN knowledge should be released in “copyleft” in standard formats. Then they can be bundled on low cost cd-roms or central servers in each country. Copyleft would mean that UN agencies retain copyrights, and control over the commercial book sales. But that at the same time free use and electronic dissemination is allowed for non-commercial purposes without the actual inefficient centralized copyright control.
Most of the freed books look very NGO’ish, but it’s a start. You can send off for a cheap CD containing 160,000 pages to redistribute in your country. (via memepool)