This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Re: Export amaroK Collection [SOLVED]

Tags: None
(comma "," separated)
User avatar
DocReedSolomon
Registered Member
Posts
22
Karma
0
Hi all!
Maybe I am missing something simple.. ??
How am I able to export my Collection?
I would like to do so on the CommandLine off my MySql Base.
I am not that familiar with MySQL yet.
The problem is, amaroK uses plenty tables, hmm..

Anybody a short BashScript @ hand exporting Artist, Album, Title?

thx!

Last edited by DocReedSolomon on Fri Sep 01, 2006 4:03 pm, edited 1 time in total.
User avatar
DocReedSolomon
Registered Member
Posts
22
Karma
0

Re: Export amaroK Collection

Mon Aug 28, 2006 7:20 pm
Anyone?
How do I get a list as CSV or TXT?
User avatar
dangle_wtf
Moderator
Posts
1252
Karma
0

Re: Export amaroK Collection

Tue Aug 29, 2006 7:59 am
check http://kde-apps.org - someone may have written a script already to do this, or similar.


"There are two theories to arguing with women. Neither one works."
.
If men could get pregnant, we'd learn the true meaning of "screaming nancyboy wuss"
User avatar
DocReedSolomon
Registered Member
Posts
22
Karma
0

Re: Export amaroK Collection

Tue Aug 29, 2006 10:20 am
dangle_wtf wrote:check http://kde-apps.org - someone may have written a script already to do this, or similar.

I already looked there, thanks. Also nothing at http://kde-files.org/
I just would like to share my Collection (List) with others. Maybe some kind of an Export function should be added to amaroK then?
User avatar
tante
Registered Member
Posts
47
Karma
0

Re: Export amaroK Collection

Tue Aug 29, 2006 11:54 pm
You can try this script I wrote.


"Governments can be useful to the governed only so long as inherent
tendencies toward tyranny are restrained."
Frank Herbert, 'God Emperor Of Dune'
User avatar
DocReedSolomon
Registered Member
Posts
22
Karma
0

Re: Export amaroK Collection

Wed Aug 30, 2006 11:04 am
Jürgen Geuter wrote:You can try this script I wrote.

hey - thx a lot! i will try this one out asap ;)
User avatar
DocReedSolomon
Registered Member
Posts
22
Karma
0

Re: Export amaroK Collection

Wed Aug 30, 2006 11:16 am
Works great! Could you please sort the Tracks as well?
Group / Album are sorted fine, but the Tracks look somehow unsorted.
Code: Select all
10CC - Alive (CD1) - Track 3 - Good Morning Judge, Bitrate 192, length 3: 6
10CC - Alive (CD1) - Track 2 - I'm Mandy, Fly Me, Bitrate 192, length 5:49
10CC - Alive (CD1) - Track 9 - Paperback Writer, Bitrate 192, length 3:58
10CC - Alive (CD1) - Track 5 - The Things We Do For Love, Bitrate 192, length 3:44
10CC - Alive (CD1) - Track 6 - Across The Universe, Bitrate 192, length 4: 9
10CC - Alive (CD1) - Track 1 - The Wall Street Shuffle, Bitrate 192, length 4:50
10CC - Alive (CD1) - Track 7 - The Stars Didn't Show, Bitrate 192, length 4:47
10CC - Alive (CD1) - Track 8 - Art For Art's Sake, Bitrate 192, length 8: 6
10CC - Alive (CD1) - Track 4 - Welcome To Paradise, Bitrate 192, length 5:22
10CC - Alive (CD1) - Track 10 - Shine A Little Light In The Dark, Bitrate 192, length 5:23
10CC - Alive (CD2) - Track 4 - The Bullets Medley, Bitrate 192, length 7:40
10CC - Alive (CD2) - Track 1 - Feel The Benefit, Bitrate 192, length 14:26
10CC - Alive (CD2) - Track 2 - Dreadlock Holiday, Bitrate 192, length 6: 6
10CC - Alive (CD2) - Track 5 - Slow Down, Bitrate 192, length 5:46
10CC - Alive (CD2) - Track 3 - I'm Not In Love, Bitrate 192, length 6:42

Anyway, good job, really! and fast! Thx a lot.

BTW: does also work using Python 2.4  :cool:
User avatar
tante
Registered Member
Posts
47
Karma
0

Re: Export amaroK Collection [SOLVED]

Wed Aug 30, 2006 12:39 pm
Fixed and uploaded.
Report back if you encounter any other problem, please.


"Governments can be useful to the governed only so long as inherent
tendencies toward tyranny are restrained."
Frank Herbert, 'God Emperor Of Dune'
User avatar
DocReedSolomon
Registered Member
Posts
22
Karma
0
Looks much better!
Code: Select all
10CC - Alive (CD1) - Track 1 - The Wall Street Shuffle, Bitrate 192, length 4:50
10CC - Alive (CD1) - Track 2 - I'm Mandy, Fly Me, Bitrate 192, length 5:49
10CC - Alive (CD1) - Track 3 - Good Morning Judge, Bitrate 192, length 3: 6
10CC - Alive (CD1) - Track 4 - Welcome To Paradise, Bitrate 192, length 5:22
10CC - Alive (CD1) - Track 5 - The Things We Do For Love, Bitrate 192, length 3:44
10CC - Alive (CD1) - Track 6 - Across The Universe, Bitrate 192, length 4: 9
10CC - Alive (CD1) - Track 7 - The Stars Didn't Show, Bitrate 192, length 4:47
10CC - Alive (CD1) - Track 8 - Art For Art's Sake, Bitrate 192, length 8: 6
10CC - Alive (CD1) - Track 9 - Paperback Writer, Bitrate 192, length 3:58
10CC - Alive (CD1) - Track 10 - Shine A Little Light In The Dark, Bitrate 192, length 5:23
10CC - Alive (CD2) - Track 1 - Feel The Benefit, Bitrate 192, length 14:26
10CC - Alive (CD2) - Track 2 - Dreadlock Holiday, Bitrate 192, length 6: 6
10CC - Alive (CD2) - Track 3 - I'm Not In Love, Bitrate 192, length 6:42
10CC - Alive (CD2) - Track 4 - The Bullets Medley, Bitrate 192, length 7:40
10CC - Alive (CD2) - Track 5 - Slow Down, Bitrate 192, length 5:46

Well, i would leave out the word "Track" (could probably fix that myself).
Additionally, a leading 0 would be fine.. just some Eye Candy you know. It would look more sorted to have
01
02
10
11
etc..

(Never came across any album with >99 Tracks).
Also I would leave out the Length, I dont think that really matters? What do others think?

Oh, and btw.. The Comment field would be nice (maybe optionally?).

OTOH, I can live with that now as is. Really excellent work, highly appreciated, Thanks!
Maybe you upload that one to KDE-APPS? I am sure others will like it too.
User avatar
tante
Registered Member
Posts
47
Karma
0
I'll look into fixing your suggestions either later today or tomorrow. Thatnks for the input.
I'll upload it to kde-apps then, too (just wanted someone to test it before I upload it there ;)


"Governments can be useful to the governed only so long as inherent
tendencies toward tyranny are restrained."
Frank Herbert, 'God Emperor Of Dune'
User avatar
DocReedSolomon
Registered Member
Posts
22
Karma
0
Jürgen Geuter wrote:I'll look into fixing your suggestions either later today or tomorrow. Thatnks for the input.
I'll upload it to kde-apps then, too (just wanted someone to test it before I upload it there ;)

Great - thanks!
User avatar
tante
Registered Member
Posts
47
Karma
0
DocReedSolomon wrote:
Jürgen Geuter wrote:I'll look into fixing your suggestions either later today or tomorrow. Thatnks for the input.
I'll upload it to kde-apps then, too (just wanted someone to test it before I upload it there ;)

Great - thanks!



I uploaded a new version with a few fixes to my page (mostly removed the "Track" and made sure it would print 01 instead of 1).
I decided to make this a little easier to use than just using a bazillion command line switches and trow out a few QT dialogs and maybe even make it a proper amarok script, so it takes some extra time (mostly due to the fact that I don't know QT which will change ;))


"Governments can be useful to the governed only so long as inherent
tendencies toward tyranny are restrained."
Frank Herbert, 'God Emperor Of Dune'
User avatar
DocReedSolomon
Registered Member
Posts
22
Karma
0
Thx, will try asap.
Hmm.. maybe you shouldn't name every version 0.1  :biggrin:
Sometimes it is nice to step back a Version.

Looks alright to me:
Code: Select all
10CC - Alive (CD1) - 01 - The Wall Street Shuffle, Bitrate 192, length 4:50
10CC - Alive (CD1) - 02 - I'm Mandy, Fly Me, Bitrate 192, length 5:49
10CC - Alive (CD1) - 03 - Good Morning Judge, Bitrate 192, length 3:06
10CC - Alive (CD1) - 04 - Welcome To Paradise, Bitrate 192, length 5:22
10CC - Alive (CD1) - 05 - The Things We Do For Love, Bitrate 192, length 3:44
10CC - Alive (CD1) - 06 - Across The Universe, Bitrate 192, length 4:09
10CC - Alive (CD1) - 07 - The Stars Didn't Show, Bitrate 192, length 4:47
10CC - Alive (CD1) - 08 - Art For Art's Sake, Bitrate 192, length 8:06
10CC - Alive (CD1) - 09 - Paperback Writer, Bitrate 192, length 3:58
10CC - Alive (CD1) - 10 - Shine A Little Light In The Dark, Bitrate 192, length 5:23
10CC - Alive (CD2) - 01 - Feel The Benefit, Bitrate 192, length 14:26
10CC - Alive (CD2) - 02 - Dreadlock Holiday, Bitrate 192, length 6:06
10CC - Alive (CD2) - 03 - I'm Not In Love, Bitrate 192, length 6:42
10CC - Alive (CD2) - 04 - The Bullets Medley, Bitrate 192, length 7:40
10CC - Alive (CD2) - 05 - Slow Down, Bitrate 192, length 5:46


BTW: The CommandLineSwitches are OK, IMHO, specially for those who have more then one database?
Actually I thought this is a feature  :cool:

Why drawing menus and whatnot, hmm.. personaly I like it the way it is, and i dont have to start KDE at all just to create a list.
Comment Field would be nice, though ;)
Would be "done" for me then

Last edited by DocReedSolomon on Fri Sep 01, 2006 3:59 pm, edited 1 time in total.
User avatar
DocReedSolomon
Registered Member
Posts
22
Karma
0
Just to give others an Overview about the speed:

Code: Select all
time ./amacollex.py -u uname -p passwd -d amarok >list.txt

real    0m1.359s
user    0m0.696s
sys     0m0.034s


And we are talking about 13.000+ Files
Well, dont know about sqllite, this is mysql.

@Jürgen:
you could make the database name default to "amarok" if omitted, so this would be a parameter less on the Commandline for most users.
uname and pw is OK, imho.

On the contrary:
While looking for an export tool I came across "playlist2html". This one comes with amaroK.
It still was not finished after ONE HOUR so I simply gave up!
I mean - hey, I have 1GB of RAM, 2.4Ghz CPU and SATA2.
That python script was actually using 98% of my RAM - no **** Sherlock
User avatar
tante
Registered Member
Posts
47
Karma
0
maybe I'll keep the original script intact (meaning callable from commandline like this one) and just use the QT thingies to make things easier for those that don't like commandline. Right now it's just a nice thing to play with QT ;)


"Governments can be useful to the governed only so long as inherent
tendencies toward tyranny are restrained."
Frank Herbert, 'God Emperor Of Dune'


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]