Currently:
2003-04-18»
more automatic hyperlinking»
Ronan has an Emacs and
Perl hybrid that spots words that he hyperlinks in past pages, and
then uses that to suggest suitable href's in current entries. Looks pretty
neat, although of course I can't touch emacs to test it, lest my Vim-wielding
hands turn to dust.
oops»
We took a break from NTK this week, but forgot to tell anyone. Oops.
(Oh, and then I put the wrong date on the invite. It's all about the
admissions of fallibility, isn't it?)
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:
lucky google for blosxom»
Todd Larason
wrote an even more automatic hyperlinker macro for blosxom called "autoluckygoogle
". Much better name!
overenthusiastic mac hyperlinking»
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!
#!/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.
#!/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
an electronic marshall information plan»
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)
2003-04-16»
vim, google and overenthusiastic hyperlinking»
Writing huge swathes of text on Webpages without putting in hyperlinks
looks - I dunno, somehow a bit impolite. So I wrote a vim/python macro
that lets me wrap selected text with its corresponding URL, pulled from
Google's top entry. So I can write A Mighty Wind, select it, hit ",g" and -
voila - it becomes A Mighty Wind. You can also hit ",g" in normal mode and
it'll wrap the word the cursor is sitting on. Here's my hack - you'll also
need Mark
Pilgrim's pygoogle code.
In your .vimrc, add these lines:
" ,g - create google a href for word under cursor
map ,g <Esc>Bm`:r!ghref <cword><CR>"gdd``i<C-R><C-R>g<esc>dw
vmap ,g yvgvdm`:r!ghref '<C-R>=substitute(@0, "['\n]", " ", "g")<cr>'<cr>"gdd``i<C-R><C-R>g<Esc>
Now put this program somewhere in your PATH, saved as "ghref"
#!/usr/bin/python
##
# ghref - takes a string on command line, looks it up in google, outputs
# the HTML for a hyperlink to the "I'm feeling lucky" URL
##
import google
import sys
import re
def main(argv):
search=argv[0]
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, argv[0])
if __name__ == '__main__':
main(sys.argv[1:])
It's just a fiddled-around recorded macro. I imagine there's bugs - I fixed
a couple just copying this out. But maybe it'll inspire someone else to write
a better version.
chefmoz»
I've never spotted Chef
Moz before. It's a spin-off of ODP that lets you read and edit reviews
of over 185,000 restaurants worldwide. The data is all under an open license -
I wonder if someone could craft a PDA app out of this? I wonder if someone
already has?
hinternet fallout»
I don't have a comments system because, dammit, don't you people have blogs
of your own to go to? But that does put a bit of an obligation on me to
distill the best replies to earlier entries, and try and pass them off as my
own. So...
It wasn't Begbie , oh no, who pointed out
saproxy, a
spamassassin POP proxy that works on Windows. Or Lee, who mentioned popfile
which does that and more.
And it was me, not Barnaby James who recommended SlimBrowser as a
good IE-based tabbed/anti-popup browser for people who are funny about using
Moz.
And I really did invent the term hinternet, not subconsciously steal it
from the (void) folk, who've been using it for
years.
The funny thing is, that jo's coinage of hinternet on (void) is pretty much
the opposite of mine. They use it to describe a place outside the "controlled
web" (which is envisaged to be the corporate AOL-Time-Warner garden of
controlled delights), a place where,
...when business has finished remodelling the Internet into their
own image the masses will flock (or just never leave) there leaving the
rest of us shuffling round, kicking our heels (WARNING: more bad metaphor,
excessive cheesiness is bad for your health and may damage your unborn
child) under the off ramps of the information superhighway. And it will be
just like it was before. The masses won't want to start rummaging around
in the rag tag collection of unbranded sites that make up our world. Even
if they did they probably wouldn't be able to jump out of whatever web tv
portal gateway digi box walled padded garden system they've subscribed
themselves to - if they do manage it then they've probably got a clue
anyway.
(from Simon's
mail, which you should read in its entirety)
I know this view of the future of the Net but I don't agree with it, either
as an inevitable end or an end to be aimed for.
Where are the badlands on the Net? The difference between a ghetto and your
neighbourhood is how much you hate it and whether you're trapped there. The
bubble of links that I live in (when I rarely see HTML mails, and when
everybody laughs politely at Microsoft Bob references) is tiny, and would
drive most people crazy if they were stuck here for very long. Similiarly, I
imagine a lot of the voidsters would rather eat their own fists than live
exclusively in AOLland.
But these are differences based on objective value judgements about the
content. I'd take a more subjective angle. It's not a ghetto if you don't want
to live there; it's a ghetto if the people who live there don't want to live
there. That's why I think a lot of people who live in the AOL/MSN world are
living in a ghetto; they really don't like it. They're surprised when I show
them somewhere else, and want to find out how to move.
The other difference between ghettos and neighbourhoods is that you can
sell a neighbourhood and buy more than one ghetto with it. That's why, in real
life, those in the ghetto are truly trapped. That's not true on the Net (even
with the increasing costs of hosting that Simon fears). There's no scarcity of
Web communities. The major part of their cost is simply finding them.
That's why I think the real ghetto lies in AOLland. We can get from here to
there, but they can't get from there to where they want to be. There's an
implication in the (void) coinage that we should hide ourselves away, proud
and separate, deliberately hard to get at - work at being obscure for
obscurity's sake. I don't think that's what anyone should do. I want to
increase the efficiency with which people can find what they want. You don't
break down walls by building ones on your side of the divide.
(I know that might sound funny from someone who devotes their life to
making the obscurist possible jokes to the tiniest possible audience. But I
don't do that to exclude anyone. I do it so I can most effectively
signal to people who like that kind of thing, that this is the kind of thing
that they'd like.)
The other side of this coin, of course, is that a lot of people do like
what AOL and MSN have to offer - far more, I'm sure, than like my tiny bit of
the Net. You can talk about cognitive dissonance all you like, but ultimately
you have to listen to what people say they want, not what you suspect they'd
want had they been exposed to Noam Chomsky
and Negativland
a bit earlier in
life.
2003-04-15»
the hinternet»
Much of the angriest mail I get from Sunday Times
readers is about pop-up
windows and spam. Weirdly, given how often I rant against both in the column,
they often they blame me - or the "Internet nerds" I'm seen to represent. It's
the nerd's fault the Internet is this blighted; something should be done; why
doesn't the government do something?
I spend a lot of time trying to explain that "Internet nerds" are cursed
with the same burdens - more so, since they spend more time here. And that
most of my friends devote their time to fighting these problems, and their
solutions are often more effective than any government. And that they're free.
There's a bit of me that does feel guilty. While I manage to fend off
pop-up windows with Mozilla, and spam with Spamassassin, most people don't
know about those programs. They live in the "hinternet", that shanty-town of
X10 pop-ups and porn adware, and endless, endless Hotmail and Yahoo spam.
They're tourists in the world of the Net, and like any tourist, they rarely
get a good guide. They're just taken down the back streets by disreputable but
flashy showmen, and robbed for everything they're worth. And it's true, we
don't do as much as we should for them, because we're okay in our little
burbclaves.
I can't recommend Mozilla
until it stops changing its name. But I
could recommend Spamassassin
, because Deersoft
produced a version for
Outlook. It even cost money - the true sign of quality in that weird
topsy-turvy hinternet. Finally I could give friends and family a
recommendation to fight the tons of crap entering their inboxes, instead of
just shrug
and say "Well, err, I don't have that problem anymore. Sorry!"
But now, I discover, the showmen have grabbed that. Network Associates
McAfee bought Deersoft in January. They've shelved Spamassassin Pro. They've
promised to release a new version in a quarter or so, under their SpamKiller brand. I'm really happy for Justin and Craig, who
now work for NA on SpamKiller. But now I don't have any software to recommend
for another quarter - and I don't trust Network Associates to do a decent job
in the future. Even if they hadn't fucked over PGP, they're still exactly the
kind of company that doesn't fix these endemic problems, but tries to profit
from them, appearing as if from nowhere to save those poor tourists while
relieving them of their wallet.
2003-04-14»
the other future»
Trotskyist libertarian science
fiction writer and Denis-Healey-level
political bruiser Ken Macleod just
got himself a blog. I've always said that if the neocons didn't exist,
Ken Macleod would have to invent them. I wonder what happens now they're all
in the same online novel? (via More Like
This)
petit disclaimer:
My employer has enough opinions of its own, without having to have mine too.