Skip to content

Commit 93de531

Browse files
slusarzsirainen
authored andcommitted
doveadm: Allow FTS man page information to be overriden via an include file
Allows Pro to add "fts check" commands, which are only used there.
1 parent f09544f commit 93de531

File tree

2 files changed

+6
-65
lines changed

2 files changed

+6
-65
lines changed

docs/core/man/doveadm-fts.1.md

Lines changed: 1 addition & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -64,70 +64,7 @@ index** will index all the missing mails (if any). Note that currently
6464
most FTS drivers do not implement this properly, but instead they
6565
delete all the FTS indexes. This may change in the future versions.
6666

67-
### fts check fast
68-
69-
**doveadm** [*GLOBAL OPTIONS*] fts check fast
70-
[**-u** *user* | **-A** | **-F** *file* | **\-\-no-userdb-lookup**]
71-
[**-S** *socket_path*]
72-
[**-\-refresh**]
73-
[**-\-print-mismatches-only**]
74-
[*namespace*]
75-
76-
This command exists only when the fts_dovecot plugin (Dovecot Pro FTS) is
77-
loaded.
78-
79-
This command can be used to check FTS indexes for consistency. It performs
80-
a fast check using only information in local caches (fts.S, metacache).
81-
82-
**-\-refresh**
83-
: Refresh any necessary local caches for the command to run successfully.
84-
This can be used if the command otherwise fails with exit code 68.
85-
86-
**-\-print-mismatches-only**
87-
: Print only mailboxes that have inconsistencies.
88-
89-
Exit codes:
90-
91-
**0**
92-
: The mailbox is fully consistent
93-
94-
**2**
95-
: The mailbox is not fully consistent
96-
97-
**68**
98-
: There is not enough information in local metacache to know whether the
99-
mailbox is fully consistent. Use either the **-\-refresh** parameter or
100-
the "full" check.
101-
102-
### fts check full
103-
104-
**doveadm** [*GLOBAL OPTIONS*] fts check full
105-
[**-u** *user* | **-A** | **-F** *file* | **\-\-no-userdb-lookup**]
106-
[**-S** *socket_path*]
107-
[**-\-print-details**]
108-
[**-\-print-mismatches-only**]
109-
[*namespace*]
110-
111-
This command exists only when the fts_dovecot plugin (Dovecot Pro FTS) is
112-
loaded.
113-
114-
This command can be used to check FTS indexes for consistency. It performs
115-
a full check to give detailed output of inconsistencies.
116-
117-
**-\-print-details**
118-
: Print also IMAP UID numbers and FTS triplet names for each email.
119-
120-
**-\-print-mismatches-only**
121-
: Print only mailboxes (or emails, with **-\-print-details**) that have
122-
inconsistencies.
123-
124-
Exit codes:
125-
126-
**0**
127-
: The mailbox is fully consistent
128-
129-
**2**
130-
: The mailbox is not fully consistent
67+
<!-- @include: @docs/core/man/include/doveadm-fts-includes.inc -->
13168

13269
<!-- @include: include/reporting-bugs.inc -->
13370

util/generate_man.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,14 @@ const debug = program.opts().debug
4444
const doInclude = (content, includes, f) => {
4545
const result = content.replace(includesRE, (m, m1) => {
4646
if (!m1.length) return m
47+
/* VitePress MD supports paths relative to base with leading
48+
* '@'. */
49+
if (m1.startsWith('@'))
50+
return doInclude(fs.readFileSync(process.cwd() + '/' + m1.slice(1), 'utf8'), includes, f)
4751
const inc_f = path.basename(m1)
4852
for (const fn of includes) {
4953
if (path.basename(fn) == inc_f)
50-
return doInclude(fs.readFileSync(fn, 'utf8'), includes, f)
54+
return doInclude(fs.readFileSync(fn, 'utf8'), includes, f)
5155
}
5256
throw new Error("Missing include " + inc_f)
5357
})

0 commit comments

Comments
 (0)