5 my $mw = MediaWiki::API->new();
6 $mw->{config}->{api_url} = 'https://rtime.felk.cvut.cz/rpp/api.php';
11 do '.wiki.pl'; # Read login and password from another file (copy the
12 # above three lines there)
15 $mw->login( { lgname => $wikiLogin, lgpassword => $wikiPassword } )
16 || die $mw->{error}->{code} . ': ' . $mw->{error}->{details};
18 my $filename = $ARGV[0];
20 my $success = $mw->edit(
23 filename => $filename,
24 comment => "Uploaded by $0",
28 || die $mw->{error}->{code} . ': ' . $mw->{error}->{details};
31 # print Dumper($mw->{response}->{_content});