GitBucket
4.21.2
Toggle navigation
Snippets
Sign in
Files
Branches
1
Releases
Issues
Pull requests
Labels
Priorities
Milestones
Wiki
Forks
nigel.stanger
/
Digital_Repository
Browse code
- Added Twitter configuration.
master
1 parent
8adba8d
commit
311d9dd31599752eec894f76bffeafb3927fd002
nstanger
authored
on 3 Apr 2009
Patch
Showing
1 changed file
Repositories/otago_eprints3/otago_eprints/cfg/cfg.d/twitter.pl
Ignore Space
Show notes
View
Repositories/otago_eprints3/otago_eprints/cfg/cfg.d/twitter.pl
0 → 100755
$c->{eprint_status_change} = sub { my( $eprint, $old_status, $new_status ) = @_; if( $new_status eq "archive" ) { my $twitter_username="OtagoSoBEprints"; my $twitter_password="mmpcfjXIm1jY0cU"; my $cmd1 = "curl -s 'http://is.gd/api.php?longurl=".$eprint->get_url."'"; my $shorturl = `$cmd1`; my $title = $eprint->get_value( "title" ); $title =~ s/'/\\'/g; my $cmd2 = "curl --basic -s --user $twitter_username:$twitter_password --data status='$title - $shorturl' http://twitter.com/statuses/update.xml"; `$cmd2 &`; } };
Show line notes below