-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
256 lines (223 loc) · 8.72 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Classifiers List</title>
<style>
/* Farbpalette */
:root {
--primary-color: #042326;
--secondary-color: #0A3A40;
--text-color: #1D7373;
--background-color: #042326;;
--tertiary-color: #107361;
--border-color: #ddd;
}
/* allgemeine Einstellungen */
body {
font-family: Arial, sans-serif;
background-color: var(--background-color);
text-align: center;
margin: 0;
padding: 0;
}
h2 {
color: var(--text-color);
margin: auto;
font-size: 35px;
}
p {
color: var(--tertiary-color);
font-family: Arial, sans-serif;
font-size: 20px;
}
/* Layout */
.container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
}
.button-row {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
grid-gap: 10px;
justify-items: center;
align-items: center;
margin-bottom: 10px;
}
.button {
display: flex;
justify-content: center;
align-items: center;
padding: 10px;
border: none;
border-radius: 1px;
font-size: 20px;
cursor: pointer;
background-color: var(--primary-color);
color: var(--text-color);
width: fit-content;
min-width: 150px;
}
.selected-item {
margin-bottom: 5px;
}
#selected-items {
display: flex;
flex-wrap: wrap;
justify-content: center;
list-style: none;
padding: 0;
margin: 0;
color: var(--tertiary-color);
}
.selected-item {
width: 100%;
}
.remove-button {
margin-left: 5px;
font-size: 20px;
color: var(--text-color);
background-color: transparent;
border: none;
cursor: pointer;
}
#button-container {
display: flex;
flex-direction: column;
align-items: center;
}
.remove-button:hover {
color: var(--secondary-color);
}
#output-field {
width: 80%;
height: 100px;
margin-top: 10px;
padding: 5px;
font-size: 16px;
border: 1px solid #432121;
color: var(--text-color);
border-radius: 5px;
}
#output-button,
#copy-button {
margin-top: 10px;
padding: 5px 10px;
font-size: 25px;
background-color: var(--primary-color);
color: var(--text-color);
border: none;
border-radius: 5px;
cursor: pointer;
}
#output-button:hover,
#copy-button:hover {
background-color: var(--secondary-color);
}
/* Button-Größenanpassung */
@media (min-width: 768px) {
.button-row {
max-width: 800px;
}
.button {
width: 100%;
max-width: 100%;
}
}
/* Button-Hover-Effekte */
.button:hover {
background-color: var(--secondary-color);
}
.button:active {
transform: translateY(1px);
}
</style>
<script>
window.onload = function() {
// Lade den Inhalt der Textdatei in eine Variable
fetch('classifiers-list.txt')
.then(response => response.text())
.then(data => {
// Teile den Inhalt der Textdatei in einzelne Elemente auf
let elements = data.trim().split('\n');
// Füge jedes Element als anklickbare Schaltfläche zur Seite hinzu
let buttonContainer = document.getElementById('button-container');
let counter = 0;
elements.forEach(element => {
let button = document.createElement('button');
button.className = 'button';
button.innerText = element;
button.onclick = function() {
// Füge das ausgewählte Element zu der Liste hinzu
let listItem = document.createElement('li');
listItem.className = 'selected-item';
listItem.innerHTML = `
<span>${element}</span>
<button class="remove-button">Remove</button>
`;
listItem.querySelector('.remove-button').onclick = function() {
// Entferne das ausgewählte Element aus der Liste
listItem.remove();
};
document.getElementById('selected-items').appendChild(listItem);
};
buttonContainer.appendChild(button);
counter++;
});
});
// Füge die Funktionalität zur Ausgabe- und Kopierschaltfläche hinzu
document.getElementById('output-button').onclick = function() {
// Konvertiere die Liste der ausgewählten Elemente in einen formatierten String
let selectedItems = Array.from(document.getElementById('selected-items').children)
.map(item => "'" + item.querySelector('span').innerText.trim() + "',")
.join('\n');
// Zeige den formatierten String im Ausgabefeld an
document.getElementById('output-field').value = selectedItems;
};
document.getElementById('copy-button').onclick = function() {
// Kopiere den Inhalt des Ausgabefelds in die Zwischenablage
document.getElementById('output-field').select();
document.execCommand('copy');
};
};
</script>
</head>
<body>
<a href="https://github.com/NapoII/pypi-Classifiers/"><img src="https://img.shields.io/website?down_color=red&down_message=offline&label=pypi-Classifiers&up_color=greenb&up_message=Online&url=https%3A%2F%2Fnapoii.github.io%2Fpypi-Classifiers%2F" alt="website"></a>
<a href="https://github.com/NapoII/pypi-Classifiers/blob/main/LICENSE"><img src="https://img.shields.io/github/license/NapoII/pypi-Classifiers" alt="github/license"></a>
<a href="https://img.shields.io/github/issues-raw/NapoII/pypi-Classifiers"><img src="https://img.shields.io/github/issues/NapoII/pypi-Classifiers?style=plastic" alt="github/issues_open"></a>
<a href="https://github.com/NapoII/pypi-Classifiers/stargazers"><img src="https://img.shields.io/github/stars/NapoII/pypi-Classifiers?style=social" alt="github/stars"></a>
<a href="https://discord.gg/knTKtKVfnr"><img src="https://img.shields.io/discord/190307701169979393" alt="discord"></a>
<a href="https://www.buymeacoffee.com/Napo_II"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=☕&slug=Napo_II&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=ffffff" width="180" height="28" /></a>
<hr>
<h2>pypi-Classifiers</h2>
<ol>
<p>Select all the classifiers you want from the list.</p>
<p>Review and make any necessary changes to the selected classifiers at the bottom of the webpage.</p>
<p>Generate the output by clicking on the "Output Selected Items" button.</p>
<p>Finally, add the output to your Python project by clicking on the "Copy" button to copy it to your clipboard.</p>
</ol>
<hr>
<div id="button-container"></div>
<hr>
<h2>Selected Items</h2>
<ul id="selected-items"></ul>
<hr>
<h2>Output</h2>
<textarea id="output-field"></textarea>
<br>
<button id="output-button">Output Selected Items</button>
<button id="copy-button">Copy to Clipboard</button>
<hr>
<p style="font-size: small; color: #2a2e31;">create by <a href="https://github.com/NapoII">Napo_II</a></p>
<a href="https://github.com/NapoII/pypi-Classifiers/"><img src="https://img.shields.io/website?down_color=red&down_message=offline&label=pypi-Classifiers&up_color=greenb&up_message=Online&url=https%3A%2F%2Fnapoii.github.io%2Fpypi-Classifiers%2F" alt="website"></a>
<a href="https://github.com/NapoII/pypi-Classifiers/blob/main/LICENSE"><img src="https://img.shields.io/github/license/NapoII/pypi-Classifiers" alt="github/license"></a>
<a href="https://img.shields.io/github/issues-raw/NapoII/pypi-Classifiers"><img src="https://img.shields.io/github/issues/NapoII/pypi-Classifiers?style=plastic" alt="github/issues_open"></a>
<a href="https://github.com/NapoII/pypi-Classifiers/stargazers"><img src="https://img.shields.io/github/stars/NapoII/pypi-Classifiers?style=social" alt="github/stars"></a>
<a href="https://discord.gg/knTKtKVfnr"><img src="https://img.shields.io/discord/190307701169979393" alt="discord"></a>
<a href="https://www.buymeacoffee.com/Napo_II"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=☕&slug=Napo_II&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=ffffff" width="180" height="28" /></a>
</body>
</html>