[Digikam-users] Rating Pyramid (database subset statistics)

sleepless sleeplessregulus at hetnet.nl
Fri Sep 2 19:46:32 BST 2011

Thanks for the explanation. I am certainly going to experiment and quite 
surprised that code can be executed without compiling and linking.
Is it recommended to play with a copy of the db, or can it not be hurt 
in anyway?
Op 02-09-11 18:06, Johnny schreef:
> sleepless<sleeplessregulus at hetnet.nl>  writes:
>> As this is a user list, supposed to be photographers rather than programmers,
>> there might be some more guiding needed for us to be able to play with
>> it.
> You need to have Python 2 installed and the mentioned Python modules
> (sqlite, tkinter). I posted tentative instructions for Fedora, as this
> is the platform I use and am familiar with. If you have this
> installed, just :
> 1) download the script
> 2) make it executable (as superuser)
>     su
>     [type your su password]
>     chmod 755 ./ratingpyramid.py
>     exit
> 3) run the script from the command line
>     ./ratingpyramid.py /your/path/to/digikam_images.db
>     (Change the path to the full path to /your/ digikam db however!)
>> Or if it not is meant for us to play with you should maybe post it in the
>> devellopers list, although I would rather see the programmers work on the core
>> of digikam instead of implementing such fancy stuff.
> I guess it is individual whether it is "fancy stuff" or an efficient
> tool in your digital asset management
Of course, I was speaking for myself, and fancy stuff was in no way ment 
to be offencive.
> workflow, as introduced in the
> digikam handbook [1] which inspired the development. It is certainly a
> worthwhile read, whether you choose to follow it or not!
>> Op 01-09-11 22:28, Johnny schreef:
>>      Picking up an old thread as this was a good challenge while learning
>>      Python coding! The attached Python script creates a rating pyramid
>>      for the entire database. Currently, it creates two pyramids, one
>>      with /all/ ratings and one with only 1-5 ratings (to avoid a wide base
>>      that makes the top ridiculously small if one has many lowly rated
>>      images).
>>      Admittedly, this is not the greatest and most flexible thing, but a
>>      concept if someone is inclined to build on it further, in particular it
>>      would be great to run only for subalbums or other subsets of the DB.
>>      This was written using Python 2.7.1. To use, that needs be installed as
>>      well as the pyton modules sqlite and tkinter. The path to the digikam database
>>      must be supplied as a command line argument.
>>      ./ratingpyramid.py /your/path/to/digikam_images.db
>>      The necessary python modules can be installed by (on Fedora)
>>      : yum install python python-sqlite2
>>      Also, don't forget to make the script executable:
>>      : chmod 755 ratingpyramid.py
>>      Example view:
>>      Cheers!
> Footnotes:
> [1] http://docs.kde.org/development/en/extragear-graphics/digikam/dam.html

More information about the Digikam-users mailing list