Reddit

A script to submit articles to reddit. Takes you to the reddit submit screen with the url of the page you are on set.

The script

Put this in reddit.pl. Needs URI::Escape

cpan -i URI::Escape
#!/usr/bin/perl                                                                                                                                                                         
 
use strict;
use warnings;
 
use URI::Escape;
 
my $url = $ARGV[5];
$url = uri_escape($url);
$url = "http://www.reddit.com/submit?url=$url";
my $socket = $ARGV[3];
my $sh;
open $sh, '>', $socket or die "Could not open '$socket': $!\n";
print $sh "uri $url\n";
close $sh;

Bindings

I use:

bind    vr        = spawn $XDG_DATA_HOME/uzbl/scripts/reddit.pl
 
reddit.txt · Last modified: 2009/09/14 14:19 by zombyuf
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki