Plugin updates

Posted by Michael Giarlo on November 16, 2008

I finally pushed out some embarrassingly outdated WordPress plugin updates a few moments ago.

  • Updated unAPI plugin with a patch contributed by Jay Luker that removes the hard-coded "wp_" table prefix. The updated version of the plugin has been tagged as 1.4.1.
  • Updated LinkPURL plugin with a patch contributed by Mark Matienzo that enables partial redirects. I made some additional tweaks to the plugin to make this feature configurable via the WordPress management UI. This has been tagged as 1.1.
  • Created a new unAPI plugin branch for Mark Matienzo's Scriblio-oriented tweaks. The branch is called 1.4.1-anarchivist-scriblio and it contains the scriblio.diff file. I have yet to integrate the diffs, as the file that was patched has changed since the patch was issued. If anyone is interested in working on unAPI/Scriblio integration, please get in touch with me.

And here is my to-do list which I hope will keep me honest.

  • Update OAI-ORE plugin to support version 1.0 of the ORE specification.
  • Add per-post (and per-page?) resource maps that wrap all embedded images and links.
  • Enable "cool URIs" for all resource maps.

It is my hope that I'll get to those sometime before the summer begins. :)

Convert Windows shortcuts into Ubuntu shortcuts

Posted by Michael Giarlo on October 29, 2008

Here's another entry in the "dumb little scripts that work for me and may or may not be helpful to other folks" department…

I use both Windows and Ubuntu at home, gradually transitioning from the former to the latter. I've accumulated a bunch of Windows URL shortcuts, mostly things I wanted to read once so instead of bookmarking them, I dragged their links to my desktop. This creates .URL files which are simple little plain-text two-liners. It turns out that on Ubuntu, and probably similar *nix systems, web shortcuts are also simple little plain-text files. These files have the .desktop extension (though you won't see the extension by looking at the desktop).

I wanted a way to convert my .URL files to .desktop files so that I can just toss them on my Ubuntu desktop and double-click them the same way I would if I were on Windows. This cruddy little Python script does the trick.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env python
# shortcut_converter.py
 
import os
import sys
 
TEMPLATE = """[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=%(basename)s
Type=Link
URL=%(url)s
Icon=gnome-fs-bookmark
"""
 
if __name__ == '__main__':
    for arg in sys.argv[1:]:
        print "Converting %s" % arg
        if not os.path.isfile(arg):
            print "*** %s is not a file" % arg
            continue
        (filepath, filename) = os.path.split(arg)
        (basename, extension) = os.path.splitext(filename)
        if extension.lower() != '.url':
            print "*** %s is not a URL file" % arg
            continue
        urlfile = open(arg)
        # strip() removes extra DOS/Windows carriage return
        lines = [line.strip() for line in urlfile.readlines()]
        urlfile.close()
        if lines[0] != '[InternetShortcut]':
            print "*** %s is not a valid URL file" % arg
            continue
        url = lines[1].split('URL=')[1]
        dtfile = open(os.path.join(filepath, '%s.desktop' % basename), 'w')
        print "Writing %s" % dtfile.name
        dtfile.write(TEMPLATE % locals())
        dtfile.close()

I used scp to pull over all my .URL files and then invoked the script thusly:

python shortcut_converter.py *.URL

worksforme!

Is John McCain a socialist?

Posted by Michael Giarlo on October 24, 2008

Central to the McCain/Palin campaign's rhetoric lately has been the allegation that Barack Obama is a socialist (which, sadly, is something of a four-letter word). Their evidence: Obama's encounter with the now famous "Joe the Plumber," wherein Obama explained to Joe that the point of his economic plan, and by extension the progressive tax and the liberal welfare state, was to help bring up those "behind" Joe. Obama's misstep was using the (honest) phrase, "spread the wealth around." McCain has used this soundbite to justify labeling Obama with the scarlet letter 'S.'

Yet John McCain embraces the same "socialist" principle:

Here is the relevant soundbite:

When you reach a certain level of comfort, there’s nothing wrong with paying somewhat more.

If John McCain believes Barack Obama is a socialist, then he too is a socialist — it's the very same principle. (For the record, I don't believe either is a socialist. And I believe soundbite politics insults our intelligence.)

I tip my hat to Daniel Miessler for posting about this.

Call for Proposals - code4lib 2009 conference

Posted by Michael Giarlo on October 23, 2008

Hear ye, hear ye, techie librarians and library techies:

Birkin James Diana, representing the host, Brown University, announces a call for proposals for talks at the code4lib 2009 conference:

The code4lib conference is wonderful in large part because of what you folk share.

Head over to the Call For Proposals page and submit your idea for a prepared talk. Information about the time-frame, scope, and evaluation process — as well as the link to the submission form — can be found at:

http://library.brown.edu/code4libcon09/proposals/

Some important notes:
- Proposals can be submitted through Sunday November 23 2008.
- Just like when you vote, use your code4lib username and password.
- You initially won't be able to edit your proposal(s), but I'll have that implemented in the near future.

More information on prepared talks from the proposal page:

Prepared talks are 20 minutes, and must focus on one or more of the following areas:

* "tools" (some cool new software, software library or integration platform)
* "specs" (how to get the most out of some protocols, or proposals for new ones)
* "challenges" (one or more big problems we should collectively address)

The community will vote on proposals using the criteria of:

* usefulness
* newness
* geekiness
* diversity of topics

We cannot accept every prepared talk proposal, but multiple lightning talk sessions should provide everyone who wishes to present with an opportunity to do so.

Do consider submitting a talk if any of that sounds interesting to you.

Not to be dramatic

Posted by Michael Giarlo on October 02, 2008

That to secure these rights [of Life, Liberty, and the Pursuit of Happiness], Governments are instituted among Men, deriving their just powers from the consent of the governed, — That whenever any Form of Government becomes destructive of these ends, it is the Right of the People to alter or to abolish it, and to institute new Government, laying its foundation on such principles and organizing its powers in such form, as to them shall seem most likely to effect their Safety and Happiness.

Just saying1.

  1. Okay, yes, totally dramatic. []