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

Export List of Collection

Tags: None
(comma "," separated)
Myk Robinson
Karma
0

Export List of Collection

Wed Aug 03, 2005 9:52 am
I am using Amarok 1.3 beta 3, compiled with MySQL support. Is there a way that i can export a text list that shows my Albums, sorted by Artist? I imagine there is a way to get this info form MySQL. I would like to know how to do this, or if there is a built-in tool in Amarok, or plugin, to do something similar.

THanks,
-myk robinson
User avatar
eean
KDE Developer
Posts
1016
Karma
0
OS

Re:Export List of Collection

Wed Aug 03, 2005 9:56 am
Someone could write a script to do this, using the information from MySQL directly or using the amaroK query dcop command. But there isn\'t one I know of.


Amarok Developer
Myk Robinson
Karma
0

Re:Export List of Collection

Wed Aug 03, 2005 10:02 am
I found one way to do it by asking this a few days ago on another forum, but there must be an easier way.

Here\'s what i have so far. This must be done from console:

[code:1]
mysql -p -u

*this should be the username and password specified in Amarok for the database*

use

tee /home/username/Desktop/textlist.txt
*this will export everything to the specified textfile from here on*


select artist.name as artist, album.name as album from artist, tags, album where artist.id=tags.artist and album.id=tags.album group by album.name;

\\q
[/code:1]

that gave me a list, but not one that is easily manageable... I wonder if this can be exported to a spreadsheet instead, or if someone who understands mysql can let us in on a better way for the output.. Here\'s a portion of my output:


------------------------------------+---------------------------------------------------------------------------------------+
| artist | album |
+------------------------------------+---------------------------------------------------------------------------------------+
| KJ-52 | 7th Avenue |
| Blindside | A Thought Crushed My Mind |
| Hopesfall | A Types |
| Corey Red & Precise | Anthology |
| Superchick | Beauty from Pain |
| Natalie Cole | Billboard Top 100 of 1989 |
| Norma Jean | Bless the Martyr and Kiss the Child |
| DJ Maj | BoogiRoot |


-myk robison
Myk Robinson
Karma
0

Re:Export List of Collection

Wed Aug 03, 2005 10:10 am
Some of the code didnt show up in the previous post, so i will try again using the QUOTE option instead of CODE:

mysql -p -u [username]
[enter password]
*this should be the username and password specified in Amarok

use [amarok database name]

tee /path/to/desired/textfile.txt
*this will export all data to the desired textfile*

select artist.name as artist, album.name as album from artist, tags, album where artist.id=tags.artist and album.id=tags.album group by album.name;

\\q


sorry about the mixup.

-myk robinson
Mike Diehl
Registered Member
Posts
87
Karma
0

Re:Export List of Collection

Wed Aug 03, 2005 10:14 am
try this

dcop amarok collection query \"select artist.name as artist, album.name as album from artist, tags, album where artist.id=tags.artist and album.id=tags.album group by album.name;\"


Dunno if that helps any, but you wont need to use mysql, and it should also work on all the other db types.

Post edited by: eean, at: 2005/08/03 06:31
Myk Robinson
Karma
0

Re:Export List of Collection

Wed Aug 03, 2005 10:23 am
Can you explain how to use the code you posted? Do i simply paste this into a console? I am unfamiliar with using dcop.

Thanks,
-myk
Mike Diehl
Registered Member
Posts
87
Karma
0

Re:Export List of Collection

Wed Aug 03, 2005 10:26 am
Yes, use dcop from the command line or with kdcop, you can send dcop amarok collection query any sql query you wish.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar