Skip navigation

Charlie Harvey

| Back to navigation

Files

Permalink

next [0..8 of 68 philez]
href

Post Entries From RSS and Atom Feeds to Diaspora with feed2diasp.pl (handy)

This is hosted on Gitorious now. I thought I would give gitorious a whirl anyhow, so you can find the latest version of feed2diasp over there.

I've just got myself set up on Diaspora. Which is a wonderful project by the way. I'm well chuffed that there is finally a vaguely secure way to socially network that puts me in control of my personal data. I've also heard good things about Friendica, but I've not tried it.

One feature that I rather like, which hasn't been implemented in Diaspora yet is the ability to feed in RSS feeds of the other stuff you've been doing on the interwebs. So, this is a first crack at letting you post your RSS feed to your Diaspora pod, feed2diasp.pl

You should be able to set it up based on the content of the README file ( or perldoc ./feed2diasp.pl if you like that sort of thing). You'll need Perl 5.10.0 installed and some stuff from the CPAN, again instructions in the README. You do the config in json format in feed2diasp.json - I'll try and think of a way round you having to store your password in there. For now you may want to keep it on an encrypted partition.

The script ought to work with RSS and Atom feeds. Under the hood it uses XML::Feed to do that. I'd love to hear any feedback you have on the script. Please bear in mind that I can't guarantee being able to support it, especially for windows and mac users. But I will try and respond if you contact me.

  2011-12-03 00:14:40 [Link: 106] [Tweet it: 106] [Digg it: 106]

href

Bullshitr2.0Beta++ (funny)

Back in the old days of the internet, googling for Bullshit used to bring up dack.com's web economy Bullshit generator.

Bullshitr came along a few years later to update the concept. The Web 2.0 name generator and what the fuck is my social media strategy brought their deliverables to the table too.

So it isn't like there isn't prior art for this sort of thing. The unique combination of Bullshitr2.0Beta++ is that it screen scrapes the existing generators to make a complete web application home page entirely out of bullshit. Fuck yeh!

I've put the bullshitr.pl script, which does makes this work online in case you want to leverage some bluesky bullshit against the wall and see who salutes.

  2011-11-08 23:34:31 [Link: 105] [Tweet it: 105] [Digg it: 105]

href

New Oxford Indymedia Logo (handy)

This is a first crack at making a new Oxford Indymedia logo. I wrote up how I made the funky fonts over at Tip: Make a distressed font with GIMP

  2011-10-02 18:07:25 [Link: 104] [Tweet it: 104] [Digg it: 104]

href

Real Ultimate Rioters (funny)

I wrote a proper post about the recent London Riots on the New Internationalist blog. But I thought a Real Ultimate rioters parody was probably in order. Props to gillions.org for the real ultimate generator.

  2011-08-09 17:39:29 [Link: 103] [Tweet it: 103] [Digg it: 103]

txt

The Suggester: A Perl Keyword Suggestion Script (techie)

My colleague Brian, of New Internationalist Australia mentioned a tool he uses to get keyword suggestions for adwords and SEO purposes. So, I thought I'd have a crack at making a perl version. This is that. Its called The Suggester. Cunning name, huh?

The Suggester grabs a bunch of keywords related to a search term from Google suggest. It's loosely based on a python script that I saw but can't find in my history now and an older perl implementation, John Bokma's gsuggest.pl. The suggester takes the approach of appending each letter of an alphabet to your search term and searching for suggestions for that. If your term was "foo" it would search for "foo a", "foo b" and so on up to "foo z". The suggestions that google returns are deduplicated and presented in alphabetical order. Like this:

$ the_suggester.pl term
The Suggester

Note: results are alphabetically sorted and unique

=============================================
 Num queries | Term
=============================================
       87800 | 'literary term quiz'
     2540000 | 'medical term qd'
    26700000 | 'term a pest'
   514000000 | 'term address'
    34300000 | 'term african american'
     4530000 | 'term and permanent life insurance'
    10400000 | 'term and whole life insurance'
     6620000 | 'term appointment'
    52700000 | 'term arab spring'
    36900000 | 'term assistant professor'
      289000 | 'term auction facility'
       29100 | 'term auction facility wiki'
     7650000 | 'term b loan'
   201000000 | 'term baby'
   276000000 | 'term bill'
     2420000 | 'term bill rutgers'
   225000000 | 'term birth'
     2850000 | 'term black irish'
     5250000 | 'term bond'
      361000 | 'term breech trial'
     3410000 | 'term busters'
    14700000 | 'term by term differentiation'
    90100000 | 'term calculator'
    19500000 | 'term certain'
   153000000 | 'term cloud'
…

  2011-07-07 18:14:36 [Link: 102] [Tweet it: 102] [Digg it: 102]

href

Muffet: A Perl Web Spider (techie)

Muffet is a web spider written in Perl and Moose that I've put up on github, under GPL.

The problem that I was trying to solve was to spider newint.org to make a xapian index file, so its targetted at that usage. However, it can spit out xml for a google sitemap or raw text for debugging as well.

Bear in mind it doesn't respect robots.txt. However, you can use a xpath_noindex in pages you want nofollowed. You can also specify the skip_urls parameter, which does a regex match and skips matching urls. If people nag me I might add robots support using WWW::Mechanize::Polite or something. What do you reckon folks?

  2011-05-12 15:56:51 [Link: 101] [Tweet it: 101] [Digg it: 101]

href

TwitterHaiku -- A Thing for making haiku from Twitter searches (funny)

TwitterHaiku lets you find a haiku-like tweet. That is to say that it finds 17 syllable tweets from the Twitter search API and formats them so they look like a haiku. I wrote it as an amusing way to respond to a dinner invitation written in verse form which I received from from a certain Penguin. I'm very grateful to Greg Fast for making Lingua::EN::Syllable available on CPAN. It helped me to count syllables relatively reliably. I was also helped by a perlmonks post on approtioning an array almost equally by davido which put me on the right lines for apportioning words between lines.

  2011-04-02 13:15:00 [Link: 99] [Tweet it: 99] [Digg it: 99]

href

Fixed: Flickrshow NS_ERROR_INVALID_POINTER (techie)

I recently added a flickrshow to my cider reviews page, Ben Sekulowicz has done a great job with it, it worked exactly like I wanted, well almost. There was something breaking for me, showing up as this error in Firefox:

uncaught exception: [Exception... "Component returned failure code: 0x80004003 
(NS_ERROR_INVALID_POINTER) [nsIDOMNSHTMLElement.innerHTML]"  nsresult:
"0x80004003 (NS_ERROR_INVALID_POINTER)"  location: "JS frame ::
http://www.flickrshow.com/static/scripts/flickrshow-7.1.js :: anonymous :: line
357"  data: no]
Line 0
There was a useful post on Defective Semantics called Firefox NS_ERROR_INVALID_POINTER with innerHTMLwhich pointed me in the right direction: it was an   character around line 357 that was breaking stuff! Whoulda thunk? Feel free to grab a copy of this version. It works on chromium and iceweasel on Debian squeeze and ie8 on a virtualbox.

  2011-03-12 15:55:29 [Link: 100] [Tweet it: 100] [Digg it: 100]

Author: Charlie Harvey

Updated: 2012-02-4T09:11:46