LWN on the Kindle

I am a new subscriber to Linux Weekly News. For a long time, I've been a subscriber to the Linux Journal magazine; however, the best article that I find interesting is the kernel update article diff-u by Zack Brown. Anyways, the content in LWN is tantalizing my taste buds every week on kernel and other Linux news.

I purchased an Amazon Kindle a couple weeks ago and wanted to receive my LWN automatically over Whispernet. Thus is born send-lwn-to-kindle.sh. Amazon has a free service which will convert attachments to Amazon's AZW format and email you back the converted file. Alternatively, use the [kindlename]@kindle.com to have the script mail the LWN (sans pictures so far) to your Kindle over the wireless connection for a fee of 10 cents.

The script is triggered from maildrop when my email account receives the LWN announcement email. Enjoy and please send me any improvements.

Using XPath and Default Namespaces

I had a problem with parsing an XML document that had a default namespace:

<books xmlns="http://someurl.com">
<book>
<title>A Title</title>
</book>
</book>

One would expect an XPath query for //book/title to return all titles, but since the namespace is set to an anonymous style namespace I had to redefine the namespace such that:

xmlns:pub=http://someurl.com"

then perform the query: //pub:book/pub:title

More Info

 1

Flickr

Colin-4060Tommy and SebastionTommy and SebastionMilk comaGot Milk?colin-1374

User