.
D 2022-11-01T18:14:47.408
L pluginconf
N text/x-markdown
P fa261911f4aa3c0d916b87e535c806b63f122402a157327a52f6e8ccf66c010b
U mario
W 1949
## pluginconf
Is a Python implementation of [plugin meta data](wiki/Plugin+Meta+Data).
It's somewhat fault tolerant (syntax/format variations supported), and
adds a module loader.
| proejct | info |
|---------|-------------------------------------------|
| Repo | [/tree/pluginconf/](tree/pluginconf) |
| **API** | [/doc/trunk/html/](doc/trunk/html/) |
| pypi | **<https://pypi.org/project/pluginconf/>**|
| depends | re, pysimplegui, setuptools, flit |
| compat | Python ≥2.7 |
| testing | 0.5, infreq |
| contrib | mail, fossil |
| announce| - |
It [originated](http://fossil.include-once.org/streamtuner2/wiki/plugin+meta+data)
in streamtuner2. But has since gained some config dialog implementation of its own
(for modseccfg and other small tools). Simplifies configuration management, and has
a pretty terse API.
* Primarily supports Python `#` comments. (Other syntax variants coming.)
* Additionally works from within pyz/zip packages.
* And adds setup() and flit package build wrappers.
### sample
# api: python
# title: example
# description: shows plugin_meta() reading
##type: main
# version: 0.1
#
# Imagine this being a real Python script.
import pluginconf
meta = pluginconf.plugin_meta(filename=__file__)
print(meta.title)
pluginconf.plugin_base = ["plugins", "contrib"]
print(pluginconf.all_plugin_meta())
There's also a simplified interface now ([pluginconf.bind](doc/tip/html/bind.html))
for most common use cases. Though of course it makes most sense if there are actual
script/extension downloads.
The double-escaped `##type:` is a concession to pylint. It's not actually
required, espcially if `#category:` or `#class:` could alternatively be
used for extension grouping.
Z 7ac5e3c5ed81b0a37357a0f844a4e4d9