generated images, update scripts to not require external deps
3
dist.ini
|
@ -46,8 +46,6 @@ Email::Valid = 1.192
|
|||
Net::Domain::TLD = 1.70
|
||||
Convert::Pluggable = 0.026
|
||||
YAML = 0
|
||||
GD = 2.56
|
||||
Carp = 1.26
|
||||
Encode = 2.62
|
||||
; ParseCron
|
||||
Schedule::Cron::Events = 0
|
||||
|
@ -142,4 +140,3 @@ extra_dep = autodie
|
|||
after_install = duckpan DDG
|
||||
before_install = sudo apt-get update -qq
|
||||
before_install = sudo apt-get install -y libmpfr-dev
|
||||
before_install = sudo apt-get install -y libgd-dev
|
||||
|
|
|
@ -6,8 +6,9 @@ with 'DDG::GoodieRole::ImageLoader';
|
|||
|
||||
# guitar script is stored in share directory
|
||||
# including this way, because it limits duplicated code
|
||||
my $g = share("Guitar.pm");
|
||||
my $g = share("chords.pm");
|
||||
require "$g";
|
||||
our %chord_lists; #from chords.pm
|
||||
|
||||
zci answer_type => 'guitarchord';
|
||||
zci is_cached => 1;
|
||||
|
@ -37,8 +38,6 @@ handle remainder => sub
|
|||
return;
|
||||
};
|
||||
|
||||
my $gtr = Guitar->new;
|
||||
|
||||
sub check_chord
|
||||
{
|
||||
if ($_[0] =~ /(?<a>[a-gA-G])(?<b>#|b)?(?<c>dim|min|maj|add|aug|m|M)?(?<d>M|maj|m|min)?(?<e>[0-9])?\s*(?<f>(#|b)?[0-9]+)?/) {
|
||||
|
@ -63,7 +62,7 @@ sub check_chord
|
|||
$r .= $d if $d;
|
||||
$r .= $e if $e;
|
||||
$r .= $f if $f;
|
||||
if ($r ~~ @{$gtr->all_chords}) {
|
||||
if ($r ~~ @{[keys %chord_lists]}) {
|
||||
return $r;
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +71,7 @@ sub check_chord
|
|||
|
||||
sub get_chord_img
|
||||
{
|
||||
goodie_img_tag({filename=>$_[0].'.png'});
|
||||
goodie_img_tag({filename=>$_[0].'.png', width=>78});
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
After Width: | Height: | Size: 672 B |
After Width: | Height: | Size: 932 B |
After Width: | Height: | Size: 744 B |
After Width: | Height: | Size: 948 B |
After Width: | Height: | Size: 1016 B |
After Width: | Height: | Size: 948 B |
After Width: | Height: | Size: 916 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1009 B |
After Width: | Height: | Size: 941 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 933 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 869 B |
After Width: | Height: | Size: 931 B |
After Width: | Height: | Size: 895 B |
After Width: | Height: | Size: 983 B |
After Width: | Height: | Size: 766 B |
After Width: | Height: | Size: 760 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 868 B |
After Width: | Height: | Size: 979 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 828 B |
After Width: | Height: | Size: 923 B |
After Width: | Height: | Size: 918 B |
After Width: | Height: | Size: 541 B |
After Width: | Height: | Size: 841 B |
After Width: | Height: | Size: 641 B |
After Width: | Height: | Size: 916 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 840 B |
After Width: | Height: | Size: 874 B |
After Width: | Height: | Size: 1015 B |
After Width: | Height: | Size: 927 B |
After Width: | Height: | Size: 912 B |
After Width: | Height: | Size: 921 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 582 B |
After Width: | Height: | Size: 806 B |
After Width: | Height: | Size: 918 B |
After Width: | Height: | Size: 735 B |
After Width: | Height: | Size: 789 B |
After Width: | Height: | Size: 813 B |
After Width: | Height: | Size: 873 B |
After Width: | Height: | Size: 677 B |
After Width: | Height: | Size: 970 B |
After Width: | Height: | Size: 729 B |
After Width: | Height: | Size: 1013 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 957 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 944 B |
After Width: | Height: | Size: 817 B |
After Width: | Height: | Size: 1018 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 782 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 998 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 867 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 727 B |
After Width: | Height: | Size: 630 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 765 B |
After Width: | Height: | Size: 840 B |
After Width: | Height: | Size: 1014 B |
After Width: | Height: | Size: 992 B |
After Width: | Height: | Size: 692 B |
After Width: | Height: | Size: 795 B |
After Width: | Height: | Size: 788 B |
After Width: | Height: | Size: 572 B |
After Width: | Height: | Size: 871 B |
After Width: | Height: | Size: 647 B |
After Width: | Height: | Size: 920 B |
After Width: | Height: | Size: 947 B |
After Width: | Height: | Size: 857 B |
After Width: | Height: | Size: 840 B |
After Width: | Height: | Size: 977 B |
After Width: | Height: | Size: 938 B |
After Width: | Height: | Size: 936 B |
After Width: | Height: | Size: 921 B |