-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
aur3c
executable file
·84 lines (53 loc) · 1.29 KB
/
aur3c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/usr/bin/perl
use strict;
use vars qw($VERSION);
my $APP = 'aur3c';
$VERSION = '0.001';
use Data::Dumper;
{
package Data::Dumper;
no strict 'vars';
$Terse = $Indent = $Useqq = $Deparse = $Sortkeys = 1;
$Quotekeys = 0;
}
# http://aur.archlinux.org/rpc.php?type=info&arg=jshon
# http://aur3.org/rpc/$pkg
use LWP::Simple;
my $pkg = shift // 'pimpd2-git';
my $base = "http://aur3.org/rpc/$pkg";
my %pkg;
for(split(/\n/, get($base))) {
if($_ =~ m/"(.+)": (.+),/) {
my($t, $v) = ($1, $2);
$v =~ s/"//g;
$pkg{$t} = $v;
}
}
for(qw(name description votes pkgsite submitted lastupdate)) {
printf("%15s: %s\n", $_, $pkg{$_}) unless(!exists($pkg{$_}));
}
__END__
=pod
=head1 NAME
aur3c - aur3 client
=head1 USAGE
aur3c <pkg>
=head1 REPORTING BUGS
Report bugs and/or feature requests on rt.cpan.org, the repository issue tracker
or directly to L<[email protected]>
=head1 AUTHOR
Magnus Woldrich
CPAN ID: WOLDRICH
http://japh.se
=head1 CONTRIBUTORS
None required yet.
=head1 COPYRIGHT
Copyright 2011 B<THIS APPLICATION>s L</AUTHOR> and L</CONTRIBUTORS> as listed
above.
=head1 LICENSE
This program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=head1 SEE ALSO
=cut
# vim: set ts=2 et sw=2: