switched to ImageRole image loading and added perl script to generate images
parent
17fc4ce621
commit
1a9e8d9f4f
|
@ -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).
|
|
@ -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);
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
all:
|
||||
@perl generate.pm
|
||||
@echo done generating
|
||||
|
||||
clean:
|
||||
@rm *.png
|
||||
@echo done cleaning
|
Loading…
Reference in New Issue