Registered Member
|
i like the collection statistics, but imho they miss some interesting things. so i thought, why not just extend them...
as i learned java/c at university i thought it couldnt be so hard to just use the current statistics functions as a template and change some things in them. for all i know so far its not going to be so easy... first thing is: as i dont know ruby or python, i wondered if i could also use java/c ? the wiki states "This makes it possible to write scripts in almost any programming language, like Ruby, Python or bash scripting." so could i use java/c ? i didnt find any scripts / templates for these languages, so guess its either not possible or its just not suited at all. so learning some ruby is the best solution? can i use the c++ code i found in src/statistics.cpp as a basis for my script? (though i dont understand much of the interesting parts from first view) btw, is it even possible to just add another entry in the collection statistics window? are there any templates or simple scripts that do something similar? because the provided script templates almost dont help at all thinking about it, i also need a good documentation for the database stuff, any recommendationsare welcome all in all what i want to do i quite simple, but i need to learn so much new stuff, and tbh i dont know where to start and there is no guide to help me out. so please tell me, what is the the best way to start with scripting? how did you learn to do so? |
KDE Developer
|
We strongly recommend to use a scripting language instead of compiled languages, especially if you plan to publish your Amarok Script. This is because scripted programs are automatically portable on almost any platform, while compiled binaries are not.
Also, Ruby is a fantastic language and really easy to learn. Shouldn't hurt to broaded your horizon a bit
Last edited by Anonymous on Thu Jan 17, 2008 1:48 pm, edited 1 time in total.
--
Mark Kretschmann - Amarok Developer |
Moderator
|
plus it's already a dependancy of Amarok anyway
"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" |
Registered Member
|
Hi,
It's fairly easy with just a simple bash script and some dcop calls. Here are some amarokscripts I made myself. Maybe this could help you. Collection Statistics
Now playing
And there are many other examples to look at, have a look at kde-apps.org Greetz Thomas |
Registered Member
|
you may be right, ruby is used for so many project anyway, cant hurt to learn something new. just hope i an find the time... but i`ll have a look
well thanks, although this looks simply, it isn exactly anything i can use. i wan to create some _new_ statistics, you just read out the statistics amarok already created, thats a big difference... i already had a look at kde-apps but except maybe music-diary (or whatever it was exactly called) i couldnt find anything usefull. i wanna have things like 'total lenght of unplayed songs' and so on. but well, i will have to start with something ssimpler anyway, will try to convert your code to some working ruby scritpt and then get on with something more complex
Last edited by Nukm on Sat Jan 19, 2008 1:40 pm, edited 1 time in total.
|
Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]