The Artima Developer Community
Sponsored Link

Java Buzz Forum
Pruning past iTunes podcast content

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
dion

Posts: 5028
Nickname: dion
Registered: Feb, 2003

Dion Almaer is the Editor-in-Chief for TheServerSide.com, and is an enterprise Java evangelist
Pruning past iTunes podcast content Posted: Oct 24, 2005 9:33 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by dion.
Original Post: Pruning past iTunes podcast content
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
Latest Java Buzz Posts
Latest Java Buzz Posts by dion
Latest Posts From techno.blog(Dion)

Advertisement


I keep running across the same feature that I wish I had in my applications. As someone who subsribes to a lot of content, I really need to be able to cap the amount in some feeds.


E.g. I want to say "This planet feeds gets a ton of traffic, so just keep a rolling max of 100 so I don't turn around and see it full with 4000 entries"


This problem is even more important when subscribing to content such as pod/vidcasts. Before I look around, my hard drive is screaming about my podcast directory.


Since iTunes didn't seem to help me out, I ended up writing a tiny Ruby script that would allow me to nuke any content longer than X weeks. This is far from perfect, as I would like to set it up on a podcast basis. Some podcasts I like to keep around. Others, I don't really care about, and I only listen to when on long trips and I have exhausted the rest :)


The bulk of the script is simply:

Find.find(PODCAST_DIRECTORY) do |path|
	if FileTest.file?(path) && older_than_given_weeks?(path)
		puts "Deleting '#{path}' which had the mod time of '#{File.mtime(path)}'"
		File.delete(path)
	end
end

iTunes, aggregators, please let me setup queue maximums :)

Read: Pruning past iTunes podcast content

Topic: The Risk of Doing Nothing Previous Topic   Next Topic Topic: Steak-house Attire [Flickr]

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use