STIW4: Confessions of an Info-Junkie

| | Comments (0)

<deep sigh>

Hi, my name is Ryan and... and I am an info-junkie.

Hi Ryan!

I use NetNewsWire (pro) to read my newsfeeds. Too many newsfeeds. I've got 178 feeds currently tho that fluctuates. I've got them grouped into prioritized groups so I can focus on certain ones more than others, like "ruby" vs "ruby-bored". I know that's not good... but... That works pretty well, actually.

Why I'm really here... my real problem... From these feeds, I queue up even more. Like, I read wiki update feeds and queue up whole pages to read for later. Loads of them. 132 of them right now. I'm weak. I know it. I gotta know! But since I can't group them the way I can the feeds, I'd like SOME way to bring some order out of chaos...

sort_nnw_tabs.rb

#!/usr/local/bin/ruby -w

require 'enumerator'

Dir.chdir File.expand_path("~/Library/Application Support/NetNewsWire") do
  path = "BrowserTabs.plist"

  raise $? unless system "plutil -convert xml1 #{path}"

  file = File.read(path)
  lines = file.split(/\n/)
  head, meat, tail = lines[0..3], lines[4..-3].enum_slice(6).to_a, lines[-2..-1]
  body = head + meat.sort_by { |subarray| subarray[-2] } + tail

  File.open(path, 'w') do |f|
    f.puts body.join("\n")
  end

  raise $? unless system "plutil -lint #{path}"
  raise $? unless system "plutil -convert binary1 #{path}"

end

Quit NNW, fire this puppy up, and run NNW and now your 40 tabs of wiki pages are all grouped together...

Hey... where'd everybody go?

Standard Disclaimer Applies I won't be responsible for your data-loss. Besides, you should already have backups.

Leave a comment

About this Entry

This page contains a single entry by zenspider published on July 18, 2007 1:06 AM.

Job: Eric and I Just Gave Notice was the previous entry in this blog.

Argh! Stop being "clever"! is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 4.32-en