Differences From Artifact [4c36b56296]:

To Artifact [95289d3b21]:


28
29
30
31
32
33
34
35

36
37
38

39
40
41

42
43
44

45
46
47

48
49
50

51
52
53
54
55
56

57
58
59

60
61
62




63
64
65

66
67

68
69
70
71
72
73
74


75
76





77
78
79
80

81
82
83

84
85
86
87
88
89
90
91


92
93
94

95
96
97
98


99
100
101

102
103
104


105
106
107

108
109
110


111
112
113

114
115
116
117
118
119
120
28
29
30
31
32
33
34

35
36
37

38
39
40

41
42
43

44
45
46

47
48
49

50
51
52
53
54
55

56
57
58

59
60
61
62
63
64
65
66
67
68

69
70

71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90

91
92
93

94
95
96
97
98
99
100


101
102
103
104

105
106
107


108
109
110
111

112
113


114
115
116
117

118
119


120
121
122
123

124
125
126
127
128
129
130
131







-
+


-
+


-
+


-
+


-
+


-
+





-
+


-
+



+
+
+
+


-
+

-
+







+
+


+
+
+
+
+



-
+


-
+






-
-
+
+


-
+


-
-
+
+


-
+

-
-
+
+


-
+

-
-
+
+


-
+







</section>
<section>
</section>
<section>
<h2 class="section-title" id="header-functions">Functions</h2>
<dl>
<dt id="pluginconf.gui.option_entry"><code class="name flex">
<span>def <span class="ident">option_entry</span></span>(<span>o, config)</span>
<span>def <span class="ident">option_entry</span></span>(<span>opt, config)</span>
</code></dt>
<dd>
<div class="desc"></div>
<div class="desc"><p>widgets for single config option</p></div>
</dd>
<dt id="pluginconf.gui.plugin_entry"><code class="name flex">
<span>def <span class="ident">plugin_entry</span></span>(<span>e, plugin_states)</span>
<span>def <span class="ident">plugin_entry</span></span>(<span>pmd, plugin_states)</span>
</code></dt>
<dd>
<div class="desc"></div>
<div class="desc"><p>checkbox for plugin name</p></div>
</dd>
<dt id="pluginconf.gui.plugin_layout"><code class="name flex">
<span>def <span class="ident">plugin_layout</span></span>(<span>ls, config, plugin_states, opt_label=False)</span>
<span>def <span class="ident">plugin_layout</span></span>(<span>pmd_list, config, plugin_states, opt_label=False)</span>
</code></dt>
<dd>
<div class="desc"></div>
<div class="desc"><p>craft list of widgets for each read plugin</p></div>
</dd>
<dt id="pluginconf.gui.read_options"><code class="name flex">
<span>def <span class="ident">read_options</span></span>(<span>files)</span>
</code></dt>
<dd>
<div class="desc"></div>
<div class="desc"><p>read files, return dict of {id:pmd} for all plugins</p></div>
</dd>
<dt id="pluginconf.gui.window"><code class="name flex">
<span>def <span class="ident">window</span></span>(<span>config={}, plugin_states={}, files=['*/*.py'], plugins={}, opt_label=False, theme='DefaultNoMoreNagging', **kwargs)</span>
<span>def <span class="ident">window</span></span>(<span>config, plugin_states, files=['*/*.py'], **kwargs)</span>
</code></dt>
<dd>
<div class="desc"><p>Reads *.py files and crafts a settings dialog from meta data.</p>
<p>Where <code>plugin_states{}</code> is usually an entry in <code>config{}</code> itself. Depending on plugin
and option names, it might even be a flat/shared namespace for both. Per default you'd
set <code>files=["plugins/*.py", __file__]</code> to be read. But with <code>files=[]</code> it's possible to
provide a <code>plugins=pluginconf.get_plugin_meta()</code> or prepared plugin/options dict instead.</p>
<h2 id="parameters">Parameters</h2>
<dl>
<dt><strong><code>config</code></strong> :&ensp;<code>dict</code></dt>
<dt><strong><code>config</code></strong> :&ensp;<code>dict 🔁</code></dt>
<dd>Config settings, updated after dialog completion</dd>
<dt><strong><code>plugin_states</code></strong> :&ensp;<code>dict</code></dt>
<dt><strong><code>plugin_states</code></strong> :&ensp;<code>dict 🔁</code></dt>
<dd>Plugin activation states, also input/output</dd>
<dt><strong><code>files</code></strong> :&ensp;<code>list</code></dt>
<dd>Glob list of *.py files to extract meta definitions from</dd>
<dt><strong><code>plugins</code></strong> :&ensp;<code>dict</code></dt>
<dd>Alternatively to files=[] list, a preparsed list of pluginmeta+config dicts can be injected</dd>
<dt><strong><code>opt_label</code></strong> :&ensp;<code>bool</code></dt>
<dd>Show config name= as label</dd>
<dt><strong><code>theme</code></strong> :&ensp;<code>str</code></dt>
<dd>Set PSG window theme.</dd>
<dt><strong><code>**kwargs</code></strong> :&ensp;<code>dict</code></dt>
<dd>Other options are passed on to PySimpleGUI</dd>
</dl>
<h2 id="returns">Returns</h2>
<dl>
<dt><strong><code>True</code></strong> :&ensp;<code>if changed config{} values are to be saved (the dict will be updated in any case)</code></dt>
<dd>&nbsp;</dd>
</dl></div>
</dd>
<dt id="pluginconf.gui.wrap"><code class="name flex">
<span>def <span class="ident">wrap</span></span>(<span>s, w=50)</span>
<span>def <span class="ident">wrap</span></span>(<span>text, width=50)</span>
</code></dt>
<dd>
<div class="desc"></div>
<div class="desc"><p>textwrap for <code>description</code> and <code>help</code> option fields</p></div>
</dd>
</dl>
</section>
<section>
<h2 class="section-title" id="header-classes">Classes</h2>
<dl>
<dt id="pluginconf.gui.cast"><code class="flex name class">
<span>class <span class="ident">cast</span></span>
<dt id="pluginconf.gui.Cast"><code class="flex name class">
<span>class <span class="ident">Cast</span></span>
</code></dt>
<dd>
<div class="desc"></div>
<div class="desc"><p>map option types (from strings)</p></div>
<h3>Static methods</h3>
<dl>
<dt id="pluginconf.gui.cast.bool"><code class="name flex">
<span>def <span class="ident">bool</span></span>(<span>v)</span>
<dt id="pluginconf.gui.Cast.bool"><code class="name flex">
<span>def <span class="ident">bool</span></span>(<span>val)</span>
</code></dt>
<dd>
<div class="desc"></div>
<div class="desc"><p>map boolean literals</p></div>
</dd>
<dt id="pluginconf.gui.cast.fromtype"><code class="name flex">
<span>def <span class="ident">fromtype</span></span>(<span>v, opt)</span>
<dt id="pluginconf.gui.Cast.fromtype"><code class="name flex">
<span>def <span class="ident">fromtype</span></span>(<span>val, opt)</span>
</code></dt>
<dd>
<div class="desc"></div>
<div class="desc"><p>cast according to option type</p></div>
</dd>
<dt id="pluginconf.gui.cast.int"><code class="name flex">
<span>def <span class="ident">int</span></span>(<span>v)</span>
<dt id="pluginconf.gui.Cast.int"><code class="name flex">
<span>def <span class="ident">int</span></span>(<span>val)</span>
</code></dt>
<dd>
<div class="desc"></div>
<div class="desc"><p>verify integer</p></div>
</dd>
</dl>
</dd>
</dl>
</section>
</article>
<nav id="sidebar">
137
138
139
140
141
142
143
144

145
146
147
148



149
150
151
152
153
154
155
156
157
158
159
160
148
149
150
151
152
153
154

155
156



157
158
159
160
161
162
163
164
165
166
167
168
169
170
171







-
+

-
-
-
+
+
+












<li><code><a title="pluginconf.gui.window" href="#pluginconf.gui.window">window</a></code></li>
<li><code><a title="pluginconf.gui.wrap" href="#pluginconf.gui.wrap">wrap</a></code></li>
</ul>
</li>
<li><h3><a href="#header-classes">Classes</a></h3>
<ul>
<li>
<h4><code><a title="pluginconf.gui.cast" href="#pluginconf.gui.cast">cast</a></code></h4>
<h4><code><a title="pluginconf.gui.Cast" href="#pluginconf.gui.Cast">Cast</a></code></h4>
<ul class="">
<li><code><a title="pluginconf.gui.cast.bool" href="#pluginconf.gui.cast.bool">bool</a></code></li>
<li><code><a title="pluginconf.gui.cast.fromtype" href="#pluginconf.gui.cast.fromtype">fromtype</a></code></li>
<li><code><a title="pluginconf.gui.cast.int" href="#pluginconf.gui.cast.int">int</a></code></li>
<li><code><a title="pluginconf.gui.Cast.bool" href="#pluginconf.gui.Cast.bool">bool</a></code></li>
<li><code><a title="pluginconf.gui.Cast.fromtype" href="#pluginconf.gui.Cast.fromtype">fromtype</a></code></li>
<li><code><a title="pluginconf.gui.Cast.int" href="#pluginconf.gui.Cast.int">int</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
</footer>
</body>
</html>