-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
140 lines (135 loc) · 7.92 KB
/
index.html
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<!DOCTYPE html>
<html>
<head>
<script src="assets/js/jquery-3.3.1.min.js"></script>
<script src="assets/js/jquery.terminal.js"></script>
<link rel="stylesheet" href="assets/css/terminal.css" />
<link rel="stylesheet" href="assets/css/jquery.terminal.css" />
<title>Arch Linux Repo</title>
</head>
<body>
<script>
if (screen.width <= 520) {
window.location = "repo";
}
var allRepos = [];
var counter = 0;
$.getJSON("https://archlinux.repo.063240.xyz/packages.json", function(data) {
$.each(data, function(key, val) {
allRepos.push(val);
counter = counter + 1;
});
$("body").terminal({
pacman: function(prem, keyword) {
if (prem == "-A") {
this.echo(allRepos);
} else if (prem == "-S") {
count = 0;
for (var key in allRepos) {
value = allRepos[key];
if (value.search(keyword) > -1) {
this.echo("[[b;#ff59f9;]linuxrepos]/" + value);
count++;
}
}
if (count <= 0) {
this.echo("[[b;#e5e9f0;]" + keyword + "] is not a valid package.");
}
return;
} else if (prem == "-Si") {
count = 0;
for (var key in allRepos) {
value = allRepos[key];
if (value.search(keyword) > -1) {
fetch("https://archlinux.repo.063240.xyz/json/" + value + ".json")
.then((response) => response.json())
.then((data) => {
// do something with your data
console.log(data);
this.echo("[[b;#ff59f9;]linuxrepos]/" + data["Name"]);
this.echo(" [[b;#e5e9f0;]Repository]: " + data["Repository"]);
this.echo(" [[b;#e5e9f0;]Version]: " + data["Version"]);
this.echo(" [[b;#e5e9f0;]Description]: " + data["Description"]);
this.echo(" [[b;#e5e9f0;]Architecture]: " + data["Architecture"]);
this.echo(" [[b;#e5e9f0;]URL]: " + data["URL"]);
this.echo(" [[b;#e5e9f0;]Licenses]: " + data["Licenses"]);
this.echo(" [[b;#e5e9f0;]Groups]: " + data["Groups"]);
this.echo(" [[b;#e5e9f0;]Provides]: " + data["Provides"]);
this.echo(" [[b;#e5e9f0;]Depends On]: " + data["Depends On"]);
if (typeof data["Optional Deps"] === "object" && data["Optional Deps"] !== null) {
this.echo(" [[b;#e5e9f0;]Optional Deps]:");
for (var key in data["Optional Deps"]) {
var value = data["Optional Deps"][key];
this.echo(" [[b;#e5e9f0;]" + key + "]: " + value);
}
} else {
this.echo(" [[b;#e5e9f0;]Optional Deps]: " + data["Optional Deps"]);
}
this.echo(" [[b;#e5e9f0;]Replaces]: " + data["Replaces"]);
this.echo(" [[b;#e5e9f0;]Download Size]: " + data["Download Size"]);
this.echo(" [[b;#e5e9f0;]Installed Size]: " + data["Installed Size"]);
this.echo(" [[b;#e5e9f0;]Packager]: " + data["Packager"]);
this.echo(" [[b;#e5e9f0;]Build Date]: " + data["Build Date"]);
this.echo(" [[b;#e5e9f0;]Validated By]: " + data["Validated By"]);
this.echo("");
});
count++;
}
}
if (count <= 0) {
this.echo("[[b;#e5e9f0;]" + keyword + "] is not a valid package.");
}
return;
} else {
this.echo("Pacman commands:");
this.echo(" [[b;#e5e9f0;]-A] display a list of all packages.");
this.echo(" [[b;#e5e9f0;]-S] search for a package.");
this.echo(" [[b;#e5e9f0;]-Si] search for a package's information.");
}
},
pacman_key: function(prem, keyword) {
this.echo("sudo pacman-key --keyserver hkp://pgp.net.nz --recv-key C66F51026A3940EA1BD2835C772B2F0F09B01DBE");
this.echo("sudo pacman-key --keyserver hkp://pgp.net.nz --lsign-key C66F51026A3940EA1BD2835C772B2F0F09B01DBE");
this.echo("");
this.echo("You may also want to run [[i;#81a1c1;]pacman -S linuxrepos-keyring linuxrepos-mirrorlist] to get the full list of updated.");
},
repo: function(prem, keyword) {
this.echo("[[b;;]Paste the text below into your /etc/pacman.conf file]");
this.echo("[linuxrepos]");
this.echo("SigLevel = Required DatabaseOptional");
this.echo("Server = https://archlinux.repo.063240.xyz/$arch/");
// this.echo('')
// this.echo('[linuxrepos-git]')
// this.echo('SigLevel = Optional TrustAll')
// this.echo('Server = https://github.com/HeCodes2Much/archlinux.repo.063240.xyz/releases/download/linuxrepos-git')
},
credits: function() {
this.echo("Credits:");
this.echo(" [[b;#e5e9f0;]Terminal Script] https://terminal.jcubic.pl/");
this.echo(" [[b;#e5e9f0;]Pacman Parser] matyklug (https://klugmathias.me/)");
},
help: function() {
this.echo("Command List:");
this.echo(" [[b;#e5e9f0;]clear] clear the console window.");
this.echo(" [[b;#e5e9f0;]credits] get a list of credits people.");
this.echo(" [[b;#e5e9f0;]help] get this helpful message.");
this.echo(" [[b;#e5e9f0;]pacman] search and get infomation about a package.");
this.echo(" [[b;#e5e9f0;]pacman_key] display commands for my pacman keyring.");
this.echo(" [[b;#e5e9f0;]repo] display the config for my /etc/pacman.conf.");
},
}, {
exit: false,
// detect iframe codepen preview
onInit: function() {
this.echo("Type [[b;#e5e9f0;]help] for the list of commands.");
},
checkArity: false,
completion: true,
greetings: "[[b;#ffff59;]Arch Linux Repo][[b;#59ff59;] " + counter + " Packages]\n",
prompt: "[[;#ff5959;]\[][[b;#ffff59;]arch][[;#59ff59;]@][[b;#9059ff;]linuxrepos.org] [[;#59fff9;]~][[;#ff5959;]\\]] ",
});
});
</script>
<noscript> You don't have javascript enabled. Good luck with that. view <a href="/repo">Repo</a>. </noscript>
</body>
</html>