Name | dokuwiki-autodoc JSON |
Version |
1.3.0
JSON |
| download |
home_page | None |
Summary | Automatically generate documentation in Dokuwiki |
upload_time | 2024-07-29 11:32:27 |
maintainer | None |
docs_url | None |
author | PHI AG Ustinov |
requires_python | >=3.7 |
license | None |
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/db/03/bd8644d04b193aeff02f907ff5c6574e2818c17050a2c86234a0fea84fd1/dokuwiki_autodoc-1.3.0.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.3.0",
"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": "431a874b89aeef5d858a59e10d1f25fb45e5035e36d59d3e2e6dee4a984437f2",
"md5": "b478e2bb700c8fc61a23a62d8613b266",
"sha256": "681b1d407bdb62c704c70ab76a160feaa4755f8107e5fc70e1e8f7918f72a900"
},
"downloads": -1,
"filename": "dokuwiki_autodoc-1.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b478e2bb700c8fc61a23a62d8613b266",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 20505,
"upload_time": "2024-07-29T11:32:29",
"upload_time_iso_8601": "2024-07-29T11:32:29.074665Z",
"url": "https://files.pythonhosted.org/packages/43/1a/874b89aeef5d858a59e10d1f25fb45e5035e36d59d3e2e6dee4a984437f2/dokuwiki_autodoc-1.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "db03bd8644d04b193aeff02f907ff5c6574e2818c17050a2c86234a0fea84fd1",
"md5": "4bc77196d46b3d5c15b645ccd2bc1909",
"sha256": "e9f028c09d7e2b958a31943b2a57da08552435c8edd369ff7839027ce0abeb5d"
},
"downloads": -1,
"filename": "dokuwiki_autodoc-1.3.0.tar.gz",
"has_sig": false,
"md5_digest": "4bc77196d46b3d5c15b645ccd2bc1909",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 1780923,
"upload_time": "2024-07-29T11:32:27",
"upload_time_iso_8601": "2024-07-29T11:32:27.699773Z",
"url": "https://files.pythonhosted.org/packages/db/03/bd8644d04b193aeff02f907ff5c6574e2818c17050a2c86234a0fea84fd1/dokuwiki_autodoc-1.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-29 11:32:27",
"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"
}