Added platform and runtime information to info plugin

This commit is contained in:
squidfunk 2022-12-18 17:49:56 +01:00
parent 78f3d151a2
commit 7b93fed496
5 changed files with 33 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -246,7 +246,7 @@
{% endfor %}
{% endblock %}
{% if page.meta and page.meta.ᴴₒᴴₒᴴₒ %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/extra.744965a2.min.css' | url }}">
<link rel="stylesheet" href="{{ 'assets/stylesheets/extra.d6bc9295.min.css' | url }}">
<script src="{{ 'assets/javascripts/extra/bundle.cfb3feee.min.js' | url }}" defer></script>
{% endif %}
</body>

View File

@ -130,12 +130,27 @@ class InfoPlugin(BasePlugin[InfoPluginConfig]):
# Add dependency tree as returned by pipdeptree
f.writestr(
os.path.join(archive_name, "dependencies.json"),
os.path.join(archive_name, ".dependencies.json"),
render_json_tree(PackageDAG.from_pkgs(
get_installed_distributions(local_only = True)
), 2)
)
# Add version information
mkdocs = get_distribution("mkdocs")
f.writestr(
os.path.join(archive_name, ".versions.log"),
"\n".join([
f"-----------------------------------",
f" Material for MkDocs: {version}",
f" MkDocs: {mkdocs.version}",
f"-----------------------------------",
f" Platform: {platform.system()}",
f" Python: {platform.python_version()}",
f"-----------------------------------"
])
)
# Retrieve list of processed files
for a in f.filelist:
files.append("".join([

View File

@ -130,12 +130,27 @@ class InfoPlugin(BasePlugin[InfoPluginConfig]):
# Add dependency tree as returned by pipdeptree
f.writestr(
os.path.join(archive_name, "dependencies.json"),
os.path.join(archive_name, ".dependencies.json"),
render_json_tree(PackageDAG.from_pkgs(
get_installed_distributions(local_only = True)
), 2)
)
# Add version information
mkdocs = get_distribution("mkdocs")
f.writestr(
os.path.join(archive_name, ".versions.log"),
"\n".join([
f"-----------------------------------",
f" Material for MkDocs: {version}",
f" MkDocs: {mkdocs.version}",
f"-----------------------------------",
f" Platform: {platform.system()}",
f" Python: {platform.python_version()}",
f"-----------------------------------"
])
)
# Retrieve list of processed files
for a in f.filelist:
files.append("".join([