Created
July 15, 2014 06:17
-
-
Save xaiki/d3a5aaf972732cec829c to your computer and use it in GitHub Desktop.
archie imdb id
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! perl -w | |
use strict; | |
my ($login, $password); | |
open (my $FH, 'gpg -q --use-agent --no-tty -d ~/.authinfo.gpg |'); | |
while (<$FH>) { | |
m/machine\s+archive.org/ or next; | |
m/login\s+(\S+)/ and do { $login = $1;}; | |
m/password\s+(\S+)/ and do { $password = $1;}; | |
} | |
die "couldn't find archive.org credencials in ~/.authinfo.gpg" unless ($login and $password); | |
my $identifier = 'markofzorro-1920'; | |
my $target = 'metadata'; | |
my $patch = '{"add":"/imdb_id", "value":"tt0011439"}'; | |
print `curl --data-urlencode -target=$target --data-urlencode -patch="$patch" --data-urlencode access=$login --data-urlencode secret=$password http://archive.org/metadata/$identifier`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment