Re: [Banshee-List] Database Utility Hacker Wanted!



Here's a quick hack that should do the trick.

Usage:

grep INSERT song_info.sql | sed s/\\\\\'//g | perl replace.pl | sqlite3
test.db 

It's ugly* but it should be sufficient :-)

And now it's back to the books!

Cheers!
   Ruben

* It removes al quotes from artist names, perl probably handles this
too, but I hate perl and my knowledge doesn't reach much further than
this.

On Wed, 2007-05-30 at 01:28 -0400, Aaron Bockover wrote:
> Dear Banshee Enthusiasts and Hackers,
> 
> I am looking for someone to write a small utility that downloads the
> latest Magnatune [1] SQL database and converts that database into a
> Banshee database. The Tracks table in banshee.db is where the goods are
> stored [2]. The tool can be written in C#, Bash, Perl, Python, C -
> whatever I can easily run on openSUSE 10.2.
> 
> I need such a tool to populate a large Banshee database for testing the
> new model and view I am working on, which will bring awesome performance
> and interface gains to Banshee in the _very_ near future. I'll save more
> stunning details for a later post ;)
> 
> Thanks!
> --Aaron
> 
> [1] http://magnatune.com - and no, this does not imply we are working on
> actually supporting Magnatune at the moment in Banshee - I'm strictly
> looking for a quick and easy source of track data for performance
> testing. The latest SQL snapshot should always be available directly
> here: http://magnatune.com/info/song_info.sql
> 
> [2] The table that matters. Fill in as many applicable columns as
> possible.
> 
> CREATE TABLE Tracks (
> 	TrackID INTEGER PRIMARY KEY,
> 	Uri TEXT NOT NULL,
> 	MimeType TEXT,
>                    
> 	Artist TEXT,
> 	Performer TEXT,
> 	AlbumTitle TEXT,
> 	ReleaseDate Date,
> 	ASIN TEXT,
> 	Label TEXT,
> 	Title TEXT,
> 	Genre TEXT,
> 	Year INTEGER,
>                    
> 	TrackNumber INTEGER,
> 	TrackCount INTEGER,
> 	Duration INTEGER,
>                    
> 	TrackGain FLOAT,
> 	TrackPeak FLOAT,
> 	AlbumGain FLOAT,
> 	AlbumPeak FLOAT,
>                    
> 	Rating INTEGER,
> 	NumberOfPlays INTEGER,
> 	LastPlayedStamp INTEGER,
> 	DateAddedStamp INTEGER,
>                    
> 	RemoteLookupStatus INTEGER
> )
> 
> _______________________________________________
> Banshee-list mailing list
> Banshee-list gnome org
> http://mail.gnome.org/mailman/listinfo/banshee-list
> 
> 


--
Ruben Vermeersch (rubenv)
http://www.savanne.be

Attachment: replace.pl
Description: Perl program



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]