Skip to main content

Dokuwiki-AutoDoc

PyPI - Version PyPI - Python Version

Automatically generate documentation of your experiments in DokuWiki! This way, you won't loose track or overview of your progress!

This package uses the DokuWiki python package to automatically access DokuWiki and write reports generated from Liquid templates. Plots generated from your measurements are uploaded as well.

This package is intended to be run in a Jupyter Lab environment and uses interactive prompts to authenticate against the wiki.

Usage

To establish a connection to your wiki, run

doc = AutoDocumentation("https://your.wiki/").with_templates()

This will prompt you for your username and password. The call to with_templates() is optional, but it loads the default template.

Next, to generate a report from a measurement in qkit, run the following directly after your measurement:

with QkitDocumentationBuilder(doc, 'sample:yoursample') as builder:
        builder.upload_images()
        builder.generate_report(QKIT_TEMPLATE)
        with builder.table_builder() as tb:
            tb.add_column("Type", lambda data: data.measurement['measurement_type'])
            tb.add_column("Comment", lambda _: "Look! A comment!")

This will

  • Upload the plots generated from your measurement by qkit
  • Build a report from a template
  • Insert a reference to this measurement into an overview table (UUID, Date) with additional columns as defined (Type, Comment).

For safety reasons, the table page is only amended. This means, that only the last table of the page can be extended. Therefore, it may be warranted to include multiple sub-pages on a sample page. This can be done with the Include Plugin.

Templates

Templates for your reports are defined using the Liquid templating language. As DokuWiki uses curly braces for images and square brackets for links, Liquid is configured to use '{[' and ']}' (respectively '{%' '%}') instead. An Example may look like

{% extends "doc_base.txt.liquid" %}
{% block title %} My Title {% endblock %}
{% block content %}
More content
{% endblock%}

which takes data from your qkit measurement and its settings to fill out the page, using the doc_base.txt.liquid template.

URL-Handler

This program defines a URL-Scheme called qviewkit:

qviewkit://UUID?hint=some;hint

Here, UUID is the measurement you are interested in opening, and after hint a semicolon seperated list of strings describes where it may be located, should it not be in the index. The hint is optional.

MCP Adapter (read-only agent access)

This package ships a Model Context Protocol server that gives an LLM agent read-only access to your wiki. It is completely independent of the report-generation above and cannot modify the wiki in any way.

Install the extra and run the server:

pip install "dokuwiki-autodoc[mcp]"

Configure it in your MCP client (e.g. .mcp.json, Claude Desktop, VS Code):

{
  "mcpServers": {
    "dokuwiki": {
      "command": "dokuwiki-mcp",
      "env": {
        "DOKUWIKI_URL": "https://your.wiki/",
        "DOKUWIKI_USER": "youruser",
        "DOKUWIKI_PASSWORD": "yourpassword"
      }
    }
  }
}

The server exposes 16 tools: search, list_pages, get_page (raw wikitext), get_page_html, get_page_info, get_page_permission, list_versions, list_changes, get_page_links, get_backlinks, list_medias, get_media_info, get_media (base64), get_struct_data/get_struct_schema (if the struct plugin is installed), and wiki_info.

Large pages are returned in chunks — follow the next_offset field of the response envelope to continue reading. Media transfers are capped at 1 MiB. ACLs are never bypassed: the agent sees what your configured user may see, and get_page_permission reports that permission level explicitly.

Optional environment variables: DOKUWIKI_USE_CERTIFI=1 (use the certifi trust store, mirroring AutoDocumentation(..., use_certifi=True)) and DOKUWIKI_ALLOW_INVALID_CERTS=1 (disable TLS verification — dangerous, logs a warning, and never a tool parameter).

Installation

pip install dokuwiki-autodoc

Do note, that this project depends on qkit, but as qkit is not yet on PyPi, you will need to install it manually.

Testing

You will need to have qkit installed to test its integration. This not yet done automatically, as qkit is not yet available on PyPi.

Certificate Issues

You may get an SSL Exception when connecting to your server, mentioning self-signed certificates, even though your server may have valid certificates. This has been reported when using Windows.

The reason behind this is, that python uses the system trust store, which, for example, does not include the T-TeleSec GlobalRoot Class 2 certificate. You may need to install them manually.

To do this, use you browser to download the certificates of your wiki. In Firefox, browse to your wiki, click the lock icon in the nav bar > secure connection > further information. Click View Certificates. Navigate to the left-most certificate. This is your Root-CA. There, go to the link to save the certificate as a PEM-File.

Now, run the following command as an administrator:

certutil –addstore –f "Root" <pathtocertificatefile>

License

dokuwiki-autodoc is distributed under the terms of the GPLv2 license.

Metadata

Release files for dokuwiki-autodoc 1.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dokuwiki-autodoc 1.7.0
File Size Uploaded Provenance Actions
dokuwiki_autodoc-1.7.0.tar.gz 1.9 MB Without provenance Details for dokuwiki_autodoc-1.7.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dokuwiki-autodoc 1.7.0
File Interpreter ABI Platform Actions
dokuwiki_autodoc-1.7.0-py3-none-any.whl Python 3 none any Details for dokuwiki_autodoc-1.7.0-py3-none-any.whl

Total release size: 1.9 MB

Release files / dokuwiki_autodoc-1.7.0.tar.gz

Download URL dokuwiki_autodoc-1.7.0.tar.gz
Size 1.9 MB
Tags Source
SHA-256 checksum
How to use checksums
ac7f2dd6ef274f5a77165235382acaff2e0470925111d5b5df77f7c859029a6b
BLAKE2b-256 checksum
How to use checksums
52472d96d8df5e2a48f738a156b8122e8aa30c3351926f68e2cc13659f9ebf36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.18.2 {"ci":null,"cpu":"x86_64","distro":{"id":"resolute","libc":{"lib":"glibc","version":"2.43"},"name":"Ubuntu","version":"26.04"},"implementation":{"name":"CPython","version":"3.14.4"},"installer":{"name":"hatch","version":"1.18.2"},"openssl_version":"OpenSSL 3.5.5 27 Jan 2026","python":"3.14.4","system":{"name":"Linux","release":"7.0.0-43-generic"}} HTTPX2/2.16.0

Release files / dokuwiki_autodoc-1.7.0-py3-none-any.whl

Download URL dokuwiki_autodoc-1.7.0-py3-none-any.whl
Size 21.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fc875091b74291cb0637bc17faeefa67b3e61ad5d3d216dba0520f0da088541f
BLAKE2b-256 checksum
How to use checksums
4af4051f48f349b43f30c42eaaacfba9db69850960db8c01acf807b5a4f4ec25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.18.2 {"ci":null,"cpu":"x86_64","distro":{"id":"resolute","libc":{"lib":"glibc","version":"2.43"},"name":"Ubuntu","version":"26.04"},"implementation":{"name":"CPython","version":"3.14.4"},"installer":{"name":"hatch","version":"1.18.2"},"openssl_version":"OpenSSL 3.5.5 27 Jan 2026","python":"3.14.4","system":{"name":"Linux","release":"7.0.0-43-generic"}} HTTPX2/2.16.0

Security for dokuwiki-autodoc 1.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page