DokuWiki

It's better when it's simple

User Tools

Site Tools


tips:mailconfig

This is an old revision of the document!


Erste Versuch mit der dokuwiki-Syntax

#!/usr/bin/perl
use Getopt::Std;
use Term::ReadKey;
use Net::Twitter;
getopt('upt',\%opts);
#$usage= <<USAGE;
#commandline twitter 0.1b - www.j-zero.de
#Usage: twitter_cmd -u username [-t tweet] [-p password]
#USAGE
sub gp{
    print "password: ";
    ReadMode 2;
    chomp($l = ReadLine(0)); 
    ReadMode 0;
    print "\n";
    return $l;
}
if(!$opts{u}){print $usage;exit 1;}
    else{$u=$opts{u};}
 
if(!$opts{t}){print "tweet: ";chomp($t=<STDIN>);}
    else{$t=$opts{t};}
 
if(!$opts{p}){$p=&gp;}
    else{$p=$opts{p};}
$s=Net::Twitter->new({username=>"$u",password=>"$p" });
$s->update({status=>"$t"});
exit 0;
tips/mailconfig.1282169975.txt.gz · Last modified: 2010-08-19 00:19 by 93.205.254.96

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki