time to look at pyAmazon

Another one of Mark Pilgrim’s little gems. Creating links for the Amazon affiliate program is tedious since you can’t look up the item from the “build a link” page. You have locate the item, get its ID, then login and create the HTML. What a pain.

I’m thinking that, given a title, pyAmazon can run the query and return the properly formatted link.

And it works.

>>>import amazon
>>>amazon.setLicense('get your own')
>>>pythonBooks = amazon.searchByKeyword('Python')
>>>pythonBooks[0].ProductName
u'Perl How to Program, Introducing CGI and Python (With CD-ROM)'
>>>pythonBooks[0].Asin
u'0130284181'

so now to just write a wrapper for this so I can pass it a title and have it return the ASIN with all the other stuff around it.

Thanks, Mark. Again.

PHP iCalendar

Bitworking

I have been experimenting by using the Mozilla Calendar and publishing the data to the web server so I can get to the calendar from anywhere. This looks like a neat little tool for getting to the calendar from places I don’t have the Mozilla Calendar app installed. Found via Mark Pilgrim.

Hmm, this could be interesting. I can already publish calendars with WebDAV: I wonder if this will let me edit them?

<time passes> Well, I misunderstood this thing. I doesn’t allow you to manipulate .ics or webcal files, though I suppose someone could make that work.

Since I don’t run my public webserver on OS X, it’s of limited use right out of the the box. But with a little scripting and some use of samba or NFS, I could keep my calendar up to date and publicly accessible.

I have never looked at PHP before. I must not have done it right: it was too easy, even though it works and, wonder of wonders, it’s not that hard to figure what the syntax means.

blue screen o’ death

Nicest of the Damned One reason these systems can be so inexpensive is that (with the Lindows box) the manufacturer is providing a modified free OS or (with the white-box system) no OS at all. If I had wanted to buy Windows XP Home with my parents’ system, it would have added $89, almost 25 percent of the system cost. And I would love to see the average non-technical person use the Windows installer on a bare system and get their reaction to the blue screen with the ASCII/DOS-esque display. As technical as a Linux install is, RedHat at least provides a really nice GUI installer. Apple’s is what you’d expect: opaque and non-frightening. FreeBSD and NetBSD make up in speed and efficiency what they lack in aesthetics: like RedHat, you can get the job done with a couple of floppies and a net connection. I have yet to make a second attempt at XP: I may not bother, since Holbrook tells me I’ll regret it.

another RSS-based app/service

Over a convocation of barley beverage sampling, one of the assembly raised the idea of an aggregator he could use to both collect the feeds he was interested in and then publish that as a meta-feed (Sean’s reading list). I think it’s possible to do that now.

At the same time, it would be interesting to have a way of taking the XML-RPC pings that are used to alert scripting.com and blo.gs of new items and reflect those out to the decentralized community of aggregator users. Right now, an aggregator application makes periodic requests for a new feed or in the case of the smarter ones, checks the modification time of subscribed feeds. Would a ping reflector/repeater network that took the inbound pings at scripting and blo.gs and re-sent them use less resources? I suppose if a subscriber was offline there would be some waste as the connection(s) to that user timed out.

the buzz builds around “intertwingledness”

Mitch Kapor’s Weblog

We are trying to make a PIM which is substantive enough and enticing enough to make people want to move to it from whatever they are currently using, which statistically is probably Microsoft Outlook. I’m not going to bash Outlook here. Suffice it to say that while feature-rich, it is very complex, which renders most of its functionality moot. Its information sharing features require use of Microsoft Exchange, a server-based product, which is both expensive and complex to administer. Exchange is overkill for small-to-medium organizations, which we think creates on opportunity we intend to pursue (as well of course as serving individual users)

So when a giant like Mitch Kapor jumps into the pool, it ought to get people’s attention. A lot of what he’s planning sounds a lot like a more complete Zoe, and that sounds really appealing. The linearity of email replaced by an organizational tool to pull out the threads, automagically collect the contacts, and extract the themes and context: it’s exciting stuff.

From the sound of it, it can run alongside Outlook until it outstrips it, since it will be open source and platform agnostic. I want to see the OS X and UNIX versions. Why should the Windows crowd have all the fun?

true platform agnostic windowing?

What is wxWindows?
wxWindows gives you a single, easy-to-use API for writing GUI applications on multiple platforms. Link with the appropriate library for your platform (Windows/Unix/Mac, others coming shortly) and compiler (almost any popular C++ compiler), and your application will adopt the look and feel appropriate to that platform. On top of great GUI functionality, wxWindows gives you: online help, network programming, streams, clipboard and drag and drop, multithreading, image loading and saving in a variety of popular formats, database support, HTML viewing and printing, and much much more.

Now this is interesting. A true multiplatform GUI toolset, at long last.

6 lines of python to generate Google results

Experimenting with Mark Pilgrim’s pygoogle stuff: my first serious effort at Python.

1 import google <- this is much more than 6 lines, but that’s what libraries are about
2 thisURL = ‘related:http://www.paulbeard.org/movabletype’
3 data = google.doGoogleSearch(thisURL)
4 print len (data.results), “URLs found for”, thisURL
5 for x in data.results[:]:
6    print ‘<a href=”‘ + x.URL + ‘”>’ + x.title + ‘</A>’

That little bit of code generates this result:

9 URLs found for related:http://www.paulbeard.org/movabletype
<a href="/movabletype/">quotidian</A>
<a href="http://fsteele.dyndns.org/">Nicest of the Damned</A>
<a href="http://www.naveja.net/">Naveja.net</A>
<a href="http://radio.weblogs.com/0110735/">john mahoney's radio weblog/<A>
<a href="http://www.rebeccablood.net/">what's in rebecca's pocket?</A>
<a href="http://www.theshiftedlibrarian.com/">The Shifted Librarian</A>
<a href="http://www.robotwisdom.com/">robot wisdom weblog</A>
<a href="http://www.ozzie.net/blog/stories/2002/08/04/why.html">Why?</A>
<a href="http://www.geocrawler.com/lists/3/FreeBSD/163/0/9429414/">Geocrawler.com - freebsd-mobile - Crash after resume: what caused </A>

Continue reading “6 lines of python to generate Google results”