scripts/pscrot.rc

34 lines
1.8 KiB
Perl

# vim: set syntax=perl:
#By default, $HOME is set to the home directory indicated in your environment variables.
#If this doesn't exist or you wish to override it, set it below.
my $HOME = $ENV{"HOME"};
my %server = (
host => "", # ssh hostname for destination server
port => 22, # ssh port
user => scalar getpwuid($<), # username. by default, pscrot will use your local username
key => "$HOME/.ssh/id_rsa", # ssh key used for authentication. must not be password-protected
path => "/usr/local/www/uploads/", # remote destination
domain => "", # public domain where the uploaded file can be accessed
);
my %match = (
screenshot => qr/(?:^|\/)Screen Shot ([0-9\-]+) at ([0-9\.]+)\.png$/, # regular expression matching OSX's screenshot format
screencast => qr/wowsoscreencastmanygayplaceholders/, # regular expression matching recorded screencasts
);
my %features = (
hotdir => 1, # enable monitoring the "hot" directory
del => 1, # delete files from the hot directory after upload
notify => 1, # notify of upload status via the OSX notification centre
speak => 0, # off by default due to limited utility. speak upload status aloud using OSX MacInTalk
);
%Conf = (
home => $HOME,
tmp => "$HOME/.tmp/", # tmp is used to temporarily store files during upload
maindir => "$HOME/Desktop/", # directory to monitor for screenshots. defaults to /Desktop for OSX users' convenience
hotdir => "$HOME/outbox/", # this is a "hot" directory, any files inside will be automatically uploaded
storedir => "$HOME/Dropbox/Camera Uploads/", # where files will be moved after upload. note that files uploaded from the hotdir will not be moved here.
filenametpl => "%Y-%m-%d %H.%M.%S", # format for uploaded files, uses strftime(3) formatting.
server => \%server,
match => \%match,
features => \%features,
);