7.15.2004

Yet another edit to the mp3 blog grabbing script

So I was sitting around thinking, "How could I possibly beat this dead horse and make it even uglier in the process" when it dawned on me. I could not only do it, but I could do it and it would actually be a Good Thing.

This one should drastically cut down the time required to search through the mp3s for new ones. Instead of having one huge list of all the songs you've ever downloaded, it now gets a list of all songs available on all the blogs when it's ran and uses that list the next time it's ran. Sort of a rotating log kinda thing based on the assumption that once the songs scroll off the blogs' front page, there's no reason to keep a record of them anymore.

Note: If you wanted to keep a record of every song you've downloaded and what site it came from, just delete the "#" on the eighth line from the bottom (where it says "#| tee -a masterlist;"). It won't be a pretty list, but it will be searchable at least.

#! /bin/sh
echo 'Visiting blogs.....'
function fetch {
echo ------------------- >> .songtemp
echo Site visited: $1 >> .songtemp
echo Music downloaded: >> .songtemp
lynx -dump $1 | grep "http" | awk '{$1=""; print }' | grep "mp3$\|zip$" | sed 's/^[ \t]*//' | grep http >> .songtemp;
}

##### ---------------bloglist--------------- #####
# add blogs here, one to a line, preceded by "fetch"
fetch http://villa-straylight.blogspot.com/
fetch http://newflux.blogspot.com/
fetch http://tofuhut.blogspot.com/
fetch http://www.mysticalbeast.blogspot.com/
fetch http://www.tangmonkey.com/blogs/music/
fetch http://thenewpink.net/womenfolk/
fetch http://amillionlovesongs.blogspot.com/
fetch http://www.londonlee.com/blog.html/
fetch http://www.sixeyes.blogspot.com/
fetch http://losingmyedge.com/
##### ---------------bloglist--------------- #####

cat .songtemp | grep http | grep "mp3$\|zip$" >> .tmp
echo 'Checking for new music.....'
cat ./.tmp | sed 's/[ ^t]*$//' | grep -v -f ./.downloaded > .tmp2;
wget -N -T 30 -A.mp3,.zip -i ./.tmp2;
echo
cat .songtemp | grep -v -f ./.downloaded | perl -pi -e s/\%20/\ /g #| tee -a masterlist;
rm ./.downloaded
cat ./.tmp >> ./.downloaded;
rm ./.tmp;
rm ./.tmp2;
rm .songtemp;
echo -------------------
echo Done

Knoxville Tn Weather

I thought this may be helpful to any weather junkies who live in the Knoxville area. Just bookmark this link:

http://villa-straylight.blogspot.com/2004/07/knoxville-tn-weather.html


WVLT Knoxville current conditions


WVLT Radar

WBIR Radar

WBIR Forecast


WATE Forecast


GEOS-10 and GEOS-12 Composite Color Infrared


7.14.2004

Updated mp3blog mp3 grabbing script

I've updated the script so that it now lists the sites visited and tells you what, if any, songs were downloaded from the site. I also tweaked the actual code that does the work a little too so it's probably like .000001 milliseconds faster now.

This thing still looks like a drug abusing monkey jotted it down while he was on the toilet, but it works. I'm sure there are 6000 quicker, less wasteful ways for someone more experienced to code this, but hey, it's only 3 actual lines of code that do all the real work and the rest is cosmetic. You get what you pay for, and in this case you paid for a cheap trick that wears a lot of makeup to hide it's ugliness. All the waste really only accounts for 30 seconds of wait time, which is easily forgotten if you're downloading a lot of mp3s. And it's still a lot faster than visiting all the blogs.

Anyway, the big noticeable change is that after wget does it's thing, you now get output like this:

-------------------
Site visited: http://villa-straylight.blogspot.com/
Music downloaded:
http://www.eskimo.com/~wage/Mazzy Star - Bells Ring.mp3
-------------------
Done


Really, it's just echoing the site then if it downloads something it tells you. If the site was offline it would simply not list any songs as downloaded but it would still say it visited the site. Yeah it's dishonest, but if it does grab an mp3, by gum, it'll tell ya. Well, unless you already had that song and the file on the server is no newer. In that case it tells you it downloaded it although it didn't. So don't believe it's evil lies.

Anyway, here it is in all it's glory, fresh from the keyboard of the tmpfile master.

#! /bin/sh

echo 'Visiting blogs.....'
function fetch {
echo ------------------- >> .songtemp
echo Site visited: $1 >> .songtemp
echo Music downloaded: >> .songtemp
lynx -dump $1 | grep "http" | awk '{$1=""; print }' | grep "mp3$\|zip$" | sed 's/^[ \t]*//' >> .songtemp;
cat .songtemp | grep "mp3$\|zip$" >> .tmp
}

##### ---------------bloglist--------------- #####
fetch http://villa-straylight.blogspot.com/
fetch http://newflux.blogspot.com/
fetch http://tofuhut.blogspot.com/
fetch http://www.mysticalbeast.blogspot.com/
fetch http://www.tangmonkey.com/blogs/music/
fetch http://thenewpink.net/womenfolk/
fetch http://amillionlovesongs.blogspot.com/
fetch http://www.londonlee.com/blog.html/
fetch http://www.sixeyes.blogspot.com/
fetch http://losingmyedge.com/
##### ---------------bloglist--------------- #####

echo 'Checking for new music.....'
cat ./.tmp | sed 's/[ ^t]*$//' | grep -v -f ./.downloaded > .tmp2;
wget -N -T 30 -A.mp3,.zip -i ./.tmp2;
echo
cat .songtemp | grep -v -f ./.downloaded;
cat ./.tmp2 >> ./.downloaded;
rm ./.tmp;
rm ./.tmp2;
rm .songtemp;
echo -------------------
echo Done

Look on if you believe

Today's sad song is Mazzy Star's Bells Ring.

I did not realize until now that Mazzy Star is actually a 6 member band. As their website says David Roback and Hope Sandoval are the front figures of Mazzy Star and Keith Mitchell, William Cooper, Jill Emery and Suki Ewers are very much anonymous to the public.

Hope Sandoval has a voice that is as beautiful as she is.

Buy Mazzy Star albums from their website

Hope Sandoval also has a website where she mentions the other various work she has done with many other bands, and has those albums and singles available for purchase there as well.


Image Hosted by ImageShack.us

Mazzy Star's Bells Ring.mp3.

Bells ring into the night
Sounds like a mistress on a rainy night
Hold your throw down together
And see the light that goes away
Leave my heart down by the water
He spins inside my soul
It isn't true but you follow
Just hold me down by the water
They say you look like a believer
Look up to see the weakness in the sky
Nobody's out to buy your story
Nobody wants to know your reason why
Hold your hands out towards the water
In front of me to know I'm with you
Don't put it all into your hero
Look on if you believe
Look on if you believe
Look on if you believe
Don't want to say that I'm through with it
Just want to be , Right by your side,
Right by your side

Say what you will about Jenna Bush

but even after the drugs and booze, she hardly looks a day over 39


Image Hosted by ImageShack.us Image Hosted by ImageShack.us

Image Hosted by ImageShack.us Image Hosted by ImageShack.us

7.13.2004

Jeez...

Of course everyone's seen this:
Fed Mull Election Postponement if Terrorism Strikes

Free elections are a cornerstone of our Democracy. But now comes word from the Homeland Security Department that if there's another terrorist attack here, the presidential election might be postponed.

Now there's this:
U.S. Seeks to Protect Afghan Elections

KABUL, Afghanistan - Thousands of American troops have begun a new operation to prevent militants from derailing Afghanistan's first presidential election, the top U.S. commander here said Tuesday in an interview with The Associated Press.


7.12.2004

I can't make it to where you are

I just realized something profound. I thought I had a 10 megabyte website that is virtually unused, but in fact it's a 50 megabyte website that is virtually unused. Thus, I shall become a part time mp3 blogger. Well I sort of did that already, but now I am officially going to be a part time mp3 pseudo-blogger. Officially. As in I am going to actually try from now on.

I am not knowledgeable enough to be a "professional" audioblogger so I'm going to fill a niche by blogging only sad songs with a preference for female artists because those are my favorite type of songs in the world.

My first song as an "official" part time mp3 blogger is Car Crash by Tricky.

Tricky has a long history going back to the roots of trip-hop, but I will leave that up to you to read about.

I know what you're thinking, didn't he say he was going to post "sad songs with a preference for female artists?" Well, Tricky has always teamed up with female artists and taken the background as they sing the lead.

In Car Crash, Costanza Francavilla is the voice of a girl who is driving through the rain to see her lover. As she lays dying after a car crash, all she can think about is that she won’t make it to where her lover is.

To be honest, I don't care for the lyrics in the latter part of the song. They're somewhat confusing and senseless, though they do sound good in the song. It is her voice that I like so much and yearning of her dying thought which is not of death itself but that she won't be able to make it to be with her lover. If that's not sad, I don't know what is.

Tricky - Car Crash.mp3

Tricky Music at Amazon

Costanza Francavilla & Tricky

You leave me hungry
Wanting more
Am I thirsty
I wasn’t sure
See me driving
Through the rain
Why am I driving
I can’t explain

In my car to where you are
I won’t make it
I can’t make it
In my car to where you are
I won’t make it
I can’t make it

I am sliding
I lose my breaks
The lights are blinding
The earth quakes
Now I’m lying
Will I die
Will they find me
Will they try

In my car to where you are
I won’t make it
I can’t make it
In my car to where you are
I won’t make it
I can’t make it

Doesn’t matter about the time we make
Doesn’t matter it doesn’t shatter
If time we take
You know they’re lost
While I’m dragging the cross
(If you sing along…)
And where you cross (If I scream…)

While they’re washing they sins
(And we sing along…)
She sings, I do evil things
I need I strive (and we sing along…)
I bleed alive
(And we sing along… and we sing along…)

The color of stupidity

From Drudge:
Congressional study finds major problems with color-coded threat system, prompting Republican and Democratic leaders to call for an overhaul, before the public gets threat fatigue
To anyone who thinks the government is going to protect you, read that over and over again. First of all it took them three years to figure out that the color code threat system was stupid and confusing. Not only that but it took a congressional study which probably cost untold millions of dollars. And of course now that the study is complete Republican and Democratic leaders are fired up over fixing it, but every one of them spent the past three years in blissful ignorance probably patting themselves on the back at night over how great they are for looking out for us little guys.

But forget all that, that's just the government for you. Everyone knew from day one it was useless, but the real kicker is that they're worried we'll get "threat fatigue." In other words they're worried that we'll stop being afraid.

And that's the real problem with the color-coded threat system, they drag it out on all the holidays and release some story about how it may be possible for terrorists to put bombs in coolers or anthrax in Halloween candy or some other form of devilry in Easter eggs. They always point out that they really have no information about any of this, but it's better to keep you on your toes!

Hey, you stupid public leeches, you sullen whores of camera and dollar, that's precisely the point of terrorism, you wretched fat crooks, to keep us afraid!

Who's side are they on anyway? Ours? Obviously not for they are trying harder than te terrorists to keep us afraid. The terrorists? I wouldn't go so far as to say that, but I would say that their interests overlap quite often and that they'e quite adept at sitting around thinking up ideas for the terrorists then putting them on TV.

Perhaps they are on no one's side but their own.

As they get richer, crazier and more corrupt, the terrorists get stronger, crazier and more unified, all the while we are trapped in the middle of whores and murderers, helpless to do anything but die for both of their twisted world visions.

You want to know the root of terrorism? It's our feckless "leaders" kicking the hornet's nest. I'm not a strict isolationist but, Osama bin Laden is Ronald Reagan and GHW Bush's legacy. Fear is the current Bush's legacy, and corruption that of the Congress. Our Founding Fathers are rolling in their graves for these people are all enemies to what America is supposed to stand for.
John Quincy Adams, as U. S. Secretary of State, July 4, 1821
(thanks to fff.org)

"And now, friends and countrymen, if the wise and learned philosophers of the elder world, the first observers of nutation and aberration, the discoverers of maddening ether and invisible planets, the inventors of Congreve rockets and Shrapnel shells, should find their hearts disposed to enquire what has America done for the benefit of mankind?

Let our answer be this: America, with the same voice which spoke herself into existence as a nation, proclaimed to mankind the inextinguishable rights of human nature, and the only lawful foundations of government. America, in the assembly of nations, since her admission among them, has invariably, though often fruitlessly, held forth to them the hand of honest friendship, of equal freedom, of generous reciprocity.

She has uniformly spoken among them, though often to heedless and often to disdainful ears, the language of equal liberty, of equal justice, and of equal rights.

She has, in the lapse of nearly half a century, without a single exception, respected the independence of other nations while asserting and maintaining her own.

She has abstained from interference in the concerns of others, even when conflict has been for principles to which she clings, as to the last vital drop that visits the heart.

She has seen that probably for centuries to come, all the contests of that Aceldama the European world, will be contests of inveterate power, and emerging right.

Wherever the standard of freedom and Independence has been or shall be unfurled, there will her heart, her benedictions and her prayers be.

But she goes not abroad, in search of monsters to destroy.

She is the well-wisher to the freedom and independence of all.

She is the champion and vindicator only of her own.

She will commend the general cause by the countenance of her voice, and the benignant sympathy of her example.

She well knows that by once enlisting under other banners than her own, were they even the banners of foreign independence, she would involve herself beyond the power of extrication, in all the wars of interest and intrigue, of individual avarice, envy, and ambition, which assume the colors and usurp the standard of freedom.

The fundamental maxims of her policy would insensibly change from liberty to force....

She might become the dictatress of the world. She would be no longer the ruler of her own spirit....

[America's] glory is not dominion, but liberty. Her march is the march of the mind. She has a spear and a shield: but the motto upon her shield is, Freedom, Independence, Peace. This has been her Declaration: this has been, as far as her necessary intercourse with the rest of mankind would permit, her practice."

More Army Web Shenanigans

Fort some reason, it seems the Army is starting to become a stickler for intellectual property. Perhaps this is a sign of something to come?
From today's Secrecy News

VOICE TO SKULL: MORE ARMY WEB SHENANIGANS

The Center for Army Lessons Learned (CALL) at Fort Leavenworth
has encoded more of its public website in such a way as to
discourage printing, saving or copying of its contents.

Besides the "On Point" report on the Iraq war that was previously
described in Secrecy News (07/07/04), CALL has also taken the
trouble to restrict reproduction of its Thesaurus of military
terms.

Normal print, save and copy functions are defeated by Java
scripting that is embedded in the pages of the Thesaurus.
Nevertheless, the text still can be captured with some effort.

See, for example, this FAS copy of a Javascript-disabled CALL
Thesaurus page which addresses the peculiar subject of "voice to
skull devices" that employ microwave devices to "transmit sound
into the skull of person or animals":

http://www.fas.org/sgp/othergov/dod/vts.html

The underlying Javascript can be inspected by viewing the source
of the above page (thanks to DG for technical assistance).

The original Army Javascript-enabled version of this page can be
viewed (though not in Mozilla) here:

http://call.army.mil/products/thesaur_e/00016275.htm

What is the Army up to here? A request for an explanation was
not immediately answered. But the CALL Thesaurus title page
includes this notice:

"The CALL Thesaurus is government-owned intellectual property.
Use of this information for the purpose of enhancing any
commercial product is not authorized without written agreement
from this organization."

On the other hand, the CALL web site's security notice states
that "Information presented on this site is considered public
information and may be distributed or copied."

It *may* be distributed or copied. But the Army is doing its
best to make that difficult.

"The porn industry does the exact same thing to keep non-tech
users from saving images to their hard drives," explained one
well-informed correspondent.

7.11.2004

mp3 blog bash snarf script

I was recently pointed to this blog post in which Jeffrey Veen gives advice on using wget to automatically download songs from your favorite mp3 blogs.

The downside is that once you download the songs you have to keep them because wget will download them again if they are deleted. I tried it but I quickly racked up many megabytes of songs. I listened to them and decided to keep about 5 for further listening, but if the rest are deleted, wget will just download them again as long as they appear on the mp3 blogs.

Enter this bash script I jotted down which doesn't require keeping the files. It keeps a filelist of what you've downloaded and it cruises the blogs to get a list of what's available for download then compares the two and downloads only the new links.

I suggest making an mp3 directory and putting this in there and running it from there with a "./". The only modification you need to make is filling out the bloglist with your favorite mp3 blogs.

It's not foolproof. If the blog is up but the link to an mp3 is dead when the script visits the blog, the mp3 will still be put on the list as "downloaded". Hey, you get what you pay for.

(edited for cosmetic script changes)



#! /bin/sh

# This shell script is designed to automatically
# download songs from your favorite mp3 blogs
# It ain't pretty but it works

echo Initializing wage\'s mp3 blog snarfer - http://villa-straylight.blogspot.com/
echo 'Visiting blogs.....'
# It takes zip files because some blogs zip their mp3s,
# If no sites you visit use zips for mp3s but have zips for something else
# and it's screwing you up, replace the "\.mp3\|\.zip" below with "\.mp3"

function fetch {
lynx -dump $1 | grep "\.mp3\|\.zip" | awk '{$1=""; print }' | sed 's/^[ ^t]*//;s/[ ^]*$//' >> .tmp
}

# ^^ start the function to visit the blogs and put
# a list of all the mp3 and .zip links in a hidden file named '.tmp'

# list your favorite sites below here, make sure to
# add "fetch" before their URL. i.e. 'fetch http://my.favorite.blog.com/'

##### ---------------bloglist--------------- #####
fetch http://newflux.blogspot.com/
fetch http://tofuhut.blogspot.com/
fetch http://www.mysticalbeast.blogspot.com/
fetch http://www.tangmonkey.com/blogs/music/
fetch http://thenewpink.net/womenfolk/
fetch http://amillionlovesongs.blogspot.com/
fetch http://www.londonlee.com/blog.html/
##### ---------------bloglist--------------- #####

echo 'Checking for new music.....'

cat ./.tmp | sed 's/[ ^t]*$//' | grep -v -f ./.downloaded > .tmp2;
# Filters '.tmp' through list of already
# downloaded songs and outputs it to '.tmp2'

rm ./.tmp;
# Removes the .tmp file

wget -N -i ./.tmp2;
# downloads all songs in 'tmp2'

cat ./.tmp2 >> ./.downloaded;
# adds these files to the hidden 'downloaded' file

rm ./.tmp2
# remove '.tmp2'

# Note, the list of downloaded songs will get larger over time
# though probably not enough to really notice.
# Since we only get songs off the index page of the blogs,
# it should be safe to delete older entries that no longer appear on the blogs
# the older entries will be at the top of the file

#
# TODO maybe:
# make self contained by appending downloaded list to this script
# add proxy option for wget and lynx
# add dialogue for adding new blogs?
# add scheme for remembering which blog the mp3 came from
# hassle bloggers to put the band name in the filenames, dammit


-------------------------------


(short version)

#! /bin/sh
echo Initializing wage\'s mp3 blog snarfer - http://villa-straylight.blogspot.com/
echo 'Visiting blogs.....'
function fetch {
lynx -dump $1 | grep "\.mp3\|\.zip" | awk '{$1=""; print }' | sed 's/^[ ^t]*//;s/[ ^]*$//' >> .tmp
}##### ---------------bloglist--------------- #####
# add blogs one per line with "fetch" before them like this:
fetch http://some-blog.com
##### ---------------bloglist--------------- #####
echo 'Checking for new music.....'
cat ./.tmp | sed 's/[ ^t]*$//' | grep -v -f ./.downloaded > .tmp2; rm ./.tmp; wget -N -i ./.tmp2; cat ./.tmp2 >> ./.downloaded; rm ./.tmp2

This page is powered by Blogger. Isn't yours?