Skip to content
August 12, 2014 / Pratik

Archiving a Podcast

I wanted to archive all the episodes of a video podcast. The podcast listed all the episodes in it’s own rss feed, but didn’t include the episode number in the filename. So, I wrote a quick python script that generates a bash script, which downloads the listed episodes. That python script also adds the episode number in each filename. I went with the approach creating a bash script, to make it easier to review each filename and what’s going to be downloaded. I need to review these things, because downloading a lot of files could take a lot of time and there is a risk of naming things the wrong way.

#!/usr/bin/env python3

import xml.etree.ElementTree as etree
import math
import sys

if __name__ == '__main__':
    if len(sys.argv) != 2:
        print('Usage ' + sys.argv[0] + ' location_of_downloaded_rss_file ')

    tree = etree.parse(sys.argv[1])
    root = tree.getroot()
    channel = root[0]
    urls = []
    current_episode_number = 0
    total_episodes = 0
    maximum_number_of_digits = 0

    for item in channel.iter('item'):
        enclosure = item.find('enclosure')

        if enclosure != None:

    total_episodes = len(urls)
    maximum_number_of_digits = int(math.log10(total_episodes))+1

    while len(urls) != 0:
        url = urls.pop()
        urlList = url.split('/')
        filename = urlList[-1]
        current_episode_number += 1
        current_episode_number_padded = str(current_episode_number).zfill(maximum_number_of_digits)

        print("wget '" + url + "' -O '" + current_episode_number_padded + '_' + filename + "' ")
August 8, 2014 / Pratik

Interesting Links

July 31, 2014 / Pratik

Interesting Links

August 11, 2013 / Pratik

Observations of Culture

I guess I’m not alone in that observation

“Obama bemoans ‘change in culture’ (and Kardashians)” USA Today

July 2, 2013 / Pratik

Directly URL of Specific Pages In PDF Files

I learned that it is possible to link to specific pages within a PDF file while looking at documentation on the Toastmasters website. The url in href attribute will use a fragment identifier. Here is an example url that will explain how to use that specific fragment identifier that identifies the page to go to:

Using this will be convenient for creating notes and other situations that involve referencing an individual page within a pdf file.

March 14, 2013 / Pratik

Google Reader is Going To Be Discontinued

I use feed aggregators, because I read my news from multiple sources (e.g. NPR, The Verge, The Texas Tribune, KXAS, WFAA, and etc.) These feed aggregators give me the option to filter out things that I’m not interested in like stories that sound like a rehash of the police blotter. Recently Google has decided to discontinue their feed aggregator service, Google Reader.

I’m looking for alternatives. Before I used Google Reader I was using a desktop feed aggregator called RSSOwl. It supports Linux, Windows, and Mac OS X. I didn’t stop using RSSOwl, because of quality issues. I only stopped using RSSOwl, because my workflow changed and at that time RSSOwl didn’t offer Google Reader synchronization. Getting many portable devices over time led me to change my workflow. It became less convenient to just use one device to read the news.

There are ways to get many news source in one location and that is to use social networks like Facebook, Twitter and Google+. I do not want to use social networks as the only way get my news. It doesn’t have the functionality that I need. There isn’t adequate filtering. There isn’t a way of to mark posts as read. Not all news services provide a social network presence.

As times passes we’ll reach the shutdown date of July 1, 2013. At that time I may have to revisit my old workflow of using one device as my centralized location of getting the latest news.

January 1, 2013 / Pratik

Oh wow, it’s been a while

It’s getting close to a year since my last post. I need to post more. A lot of things changed. I graduated college. I moved out of Missouri. I stopped using Ubuntu as my primary Linux distrobution way before the Amazon shopping lens chaos.

My preferences changed I’m using Arch Linux as my primary Linux. It’s not for the rush of climbing a mountain as a challenge. It’s more like I don’t want to run arround to chasing down PPAs or installing beta releases of Ubuntu just to get the latest programs. As my preferences changed KDE became my desktop environment of choice because the flexlibity was meeting my needs.


Get every new post delivered to your Inbox.