-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmenu.pl
executable file
·39 lines (32 loc) · 1.13 KB
/
menu.pl
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
#!/usr/bin/env perl
use strict;
use warnings;
my @CATEGORIES = qw/news shows history discography video photo/;
my %lines = (
"news" => "[[%s|nopadding;380px|page-5232654_32673002]]",
"shows" => "[[%s|nopadding;380px|page-5232654_32673056]]",
"history" => "[[%s|nopadding;380px|page-5232654_32673129]]",
"discography" => "[[%s|nopadding;380px|page-5232654_32673547]]",
"video" => "[[%s|nopadding;380px|page-5232654_32673174]]",
"photo" => "[[%s|nopadding;380px|http://vkontakte.ru/album-5232654_52045403]]",
);
my %links = (
"news" =>
"https://vk.com/photo-21874356_294364121",
"shows" =>
"https://vk.com/photo-21874356_294364120",
"history" =>
"https://vk.com/photo-21874356_294364119",
"discography" =>
"https://vk.com/photo-21874356_294364118",
"video" =>
"https://vk.com/photo-21874356_294364117",
"photo" =>
"https://vk.com/photo-21874356_294364123"
);
for my $category (@CATEGORIES) {
if ($links{$category} =~ /https:\/\/vk.com\/(photo-[\d_]+)/) {
$links{$category} = $1;
}
printf("$lines{$category}\n", $links{$category});
}