#!/usr/bin/env python3 # SPDX-License-Identifier: LGPL-2.1-or-later from argparse import ArgumentParser import glob import json import os import re import subprocess import sys import requests BASE_URL = "https://www.freedesktop.org/software/systemd/man/" JQUERY_URL = "https://code.jquery.com/jquery-3.7.1.min.js" SCRIPT_TAG = '' NAV_JS = """ $(document).ready(function() { $.getJSON("../index.json", function(data) { data.sort().reverse(); var [filename, dirname] = window.location.pathname.split("/").reverse(); var items = []; $.each( data, function(_, version) { if (version == dirname) { items.push( ""); } else if (dirname == "latest" && version == data[0]) { items.push( ""); } else { items.push( ""); } }); $("span:first").html($( "