SHARE
TWEET

Untitled

a guest Mar 4th, 2020 3 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/perl
  2. my $n = 0;
  3. my @files = ();
  4. my $cmdTemplate = "convert -size 300x300 canvas:white -font helvetica -pointsize 210 -gravity north -draw \"text -30,10 'SYM'\" -pointsize 100 -gravity east -draw \"text 0,0 'MOD'\" -pointsize 100 -gravity south -draw \"text 0,0 'DIV'\" NUM.jpg";
  5. for my $c (split //, "#_23456789abcdefghijklmnopqrstuvwxyz") {
  6.   my $sym = $c;
  7.   my $mod = $n % 6;
  8.   my $div = int($n/6);
  9.   my $cmd = $cmdTemplate;
  10.   $cmd =~ s/SYM/$sym/;
  11.   $cmd =~ s/MOD/$mod/;
  12.   $cmd =~ s/DIV/$div/;
  13.   $cmd =~ s/NUM/$n/;
  14.   system($cmd);
  15.   push @files, "${n}.jpg";
  16.   $n++;
  17. }
  18. system("rm -f all.jpg");
  19. my $fileArgs = join(' ', @files);
  20. system("montage ${fileArgs} -geometry +6+6 all.jpg");
  21. system("rm ${fileArgs}");
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top