-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathdata2index.pl
114 lines (102 loc) · 2.66 KB
/
data2index.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
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#!/usr/bin/perl
use warnings;
use strict;
my $num_domain = `wc -l $ARGV[0]`;
$num_domain=~s/(\d+).*$/$1/;
#print $num_domain;
print '
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name=""viewport" content="width=device-width, initial-scale=1.0">
<title>Scihub_ck</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css">
<link rel="stylesheet" href="./static/css/me.css">
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?b15fff3776096b270e74c962c98c5dc2";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<body>
<nav class="ui inverted attached segment m-padded-tb-mini">
<div class="ui container">
<div class="ui inverted secondary stackable menu">
<h2 class="ui teal header item">Scihub_ck</h2>
</div>
</div>
</nav>
<br>
<br>
<div class="m-container m-padded-tb-big">
<div class="ui container">
<div class="ui stackable grid">
<div class="fifteen wide column">
<iframe src="https://ghbtns.com/github-btn.html?user=Wadauk&repo=scihub_ck&type=star&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe><p>Tips: .ooo/.nu/.mu/.is/.cool/.shop/.fun are blocked. The unofficial domain sci-hub.gugeeseo.com is opened but does not work well. Recommend: .tw and .se.</p>
<div class="ui top attached segment">
<div class="ui middle aligned two column grid">
<div class="column">
<h3 class="ui teal header">Working Domains</h3>
</div>
<div class="right aligned column">
<h2 class="ui orange header m-inline-block m-text-thin"> ';
print $num_domain;
print ' </h2>
</div>
</div>
</div>
<div class="ui attached segment">
';
my $domain;
my $total_time;
open DATA, "<$ARGV[0]";
#open INDEX, ">$ARGV[1]";
while ( <DATA> ) {
chomp;
( $domain, $total_time ) = /^(.*?)\t(.*)$/;
# print $domain, $total_time;
print '<div class="ui padded vertical segment m-padded-tb-big">
<div class="ui mobile grid">
<div class="eleven wide column">
<h3 class="ui header">';
print $domain;
print '</h3>
<a href="http://sci-hub.';
print $domain;
print '" target="_blank">
<p class="m-text">sci-hub.';
print $domain;
print '</p>
</a>
</div>
<div class="five wide column">
<p class="m-text">';
print $total_time;
print ' s</p>
</div>
</div>
</div>';
}
#close INDEX;
close DATA;
print '</div>
</div>
</div>
</div>
</div>
<br>
<br>
<footer class="ui inverted vertical segment m-padded-tb-massive">
<div class="ui center aligned container">
<p class="m-text-thin m-text-spaced m-opacity-tiny">';
print `date`;
print '<br>Copyright c 2017 - 2018 Scihub_ck Designed by Wadauk</p>
</div>
</footer>
</body>
</html>';