|
il y a 2 ans | |
---|---|---|
pycha | il y a 2 ans | |
scaicha_cache | il y a 2 ans | |
.gitignore | il y a 2 ans | |
COPYING.txt | il y a 2 ans | |
README | il y a 2 ans | |
README.md | il y a 2 ans | |
X7r3M1s7a_overall_pie.png | il y a 2 ans | |
cgi.html | il y a 2 ans | |
changelog.txt | il y a 2 ans | |
eniac111_overall_pie.png | il y a 2 ans | |
fileLock.py | il y a 2 ans | |
find_smiliar_tags.py | il y a 2 ans | |
main.py | il y a 2 ans | |
scaicha.py | il y a 2 ans | |
settings.py | il y a 2 ans | |
tag_substitutions.txt | il y a 2 ans | |
usage.txt | il y a 2 ans |
scaicha is a python script for pie chart generation. It generates a music tag chart based on the top artists of an arbitrary last.fm user.
The data is gathered with the help of the last.fm API and charts are drawn using the python module pycha.
get the latest version from github and extract it
apt-get install python python-cairo graphicsmagick graphicsmagick-imagemagick-compat
notes:
note: for the following examples to work you need to open cmd.exe and switch to the directory of the extracted scaicha archive.
just execute the main.py with your python installation and supply at least the -u option including your username.
example: generate a pie chart using the default options:
$ python main.py -u username
python.exe main.py -u username
there are several options to configure the behaviour of scaicha:
-u <arg>, --user <arg> last.fm user name (required)
-p <arg>, --period <arg> period of top artists (3, 6, 12; default: overall)
-i <arg>, --ignores <arg> comma separated list of tags to ignore, e.g. "hip hop,rap"
-j <arg>, --join <arg> combines a list of tag groups. groups are separated by commas, tags by colon
-m <arg>, --minTagPerc <arg> minimum tag percentage (default: 1.0), less occuring tags will be merged into "other tags"
-c <arg>, --colorScheme <arg> color scheme to use (rainbow (default) or gradient)
-b <arg>, --baseColor <arg> base color to use (hex string or a HTML 4.0 color name)
-l <arg>, --lighten <arg> lighten base color by given factor (between 0.0 and 1.0)
-r <arg>, --resize <arg> resize image
-s , --score enable score drawing
-d , --dump enable dumping tags to file
-t, , --tagSubstitution disable substitution of misspelled tags
-h , --help print this help and exit
some examples:
use only the top artists from the past three months:
$ python main.py -u KarlKartoffel -p 3
define some tags to ignore:
$ python main.py -u WilliamKidd -i "hip hop,french"
combine some tags, here: combine 'classic rock' and 'hard rock' into 'rock':
$ python main.py -u CaptainFarell -j "rock:classic rock:hard rock"
combine even more tags (note the usage of ':' and ','):
$ python main.py -u CaptainFarell -j "rock:classic rock:hard rock,metal:heavy metal:power metal"
you can even create new tags or rename existing ones if you like:
$ python main.py -u CaptainFarell -j "good stuff:rock:metal,bad stuff:hiphop:rap,worst crap ever:indie"
draw a color gradient instead of the default rainbow colors:
$ python main.py -u Pferdinand -c gradient
use another base color:
$ python main.py -u AverageJoe -b "#7d00ff"
$ python main.py -u JohnSmith -b maroon
lighten base color slightly:
$ python main.py -u AaronAronsen -l 0.3
note: all parameters can be combined
scaicha.py
, main.py
and settings.py
in your CGI directoryCGI
to True
in settings.py
cgi.html
document in the webserver's html directory and adapt the location of main.py
in the formcgi.html
in your browsernote: the CGI mode lacks proper testing, use at your own risk