ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/selection-pastebin
(Generate patch)

Comparing rxvt-unicode/src/perl/selection-pastebin (file contents):
Revision 1.17 by sf-exg, Sat Nov 19 17:40:48 2011 UTC vs.
Revision 1.19 by root, Sun Jun 10 13:58:06 2012 UTC

1#! perl 1#! perl
2
3#:META:X_RESOURCE:%.cmd:string:the command to run create a new pastebin
4#:META:X_RESOURCE:%.url:string:the url template for new pastebins
2 5
3sub upload_paste { 6sub upload_paste {
4 my ($self) = @_; 7 my ($self) = @_;
5 8
6 require Digest::MD5; 9 require Digest::MD5;
57} 60}
58 61
59sub on_start { 62sub on_start {
60 my ($self) = @_; 63 my ($self) = @_;
61 64
62 $self->{pastebin_cmd} = $self->x_resource ("selection-pastebin.cmd") 65 $self->{pastebin_cmd} = $self->x_resource ("%.cmd")
63 || "rcp -p % ruth:/var/www/www.ta-sa.org/files/txt/"; 66 || "rcp -p % ruth:/var/www/www.ta-sa.org/files/txt/";
64 67
65 $self->{pastebin_url} = $self->x_resource ("selection-pastebin.url") 68 $self->{pastebin_url} = $self->x_resource ("%.url")
66 || "http://www.ta-sa.org/files/txt/%"; 69 || "http://www.ta-sa.org/files/txt/%";
67 70
68 push @{ $self->{term}{selection_popup_hook} }, sub { 71 push @{ $self->{term}{selection_popup_hook} }, sub {
69 ("pastebin upload" => sub { $self->upload_paste }) 72 ("pastebin upload" => sub { $self->upload_paste })
70 }; 73 };

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines