Monday, January 09, 2006

Db.etree.org,Grateful Dead and Monad

As many of you may (or may not) know, I have a large and growing collection of live shows by the Grateful Dead and some of the related bands (Jerry Garcia Band, Phil and Friends, Bobby Weir, etc). Over Christmas, I had a huge re-organisation of my Dead/Jerry Collection - making a back up being top of my priority list! Also, with the removal of the lossles sound board recordings from the Live Music Archice, I wanted to ensure I could gather what I could before it goes away. As I listen to these shows, I'm finding some are of really very high quality. Some of the sbds are CD quality for sure - so rediscovering some of these shows has been a pleasure.

I also started cataloging my colection up to Etree. I've got all my 1960's Dead, some early 70's Dead and some Jerry - around 200 hours catalogued thus far with a lot more to upload. And if there's a show you want, B&P works for me!

So (and I know you were waiting for it!) here's the Grateful-Dead to Monad link...

To manage this collection, I've started writing some Monad scripts to process the collection. The first script is count.msh. this goes through the collection and reports on what's there, based on folder naming conventions and the presensnce or absence of flag files (empty files with a specific name).

I use an Etree folder naming convention that contains details of the show in the folder name. For example a folder name matching "*.sbd*.*" or *.aud.*.* contains soundboard or audience recordings, folders ending with ".shn?" or ".flac?" contain shn and flac files respecitively. There are a few more conventions I use - you can see these in the code. En each folder I have a few Flag files used that indicate the state of this show, including whether I have a CD backup of this show and whether I've checked the MD5s to ensure my copies are sound. I've also started adding a flag file to indicate if this show has been posted to db.etree.org.

This is count.msh:

#count.msh
#Count the Dead and Jerry Shows in my archive

# Some constants:
# $DeadShowBase - folder at top of gd shows
# $JerryShowBase - folder at top of jerry shows
# $BobbyShowBase - folder at the top of bobby shows
# $PhilShowBase - filder at the top of the phil shows

$DiskRoot = "G:"

$DeadShowBase = $DiskRoot + "\gd"
$JerryShowBase = $DiskRoot + "\Jerry"
$BobbyShowBase = $DiskRoot + "\bobweirshn"
$PhilShowBase = $DiskRoot + "\philshn"

# Announce Ourselves
"Count.msh - v 1.0.5"
"Count My Shows"
< "---------------------------------"
"Dead Show Base : $DeadShowBase"
"Jerry Show Base : $JerryShowBase"
"Bobby Show Base : $BobbyShowBase"
"Phil Show Base : $PhilShowBase"
"---------------------------------"
"" # Count the Dead shows
$Dir= ls $DeadShowBase | where {$_.mshiscontainer -eq- $true}
$DeadShows=$Dir.count
#Create subsets based on names of the folders
$deadsbds=$dir | where {$_.name -match ".sbd" }
$deadbrkn=$dir | where {$_.name -match "broken" }
$deadpart=$dir | where {$_.name -match "partial" }
$deadauds=$dir | where {$_.name -match ".aud" }
$deadunkw=$dir | where {$_.name -Match ".unk"}

#and see how many have the md5ok's file?

$DeadMD5Checked=0
foreach ($d in $dir)
{
$sn=$d.fullname + "\md5check_ok"
$md5ok= ls $sn -ea silentlycontinue
if ($md5ok )
{$DeadMD5Checked++}
}

#Display results
"Grateful Dead Show Summary"
"--------------------------"
"Total shows: $deadshows"
"Soundboards: $($deadsbds.count)"
"Auds : $($deadauds.count)"
"Unknown : $($deadunkw.count)"
"Partial : $($deadpart.count)"
"Broken : $($deadbrkn.count)"
$DeadPctChecked=($DeadMD5checked/$DeadShows).tostring("P")
"MD5's check: $DeadMD5checked ($DeadPctChecked)"
""

#
#next count the Jerry shows
#
...omitted to shorten the listing # Display Summary
"SUMMARY"
"-------"

$totalshows= $DeadShows+ $JerryShows+$PhilShows+$BobbyShows
$pctchecked=($Jerrymd5checked+$DeadMD5Checked+$PhilMD5Checked+$BobbyMD5Checked)/$totalshows
$pcs=$pctchecked.tostring("P")

"Total Shows: $totalshows"
"MD5s OK : $pcs"
$totalsbds=$Jerrysbds.count + $deadsbds.count+$philsbds.count+$bobbysbds.count
"Total Sbds : $totalsbds"
$totalauds=$Jerryauds.count + $deadauds.count+$Philauds.count+$bobbyauds.count
"Total Auds : $totalauds"

# The End

In the next blog post, I plan to show how I upload this to my ftp server using Monad

No comments: