File: prowl-notification.pl

package info (click to toggle)
slic3r 1.3.0%2Bdfsg1-5.1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 8,552 kB
  • sloc: cpp: 63,126; perl: 21,512; ansic: 6,312; sh: 591; xml: 201; makefile: 37; python: 11
file content (21 lines) | stat: -rwxr-xr-x 616 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/perl
#
# Example post-processing script for sending a Prowl notification upon
# completion. See http://www.prowlapp.com/ for more info.

use strict;
use warnings;

use File::Basename qw(basename);
use WebService::Prowl;

# set your Prowl API key here
my $apikey = '';

my $file = basename $ARGV[0];
my $prowl = WebService::Prowl->new(apikey => $apikey);
my %options = (application => 'Slic3r',
               event =>'Slicing Done!',
               description => "$file was successfully generated");
printf STDERR "Error sending Prowl notification: %s\n", $prowl->error
    unless $prowl->add(%options);