+ + + + + + Archive Directory Listing + + + +

Archive Directory Listing

+
+

Loading archive contents...

+
+ + + `; + } + + function displayResults(rendus) { + const contentDiv = document.getElementById('content'); + + if (rendus.length === 0) { + contentDiv.innerHTML = ` +
+

No rendu directories found in the archive folder.

+

Looking for directories matching pattern: rendu_x.y.z (where x, y, z are numbers)

+
+ `; + return; + } + + // Sort by version (semantic versioning) + rendus.sort((a, b) => { + const versionA = a.version.split('.').map(num => parseInt(num, 10)); + const versionB = b.version.split('.').map(num => parseInt(num, 10)); + + for (let i = 0; i < 3; i++) { + if (versionA[i] !== versionB[i]) { + return versionB[i] - versionA[i]; // Descending order (newest first) + } + } + return 0; + }); + + const listHTML = rendus.map(rendu => + `
  • Version ${rendu.version} (${rendu.name})
  • ` + ).join(''); + + contentDiv.innerHTML = ` +

    Found ${rendus.length} archive version(s):

    + + `; + } + + function displayError(message) { + const contentDiv = document.getElementById('content'); + contentDiv.innerHTML = ` +
    +

    Error

    +

    ${message}

    +

    Make sure the 'archive' directory exists and contains subdirectories named 'rendu_x.y.z'.

    +
    + `; + } + + // Initialize the directory listing when the page loads + document.addEventListener('DOMContentLoaded', function() { + // Small delay to ensure the page is fully rendered + setTimeout(listArchiveDirectories, 100); + }); + + + UpdatedFiles: [user_edited false, file /home/mattia/index.html]