Sunday, December 26, 2010

Very good sentences

In a perfect centrally planned socialist state everyone is part of a hierarchy pursuing the same end. If that end is the one true good, that society will be perfect in a sense in which a capitalist society, where everyone pursues his own differing and imperfect perception of the good, cannot be. Since most socialists imagine a socialist government to be controlled by people very like themselves, they imagine that it will pursue the true good—the one that they, imperfectly, perceive. That is surely better than a chaotic system in which all sorts of people other than the socialists perceive all sorts of other goods and waste valuable resources chasing them. People who dream about a socialist society rarely consider the possibility that some of those other people may succeed in imposing their ends on the dreamer, instead of the other way around. George Orwell is the only exception who comes to mind.
That's from David Friedman's Machinery of Freedom, which I'm reading online.

Tuesday, December 14, 2010

Sunday, December 12, 2010

How to get a text listing of an XBMC movies database

This outlines how to get a text listing of your XBMC movies in the format

Title (year)

Step 1)
Export the database. Instructions here

Step 2)
Grab the following xls file. Credit goes to waldherr.org. This is their file with very few modifications.

Step 3)
Parse the xml. On ubuntu simply run:
xsltproc xsl_filename.xsl database.xml > output.txt
waldherr recommends msxsl.exe for windows

How to get an HTML listing of an XBMC movies database

Use this xsl file, follow the instructions here, or on ubuntu run the command

xsltproc ./title_year_link_html.xsl ./database.xml >XMBC_videolisting.html

This is very basic. It doesn't even use the html output option. Surely this can be done better. Way better. It does generate a search query to themoviedb.org though. An example:
Fight Club (1999)
Wayne's World (1992)
Sometimes the search takes you right to the movie info (as the first example), but if there's a collision, it takes you to a search results page.