switched to ImageRole image loading and added perl script to generate images

master
Charles L 2014-12-26 12:48:33 -05:00
parent 17fc4ce621
commit 1a9e8d9f4f
3 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,3 @@
generate.pm generates the images used by the GuitarChords goodie.
Run `make` to run the perl script and create the .pngs and `make clean` to delete them (if necessary).

View File

@ -0,0 +1,9 @@
use GD::Tab::Guitar;
use IO::File;
my $gtr = GD::Tab::Guitar->new;
for my $chord (@{$gtr->all_chords}) {
my $filename = $chord;
my $file = IO::File->new("$filename.png", 'w');
$file->print($gtr->chord($chord)->png);
}

View File

@ -0,0 +1,7 @@
all:
@perl generate.pm
@echo done generating
clean:
@rm *.png
@echo done cleaning