Compare commits
3 Commits
efc3fdae0f
...
5af0a016d1
Author | SHA1 | Date |
---|---|---|
|
5af0a016d1 | |
|
e80915a408 | |
|
40bd98b06b |
|
@ -0,0 +1,33 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>JsonGen</title>
|
||||||
|
<link rel="stylesheet" href="/admin/dani/linkgen/style.css">
|
||||||
|
<script src="script.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>JsonGen</h1>
|
||||||
|
<div>
|
||||||
|
<p>Inserisci matricola a partire da:</p>
|
||||||
|
<input type="number" id="matrda">
|
||||||
|
<p>Matricola a:</p>
|
||||||
|
<input type="number" id="matra">
|
||||||
|
</div>
|
||||||
|
<p>Seleziona settore:</p>
|
||||||
|
<select id="selezione">
|
||||||
|
<option value="urbano">Urbano</option>
|
||||||
|
<option value="suburbano">Suburbano</option>
|
||||||
|
<option value="extraurbano">Extraurbano</option>
|
||||||
|
</select>
|
||||||
|
<p>Inserisci modello mezzo:</p>
|
||||||
|
<input type="text" id="modello">
|
||||||
|
<p>Inserisci link HTML:</p>
|
||||||
|
<input type="text" id="link">
|
||||||
|
<button onclick="genera()">Conferma</button>
|
||||||
|
<button onclick="copiaOutput()">Copia negli appunti</button>
|
||||||
|
<button onclick="pulisci()">Pulisci</button>
|
||||||
|
<pre><code id="output"></code></pre>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,38 @@
|
||||||
|
function genera() {
|
||||||
|
const matrda = document.getElementById("matrda").value.trim();
|
||||||
|
const matra = document.getElementById("matra").value.trim();
|
||||||
|
const selezione = document.getElementById("selezione").value.trim();
|
||||||
|
const modello = document.getElementById("modello").value.trim();
|
||||||
|
const link = document.getElementById("link").value.trim();
|
||||||
|
const startMatricola = parseInt(matrda);
|
||||||
|
const endMatricola = parseInt(matra);
|
||||||
|
let jsonArray = [];
|
||||||
|
for (let i = startMatricola; i <= endMatricola; i++) {
|
||||||
|
let baseJson = {
|
||||||
|
"matricola": i.toString(),
|
||||||
|
"settore": selezione,
|
||||||
|
"modello": modello,
|
||||||
|
"link": link
|
||||||
|
};
|
||||||
|
|
||||||
|
jsonArray.push(baseJson);
|
||||||
|
}
|
||||||
|
document.getElementById("output").textContent =
|
||||||
|
jsonArray.map((item, index) => {
|
||||||
|
const jsonStr = JSON.stringify(item, null, 2);
|
||||||
|
return (index < jsonArray.length - 1) ? jsonStr + "," : jsonStr;
|
||||||
|
}).join("\n");
|
||||||
|
}
|
||||||
|
function copiaOutput() {
|
||||||
|
const code = document.getElementById("output").innerText;
|
||||||
|
navigator.clipboard.writeText(code).then(() => {
|
||||||
|
}).catch(() => {
|
||||||
|
alert("Errore durante la copia.");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function pulisci() {
|
||||||
|
document.getElementById("matrda").value = "";
|
||||||
|
document.getElementById("matra").value = "";
|
||||||
|
document.getElementById("link").value = "";
|
||||||
|
document.getElementById("output").innerHTML = "";
|
||||||
|
}
|
|
@ -2,3 +2,6 @@ body{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-family: Consolas;
|
font-family: Consolas;
|
||||||
}
|
}
|
||||||
|
pre{
|
||||||
|
text-align: left;
|
||||||
|
}
|
|
@ -13,5 +13,6 @@
|
||||||
<h1>Pagina dei servizi del Dani</h1>
|
<h1>Pagina dei servizi del Dani</h1>
|
||||||
<p>Complimenti! Se hai trovato questa pagina sei davvero un grande smanettone.<br> Tranquillo, qui non troverai segreti statali e mai ci saranno.</p>
|
<p>Complimenti! Se hai trovato questa pagina sei davvero un grande smanettone.<br> Tranquillo, qui non troverai segreti statali e mai ci saranno.</p>
|
||||||
<a href="/admin/dani/linkgen/linkgen.html">Generatore <td> e <img></a>
|
<a href="/admin/dani/linkgen/linkgen.html">Generatore <td> e <img></a>
|
||||||
|
<a href="/admin/dani/jsongen/index.html">Generatore Json ricerche</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
[
|
||||||
|
{
|
||||||
"matricola": "placeholderMatricola",
|
"matricola": "placeholderMatricola",
|
||||||
"settore": "placeholderSettore",
|
"settore": "placeholderSettore",
|
||||||
"modello": "placeholderModello",
|
"modello": "placeholderModello",
|
||||||
"link": "placeholderLink"
|
"link": "placeholderLink"
|
||||||
}
|
}
|
||||||
|
]
|
|
@ -106,7 +106,7 @@
|
||||||
<td>
|
<td>
|
||||||
<a href="/setamodena_bus/suburbano/setra3p.html">
|
<a href="/setamodena_bus/suburbano/setra3p.html">
|
||||||
<p>4508-4513<br>Setra S415 LF 3p ex Bolzano</p>
|
<p>4508-4513<br>Setra S415 LF 3p ex Bolzano</p>
|
||||||
<img class="bus" src="https://drive.serverissimo.freeddns.org/apps/files_sharing/publicpreview/ffdqobqRg2ezKXt?file=/Leo/SETA/Setra%20ex%20Bolzano/4510%2Btag.jpg&fileId=269465&x=1920&y=1080&a=true&etag=889dccb3249888ad38179d2ba732209b" alt="Server foto non raggiungibile.">
|
<img class="bus" src="https://drive.serverissimo.freeddns.org/apps/files_sharing/publicpreview/ffdqobqRg2ezKXt?file=/Leo/SETA/Setra%20ex%20Bolzano/4508.jpg&fileId=22371&x=1920&y=1080" alt="Server foto non raggiungibile.">
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -132,7 +132,7 @@
|
||||||
<td>
|
<td>
|
||||||
<a href="/setamodena_bus/suburbano/citarogtper.html">
|
<a href="/setamodena_bus/suburbano/citarogtper.html">
|
||||||
<p>4853-4854<br>Mercedes Citaro O530GU ex Tper</p>
|
<p>4853-4854<br>Mercedes Citaro O530GU ex Tper</p>
|
||||||
<img class="bus" src="https://drive.serverissimo.freeddns.org/apps/files_sharing/publicpreview/ffdqobqRg2ezKXt?file=/Leo/SETA/Citaro%20G%20ex%20TPER/4853-2%2Btag.jpg&fileId=269642&x=1920&y=1080&a=true&etag=e007803e6e3f0a82e1c4c460e62c7468" alt="Server foto non raggiungibile.">
|
<img class="bus" src="https://drive.serverissimo.freeddns.org/apps/files_sharing/publicpreview/ffdqobqRg2ezKXt?file=/Leo/SETA/Citaro%20G%20ex%20TPER/4853-2%2Btag.jpg&fileId=269642&x=1920&y=1080" alt="Server foto non raggiungibile.">
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -98,7 +98,7 @@
|
||||||
<url>
|
<url>
|
||||||
<loc>https://www.ertpl.pages.dev/seta_menu/setasub.html</loc>
|
<loc>https://www.ertpl.pages.dev/seta_menu/setasub.html</loc>
|
||||||
<priority>0.50</priority>
|
<priority>0.50</priority>
|
||||||
<lastmod>2025-06-06</lastmod>
|
<lastmod>2025-06-11</lastmod>
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>https://www.ertpl.pages.dev/seta_menu/setaurbano.html</loc>
|
<loc>https://www.ertpl.pages.dev/seta_menu/setaurbano.html</loc>
|
||||||
|
|
Loading…
Reference in New Issue