prowl-notification.pl 616 B

123456789101112131415161718192021
  1. #!/usr/bin/perl
  2. #
  3. # Example post-processing script for sending a Prowl notification upon
  4. # completion. See http://www.prowlapp.com/ for more info.
  5. use strict;
  6. use warnings;
  7. use File::Basename qw(basename);
  8. use WebService::Prowl;
  9. # set your Prowl API key here
  10. my $apikey = '';
  11. my $file = basename $ARGV[0];
  12. my $prowl = WebService::Prowl->new(apikey => $apikey);
  13. my %options = (application => 'Slic3r',
  14. event =>'Slicing Done!',
  15. description => "$file was successfully generated");
  16. printf STDERR "Error sending Prowl notification: %s\n", $prowl->error
  17. unless $prowl->add(%options);