dokuwiki-autodoc


Namedokuwiki-autodoc JSON
Version 1.2.1 PyPI version JSON
download
home_pageNone
SummaryAutomatically generate documentation in Dokuwiki
upload_time2023-11-29 09:54:35
maintainerNone
docs_urlNone
authorPHI AG Ustinov
requires_python>=3.7
licenseNone
keywords dokuwiki qkit
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Dokuwiki-AutoDoc

[![PyPI - Version](https://img.shields.io/pypi/v/dokuwiki-autodoc.svg)](https://pypi.org/project/dokuwiki-autodoc)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/dokuwiki-autodoc.svg)](https://pypi.org/project/dokuwiki-autodoc)

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](https://pypi.org/project/dokuwiki/) python package to automatically access DokuWiki and write reports generated from [Liquid](https://pypi.org/project/python-liquid/) templates. Plots generated from your measurements are uploaded as well.

This package is intended to be run in a [Jupyter Lab](https://jupyter.org/) environment and uses interactive prompts to authenticate against the wiki.

## Usage
To establish a connection to your wiki, run
```python
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:
```python
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](https://www.dokuwiki.org/plugin:include).

## 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.

## Installation

```console
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:
```console
certutil –addstore –f "Root" <pathtocertificatefile>
```

## License
`dokuwiki-autodoc` is distributed under the terms of the [GPLv2](LICENSE.txt) license.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "dokuwiki-autodoc",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "dokuwiki,qkit",
    "author": "PHI AG Ustinov",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/5b/14/21bea7686ccb32166f8d4741f702784c3f48dafdb690d87e756a4582de5b/dokuwiki_autodoc-1.2.1.tar.gz",
    "platform": null,
    "description": "# Dokuwiki-AutoDoc\n\n[![PyPI - Version](https://img.shields.io/pypi/v/dokuwiki-autodoc.svg)](https://pypi.org/project/dokuwiki-autodoc)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/dokuwiki-autodoc.svg)](https://pypi.org/project/dokuwiki-autodoc)\n\nAutomatically generate documentation of your experiments in DokuWiki! This way, you won't loose track or overview of your progress!\n\nThis package uses the [DokuWiki](https://pypi.org/project/dokuwiki/) python package to automatically access DokuWiki and write reports generated from [Liquid](https://pypi.org/project/python-liquid/) templates. Plots generated from your measurements are uploaded as well.\n\nThis package is intended to be run in a [Jupyter Lab](https://jupyter.org/) environment and uses interactive prompts to authenticate against the wiki.\n\n## Usage\nTo establish a connection to your wiki, run\n```python\ndoc = AutoDocumentation(\"https://your.wiki/\").with_templates()\n```\nThis will prompt you for your username and password. The call to `with_templates()` is optional, but it loads the default template.\n\nNext, to generate a report from a measurement in qkit, run the following directly after your measurement:\n```python\nwith QkitDocumentationBuilder(doc, 'sample:yoursample') as builder:\n        builder.upload_images()\n        builder.generate_report(QKIT_TEMPLATE)\n        with builder.table_builder() as tb:\n            tb.add_column(\"Type\", lambda data: data.measurement['measurement_type'])\n            tb.add_column(\"Comment\", lambda _: \"Look! A comment!\")\n```\nThis will\n- Upload the plots generated from your measurement by qkit\n- Build a report from a template\n- Insert a reference to this measurement into an overview table (UUID, Date) with additional columns as defined (Type, Comment).\n\nFor 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](https://www.dokuwiki.org/plugin:include).\n\n## Templates\nTemplates 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\n```\n{% extends \"doc_base.txt.liquid\" %}\n{% block title %} My Title {% endblock %}\n{% block content %}\nMore content\n{% endblock%}\n```\nwhich takes data from your `qkit` measurement and its settings to fill out the page, using the `doc_base.txt.liquid` template.\n\n## URL-Handler\nThis program defines a URL-Scheme called `qviewkit`:\n```\nqviewkit://UUID?hint=some;hint\n```\nHere, `UUID` is the measurement you are interested in opening, and after `hint` a semicolon seperated list of strings \ndescribes where it may be located, should it not be in the index. The hint is optional.\n\n## Installation\n\n```console\npip install dokuwiki-autodoc\n```\n\nDo note, that this project depends on qkit, but as qkit is not yet on PyPi, you will need to install it manually.\n\n## Testing\nYou will need to have qkit installed to test its integration. This not yet done automatically, as qkit is not yet available on PyPi.\n\n## Certificate Issues\nYou 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.\n\nThe 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.\n\nTo 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.\n\nNow, run the following command as an administrator:\n```console\ncertutil \u2013addstore \u2013f \"Root\" <pathtocertificatefile>\n```\n\n## License\n`dokuwiki-autodoc` is distributed under the terms of the [GPLv2](LICENSE.txt) license.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Automatically generate documentation in Dokuwiki",
    "version": "1.2.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/qkitgroup/dokuwiki-autodoc/issues",
        "Homepage": "https://github.com/qkitgroup/dokuwiki-autodoc"
    },
    "split_keywords": [
        "dokuwiki",
        "qkit"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3a917106511af7c7abaa226797dac9de563b0996c1f6ce8f9c7d78de81ad80d6",
                "md5": "77182a80e5ca2822f0173e01968efef0",
                "sha256": "6df504e9d79bda8eb4bd7750dd7714ef4e414478fbb333546b0150dedb1680bd"
            },
            "downloads": -1,
            "filename": "dokuwiki_autodoc-1.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "77182a80e5ca2822f0173e01968efef0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 20506,
            "upload_time": "2023-11-29T09:54:37",
            "upload_time_iso_8601": "2023-11-29T09:54:37.575460Z",
            "url": "https://files.pythonhosted.org/packages/3a/91/7106511af7c7abaa226797dac9de563b0996c1f6ce8f9c7d78de81ad80d6/dokuwiki_autodoc-1.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5b1421bea7686ccb32166f8d4741f702784c3f48dafdb690d87e756a4582de5b",
                "md5": "efdd06cb3e74795b2de4416ea1093a6a",
                "sha256": "d5e590ea098ffb40b377205dd1d73864a12d0a3c205a084de687eb2ea1a0fdfd"
            },
            "downloads": -1,
            "filename": "dokuwiki_autodoc-1.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "efdd06cb3e74795b2de4416ea1093a6a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 1780926,
            "upload_time": "2023-11-29T09:54:35",
            "upload_time_iso_8601": "2023-11-29T09:54:35.727371Z",
            "url": "https://files.pythonhosted.org/packages/5b/14/21bea7686ccb32166f8d4741f702784c3f48dafdb690d87e756a4582de5b/dokuwiki_autodoc-1.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-29 09:54:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "qkitgroup",
    "github_project": "dokuwiki-autodoc",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "dokuwiki-autodoc"
}
        
Elapsed time: 0.14500s