-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfaq.html
344 lines (312 loc) · 20.2 KB
/
faq.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>FAQ — HappyPanda X 0.13.3#170 documentation</title>
<link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/style.css" type="text/css" />
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script src="https://platform.twitter.com/widgets.js"></script>
<script src="_static/script.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Contributing" href="env.html" />
<link rel="prev" title="Command-Line Arguments" href="switches.html" />
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
<meta name="apple-mobile-web-app-capable" content="yes">
<script type="text/javascript" src="_static/js/jquery-1.11.0.min.js "></script>
<script type="text/javascript" src="_static/js/jquery-fix.js "></script>
<script type="text/javascript" src="_static/bootstrap-3.3.7/js/bootstrap.min.js "></script>
<script type="text/javascript" src="_static/bootstrap-sphinx.js "></script>
</head><body>
<div id="navbar" class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html"><span><img src="_static/hpx_logo.svg"></span>
HappyPanda X</a>
<span class="navbar-text navbar-version pull-left"><b>0.13.3#170</b></span>
</div>
<div class="collapse navbar-collapse nav-collapse">
<ul class="nav navbar-nav">
<li class="dropdown globaltoc-container">
<a role="button"
id="dLabelGlobalToc"
data-toggle="dropdown"
data-target="#"
href="index.html">Contents <b class="caret"></b></a>
<ul class="dropdown-menu globaltoc"
role="menu"
aria-labelledby="dLabelGlobalToc"><ul class="current">
<li class="toctree-l1"><a class="reference internal" href="install.html">Installing</a></li>
<li class="toctree-l1"><a class="reference internal" href="usage.html">Using HappyPanda X</a></li>
<li class="toctree-l1"><a class="reference internal" href="usage.html#installing-plugins">Installing plugins</a></li>
<li class="toctree-l1"><a class="reference internal" href="usage.html#securing-happypanda-x">Securing HappyPanda X</a></li>
<li class="toctree-l1"><a class="reference internal" href="usage.html#exposing-happypanda-x">Exposing HappyPanda X</a></li>
<li class="toctree-l1"><a class="reference internal" href="translation.html">Translations</a></li>
<li class="toctree-l1"><a class="reference internal" href="settings.html">Settings</a></li>
<li class="toctree-l1"><a class="reference internal" href="switches.html">Command-Line Arguments</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">FAQ</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="env.html">Contributing</a></li>
<li class="toctree-l1"><a class="reference internal" href="env.html#editing-the-documentation">Editing the documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="client.html">Creating frontends</a></li>
<li class="toctree-l1"><a class="reference internal" href="plugin.html">Plugins</a></li>
<li class="toctree-l1"><a class="reference internal" href="todo.html">TODO</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="api_general.html">General</a></li>
<li class="toctree-l1"><a class="reference internal" href="api.html">Server API</a></li>
<li class="toctree-l1"><a class="reference internal" href="api_plugin.html">Plugin API</a></li>
</ul>
</ul>
</li>
<li>
<a href="switches.html" title="Previous Chapter: Command-Line Arguments"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm hidden-tablet">« Command-Line ...</span>
</a>
</li>
<li>
<a href="env.html" title="Next Chapter: Contributing"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm hidden-tablet">Contributing »</span>
</a>
</li>
</ul>
<form class="navbar-form navbar-right" action="search.html" method="get">
<div class="form-group">
<input type="text" name="q" class="form-control" placeholder="Search" />
</div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
</div>
<ul class="quick-links">
<li>
<strong>Quick links</strong>
</li>
<li class="quick-link">
<a class="github-button" href="https://github.com/twiddli" aria-label="Follow @twiddli on GitHub">Follow @twiddli</a>
</li>
<li class="quick-link">
<a class="github-button" href="https://github.com/happypandax/happypandax/issues" data-icon="octicon-issue-opened" data-show-count="true" aria-label="Issue happypandax/happypandax on GitHub">Issue</a>
</li>
<li class="divider">·</li>
<li class="quick-link">
<a class="github-button" href="https://github.com/happypandax/happypandax" data-icon="octicon-star" data-show-count="true" aria-label="Star happypandax/happypandax on GitHub">Star</a>
</li>
<li class="quick-link">
<a class="github-button" href="https://github.com/happypandax/happypandax/fork" data-icon="octicon-repo-forked" data-show-count="true" aria-label="Fork happypandax/happypandax on GitHub">Fork</a>
</li>
<li class="divider">·</li>
<li class="quick-link">
<a href="https://twitter.com/twiddly_"
class="twitter-follow-button" data-width="145px"
data-link-color="#0069D6" data-show-count="false">
Follow
@twiddly_
</a>
</li>
<li class="quick-link">
<a href="https://twitter.com/share" class="twitter-share-button"
data-url="" data-count="horizontal"
data-via="twbootstrap"
data-related="twiddly_:Creator of HappyPanda X">Tweet</a>
</li>
</ul>
<div class="container">
<div class="row">
<div class="col-md-3">
<div id="sidebar" class="bs-sidenav" role="complementary"><ul>
<li><a class="reference internal" href="#">FAQ</a><ul>
<li><a class="reference internal" href="#file-support">File Support</a></li>
<li><a class="reference internal" href="#scanning-for-galleries">Scanning for galleries</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="col-md-9 content">
<div class="section" id="faq">
<h1>FAQ<a class="headerlink" href="#faq" title="Permalink to this headline">¶</a></h1>
<div class="section" id="file-support">
<h2>File Support<a class="headerlink" href="#file-support" title="Permalink to this headline">¶</a></h2>
<p>In addition to folders with loose files, the following file extensions are accepted for import within HPX by default:</p>
<ul class="simple">
<li><p><strong>Archive Formats</strong></p></li>
<li><p>ZIP = <code class="docutils literal notranslate"><span class="pre">.zip</span></code></p></li>
<li><p>RAR = <code class="docutils literal notranslate"><span class="pre">.rar</span></code></p></li>
<li><p>CBR = <code class="docutils literal notranslate"><span class="pre">.cbr</span></code></p></li>
<li><p>CBZ = <code class="docutils literal notranslate"><span class="pre">.cbz</span></code></p></li>
<li><p>TAR GZ = <code class="docutils literal notranslate"><span class="pre">.tar.gz</span></code> or <code class="docutils literal notranslate"><span class="pre">.tgz</span></code></p></li>
<li><p>TARBZ2 = <code class="docutils literal notranslate"><span class="pre">.tar.bz2</span></code> or <code class="docutils literal notranslate"><span class="pre">.tbz</span></code></p></li>
<li><p>TARXZ = <code class="docutils literal notranslate"><span class="pre">.tar.xz</span></code> or <code class="docutils literal notranslate"><span class="pre">.txz</span></code></p></li>
<li><p><strong>Image formats</strong></p></li>
<li><p>JPG = <code class="docutils literal notranslate"><span class="pre">.jpg</span></code></p></li>
<li><p>JPEG = <code class="docutils literal notranslate"><span class="pre">.jpeg</span></code></p></li>
<li><p>BMP = <code class="docutils literal notranslate"><span class="pre">.bmp</span></code></p></li>
<li><p>PNG = <code class="docutils literal notranslate"><span class="pre">.png</span></code></p></li>
<li><p>GIF = <code class="docutils literal notranslate"><span class="pre">.gif</span></code></p></li>
</ul>
<p>It is possible to add support for additional file extensions with plugins</p>
</div>
<div class="section" id="scanning-for-galleries">
<h2>Scanning for galleries<a class="headerlink" href="#scanning-for-galleries" title="Permalink to this headline">¶</a></h2>
<p>In addition to regular paths to folders, the scanner also supports some special syntax for more fine-grained control of the import process.</p>
<p>The following tokens can be used in a path, these shall be called component-tokens:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">{collection}</span></code> - to specify that this part in the path is a collection</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">{grouping}</span></code> or <code class="docutils literal notranslate"><span class="pre">{series}</span></code> - to specify that this part in the path is a grouping</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">{artist}</span></code> - to specify that this part in the path is the artist name</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">{gallery}</span></code> - to specify that this part in the path is a gallery</p></li>
</ul>
<p>For regex, these tokens are available:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">{re:"<regex</span> <span class="pre">here>"}</span></code> - to match a part in the path that satisfies the given expression <em>(replace ``<regex here>`` with the actual expression)</em></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">{re:'<regex</span> <span class="pre">here>'</span> <span class="pre"><omponent>}</span></code> - where <code class="docutils literal notranslate"><span class="pre"><component></span></code> is one of the component-tokens above. This token is basically a combination of the regex token and a component-token.</p></li>
</ul>
<p>For glob patterns, or more general name matching, this token is available:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">{"<pattern</span> <span class="pre">here>"}</span></code> - to match a part in the path that satisfies the given glob pattern or name</p></li>
</ul>
<p>A special wild-card token is also available:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">*</span></code> - to match anything</p></li>
</ul>
<p>These tokens make the scanner pretty flexible and able to work on most, if not all, possible directory structures.</p>
<p>Learn best by example:</p>
<p>Suppose our collection is structured like this:</p>
<blockquote>
<div><dl class="simple">
<dt>root</dt><dd><ul class="simple">
<li><dl class="simple">
<dt>col A</dt><dd><ul>
<li><dl class="simple">
<dt>series A</dt><dd><ul>
<li><p>gallery C</p></li>
<li><p>gallery D</p></li>
</ul>
</dd>
</dl>
</li>
</ul>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>col B</dt><dd><ul>
<li><p>gallery A</p></li>
</ul>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>col C</dt><dd><ul>
<li><p>gallery <strong>B</strong></p></li>
</ul>
</dd>
</dl>
</li>
<li><p>gallery ABC</p></li>
</ul>
</dd>
</dl>
</div></blockquote>
<p>If we want to add <code class="docutils literal notranslate"><span class="pre">gallery</span> <span class="pre">C</span></code> and <code class="docutils literal notranslate"><span class="pre">gallery</span> <span class="pre">D</span></code> put in the same series and collection we write:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">root/{collection}/{series}/{gallery}</span></code></p></li>
</ul>
<p>This tells the scanner the following:</p>
<ul class="simple">
<li><p>Treat every folder found in <code class="docutils literal notranslate"><span class="pre">root/</span></code> as collections</p></li>
<li><p>Next, treat the folders found in those collections as series’</p></li>
<li><p>Lastly, in those series, treat every folders or files as galleries</p></li>
</ul>
<p>This will add <code class="docutils literal notranslate"><span class="pre">gallery</span> <span class="pre">C</span></code> and <code class="docutils literal notranslate"><span class="pre">gallery</span> <span class="pre">D</span></code> grouped under the same series and collection.
The scanner will ignore <code class="docutils literal notranslate"><span class="pre">col</span> <span class="pre">B</span></code>, <code class="docutils literal notranslate"><span class="pre">col</span> <span class="pre">C</span></code> and <code class="docutils literal notranslate"><span class="pre">gallery</span> <span class="pre">ABC</span></code> because, according to the the path given, no galleries were found inside them.</p>
<p>If we want to add <code class="docutils literal notranslate"><span class="pre">gallery</span> <span class="pre">A</span></code> and <code class="docutils literal notranslate"><span class="pre">gallery</span> <span class="pre">B</span></code>, we just write:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">root/{collection}/{gallery}</span></code></p></li>
</ul>
<p>Same as before, just now without the <code class="docutils literal notranslate"><span class="pre">{series}</span></code> token. There is no need for all tokens to be present but there must always be a <code class="docutils literal notranslate"><span class="pre">{gallery}</span></code> token <strong>at the very end</strong> of the path.
The scanner will add one automatically if none is provided, so these to paths are actually equal:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">root/{gallery}</span></code> and <code class="docutils literal notranslate"><span class="pre">root/</span></code></p></li>
</ul>
<p>These two will both add <code class="docutils literal notranslate"><span class="pre">gallery</span> <span class="pre">ABC</span></code> as a gallery. <code class="docutils literal notranslate"><span class="pre">col</span> <span class="pre">A</span></code>, <code class="docutils literal notranslate"><span class="pre">col</span> <span class="pre">B</span></code> and <code class="docutils literal notranslate"><span class="pre">col</span> <span class="pre">C</span></code> are matched too but these don’t <em>qualify</em> as galleries so the scanner will ignore them.</p>
<p>The order of item-tokens can be arbitrary except <code class="docutils literal notranslate"><span class="pre">{gallery}</span></code>, which always must be last:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">root/{gallery}/{collection}/{series}</span></code> – ERROR</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">root/{series}/{collection}/{gallery}</span></code> – OK</p></li>
</ul>
<p>The wild-card can be used to match a folder unconditionally without treating it as a special item:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">root/{collection}/*/{gallery}</span></code></p></li>
</ul>
<p>This will add <code class="docutils literal notranslate"><span class="pre">gallery</span> <span class="pre">C</span></code> and <code class="docutils literal notranslate"><span class="pre">gallery</span> <span class="pre">D</span></code> put in the same collection but not series, because no token for it was provided.</p>
<p>If we want to only add <code class="docutils literal notranslate"><span class="pre">gallery</span> <span class="pre">C</span></code> and not <code class="docutils literal notranslate"><span class="pre">gallery</span> <span class="pre">D</span></code>, we can use regex to, for example, only match names that contain the letter <code class="docutils literal notranslate"><span class="pre">C</span></code>:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">root/{collection}/{series}/{re:".*C.*"</span> <span class="pre">gallery}</span></code></p></li>
</ul>
<p>This will only add <code class="docutils literal notranslate"><span class="pre">gallery</span> <span class="pre">C</span></code>.
We can also use it to match folders without specifying an item. For example, if we want to match <code class="docutils literal notranslate"><span class="pre">gallery</span> <span class="pre">A</span></code> and not <code class="docutils literal notranslate"><span class="pre">gallery</span> <span class="pre">B</span></code>:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">root/{re:".*B.*"}/{gallery}</span></code></p></li>
</ul>
<p>This will add <code class="docutils literal notranslate"><span class="pre">gallery</span> <span class="pre">A</span></code> and not <code class="docutils literal notranslate"><span class="pre">gallery</span> <span class="pre">B</span></code>.</p>
<p>A simpler way would be using a glob-pattern:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">root/{"*B*"}/{gallery}</span></code></p></li>
<li></li>
</ul>
<p>This will also add <code class="docutils literal notranslate"><span class="pre">gallery</span> <span class="pre">A</span></code> and not <code class="docutils literal notranslate"><span class="pre">gallery</span> <span class="pre">B</span></code>.</p>
<p>You may ask, <strong>what if we want to just add all galleries?</strong>. It is possible to do so in conjunction with the setting <code class="docutils literal notranslate"><span class="pre">scan.transparent_nested_folders</span></code>.
If we’re not interested in specifying collection and grouping, we could just write:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">root/{gallery}</span></code></p></li>
</ul>
<p>This will add all the galleries if <code class="docutils literal notranslate"><span class="pre">scan.transparent_nested_folders</span></code> is set to true. But if we’re interested in specifying the different kind of items, we’ll have to do it in passes. Think smartly.</p>
<p>Lastly, item-tokens are only allowed to appear once in the path.</p>
</div>
</div>
</div>
</div>
<div class="row">
<script src="https://utteranc.es/client.js"
repo="happypandax/happypandax.github.io"
issue-term="pathname"
label="💬 docs"
theme="github-light"
crossorigin="anonymous"
async>
</script>
</div>
</div>
<script async defer src="https://buttons.github.io/buttons.js"></script>
<footer class="footer">
<div class="container">
<p class="pull-right">
<a href="#">Back to top</a>
<br/>
</p>
<p>
© Copyright Twiddly.<br/>
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 3.2.1.<br/>
</p>
</div>
</footer>
</body>
</html>