flnews_post_proc 1.75 → 1.80

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,278 +1,563 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
2
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
3
  <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
- <meta name="generator" content="Docutils 0.21.2: https://docutils.sourceforge.io/" />
7
- <title>flnews_post_proc</title>
8
- <style type="text/css">
4
+ <meta name="generator" content="vim - Vi Improved, a programmer's editor; HTML Tidy for Linux version 5.8.0
5
+ "/>
6
+ <meta charset="utf-8" />
7
+ <meta name="viewport" content=
8
+ "width=device-width, initial-scale=1" />
9
+ <title>Flnews_post_proc</title>
10
+ <style type="text/css">
11
+ /*<![CDATA[*/
9
12
 
10
- /*
11
- :Author: Michael Uplawski
12
- :Contact: michael.uplawski@uplawski.eu
13
- :License: WTFPL 2.0, see http://www.wtfpl.net/about/
13
+ /*
14
+ :Author: Michael Uplawski
15
+ :Contact: michael.uplawski@uplawski.eu
16
+ :License: WTFPL 2.0, see http://www.wtfpl.net/about/
14
17
 
15
- Stylesheet for use with Docutils.
16
- */
18
+ Stylesheet for use with Docutils.
19
+ */
17
20
 
18
- /* The defaults for docutils */
19
- @import url(html4css1.css);
20
-
21
- body {
22
- background-color:#e0f0a0;
21
+ body {
22
+ background-color:#e0f0c0;
23
23
  font-family: Verdana,Helvetica,Univers;
24
- }
24
+ }
25
+
26
+ p {width: 80%;}
25
27
 
26
- h1 {color:darkblue;font-size:1.5em;}
27
- h1.title {color:#a0a0f0;font-size:2em;}
28
+ h1.title {color:#800080;font-size:2em;}
29
+ h2 {color:darkblue;font-size:1.5em;}
30
+ h3 {color:#3030f0;font-size:1.5em;}
28
31
 
29
- p, ul.simple, ol.simple, dt {margin-left:2em;}
30
- dd {margin-left:4em;}
32
+ p, ul.simple, ol.simple, dt {margin-left:2em;}
33
+ dd {margin-left:4em;}
31
34
 
32
- /* correct left margin of nested block tags*/
33
- dd p, li p {margin-left:0;}
34
- dd * ul {margin-left:0 ! important; }
35
- dd ul {margin-left:0 ! important; }
36
- dd dl dt, dd dl dd {margin-left:0 ! important;}
35
+ /* correct left margin of nested block tags*/
36
+ dd p, li p {margin-left:0;}
37
+ dd * ul {margin-left:0 ! important; }
38
+ dd ul {margin-left:0 ! important; }
39
+ dd dl dt, dd dl dd {margin-left:0 ! important;}
37
40
 
38
- em {color:#000080;
41
+ em {color:#000080;
39
42
  background-color:#ffffa0;
40
- }
43
+ }
41
44
 
42
- blockquote {background-color:#ffc090;
45
+ pre.literal-block {
46
+ margin-left:2em;
47
+ font-family:Verdana,Helvetica,Univers;
48
+ }
49
+ blockquote {background-color:#ffc090;
43
50
  padding:0.5em;
51
+ width:80%;
44
52
  border-radius:0.5em;
45
- }
53
+ }
46
54
 
47
- </style>
55
+ /*]]>*/
56
+ </style>
48
57
  </head>
49
58
  <body>
50
- <div class="document" id="flnews-post-proc">
51
- <h1 class="title">flnews_post_proc</h1>
52
- <h2 class="subtitle" id="post-processor-for-the-flnews-newsreader">Post-Processor for the flnews Newsreader</h2>
53
-
54
- <div class="section" id="synopsis">
55
- <h1>SYNOPSIS</h1>
56
- <p>The post-processor is invoked by piping an article into it. This typically occurs
57
- automatically when the &quot;post_proc&quot; variable is set to <cite>flnews_post_proc</cite> in the
58
- flnews configuration file.</p>
59
- <p>For testing purposes, you can also pipe locally stored articles into the post-processor
60
- using a command like:</p>
61
- <p><strong>flnews_post_proc &lt; article</strong></p>
62
- </div>
63
- <div class="section" id="description">
64
- <h1>DESCRIPTION</h1>
65
- <p>The flnews newsreader fully supports Usenet access, enabling the reception and reading
66
- of articles from newsgroups, as well as composing and posting them.</p>
67
- <p>When comparing various news clients, differences will often influence your choice of
68
- preferred client. Flnews distinguishes itself by not only offering control over its
69
- internal behavior, but also by allowing you to modify outgoing posts just before they
70
- are sent to the configured NNTP server.</p>
71
- <p>The <cite>flnews_post_proc</cite> program can be used to modify and enhance a post in ways that
72
- flnews alone cannot. It is configurable and may meet the needs of some Usenet users,
73
- though it is primarily intended as a starting point for creating your own custom solutions.</p>
74
- <div class="section" id="limitations-of-basic-newsreaders">
75
- <h2>Limitations of Basic Newsreaders</h2>
76
- <p>While flnews creates posts that are generally complete and ready for submission, there are
77
- instances where users might find the output unsatisfactory for arbitrary reasons:</p>
78
- <ul>
79
- <li><p class="first">If you're posting to different newsgroups in multiple languages, the introductory line
80
- referencing a prior post can only be set once in the flnews configuration file. As a
81
- result, posts to a French newsgroup, for example, may start with an introduction in
82
- English. The post-processor can address this by setting specific introductory lines
83
- for each newsgroup.</p>
84
- </li>
85
- <li><p class="first">Similar issues arise when you set a standard signature and want it to vary based on
86
- the newsgroup. The post-processor allows different signatures to be used for different
87
- newsgroups, and you can even randomize the selection from a list of signatures stored
88
- in a file.</p>
89
- </li>
90
- <li><p class="first">Custom headers, such as GnuPG key IDs or your language proficiency, can also be added
91
- to posts, though signatures may be a better alternative. Custom headers can be defined
92
- in the configuration file and will be added to outgoing posts.</p>
93
- </li>
94
- <li><p class="first">Headers like &quot;Archive&quot; and &quot;X-No-Archive&quot; are sometimes set to prevent an article from
95
- being indexed by search engines (e.g., Google). For example, test posts likely don't need
96
- to be included in search results. The post-processor can apply both headers to all posts
97
- sent to certain newsgroups.</p>
98
- <p><strong>NOTE</strong>: As of 2024, the &quot;X-No-Archive&quot; header has limited effectiveness, and it is
99
- up to server operators whether or not to honor it.</p>
100
- </li>
101
- <li><p class="first">Posts that include many references to other posts or URLs can become cluttered. The
102
- post-processor can convert marked text into footnotes, similar to the &lt;ref/&gt; link format
103
- used in Wikipedia, with the delimiter configurable in the configuration file.
104
- Example (using %=):
105
- &quot;This is an object %=and this becomes the footnote, describing the object further=%&quot;</p>
106
- </li>
107
- </ul>
108
- </div>
109
- <div class="section" id="dialog-for-overriding-settings">
110
- <h2>Dialog for Overriding Settings</h2>
111
- <p><strong>IMPORTANT</strong>: As of version 1.72, YAD or Zenity cannot be used for the dialog interface.</p>
112
- <p>Before the post-processor runs, a dialog can be displayed to allow users to <strong>disable</strong>
113
- certain configuration options. If Whiptail or xterm are available, you can choose to
114
- disable the following options. You <strong>cannot</strong> enable options that haven't already been set
115
- in the configuration.</p>
116
- <ul class="simple">
117
- <li>Signatures (if set in the configuration) can be <strong>ignored</strong>. A default signature will
118
- be used, or no signature at all.</li>
119
- <li>Custom headers can be <strong>omitted</strong>.</li>
120
- <li>The &quot;Archive&quot; and &quot;X-No-Archive&quot; headers can be <strong>ignored</strong> if set for the current
121
- newsgroup.</li>
122
- <li>Logging can be <strong>disabled</strong>, if enabled.</li>
123
- </ul>
124
- <p>Pressing Esc or the Cancel button on the dialog will interrupt the process, and flnews
125
- will not post the article.</p>
126
- <p>To disable the dialog entirely (and apply all configured options without further interaction),
127
- set the <strong>OVERRIDE_CONFIG</strong> option.</p>
128
- </div>
129
- </div>
130
- <div class="section" id="configuration">
131
- <h1>CONFIGURATION</h1>
132
- <p>Upon first execution of the program, a copy of the original configuration file is created
133
- in <em>/home/[user]/.flnews_post_proc.conf</em>. This file is used thereafter. Deleting it will
134
- cause the file to be recreated, but any custom changes will be lost.</p>
135
- <p>The configuration file uses YAML syntax and includes detailed explanations. The variables
136
- within it fall into two categories:</p>
137
- <ol class="arabic simple">
138
- <li>Variables that represent values originally set by flnews, which can be used or replaced.
139
- These elements are typically captured using regular expressions.</li>
140
- <li>Variables that define new or modified content.</li>
141
- </ol>
142
- <div class="section" id="example-configuration-variables">
143
- <h2>Example Configuration Variables</h2>
144
- <p><strong>FUP_NAME</strong>
145
- A regular expression that matches the name of the previous poster in a quoted post. This
146
- string is recognized in the original article and used with the matching element from
147
- <em>GROUP_INTRO</em>.</p>
148
- <p>Leave this field empty to retain the default value from the FLNews configuration.</p>
149
- <p>CONTENT: A string representing a regular expression.</p>
150
- <p>DEFAULT: EMPTY</p>
151
- <p>EXAMPLE1: &quot;On \\d+.\\d+.\\d{2,4} at \\d+:\\d+ <strong>(.*)</strong> wrote:&quot;</p>
152
- <p>EXAMPLE2: &quot;<strong>(.*)</strong> wrote:&quot;</p>
153
- <p><strong>FUP_GROUP</strong>
154
- A regular expression that matches the newsgroup where the quoted post was published.</p>
155
- <p>Leave this field empty to ignore the exact group.</p>
156
- <p>CONTENT: A string representing a regular expression.</p>
157
- <p>DEFAULT: EMPTY</p>
158
- <p>EXAMPLE: &quot;wrote in <strong>(.*)</strong>:&quot;</p>
159
- <p><strong>GROUP_INTROS</strong>
160
- Introductory strings referring to the previous poster in a quoted post. When the newsgroup
161
- matches <em>FUP_GROUP</em>, these variables are used in the resulting introduction.</p>
162
- <p>CONTENT: A newsgroup or regular expression per line, followed by a colon, space, and string.</p>
163
- <p>DEFAULT: As configured in FLNews.</p>
164
- <p>EXAMPLE: alt.test: &quot;Thus spoke %fup_name% on that baleful %fup_date%:&quot;</p>
165
- <p><strong>GROUP_SIGS</strong>
166
- Signature lines for each newsgroup or a path to a file containing signatures, which should be
167
- formatted and separated by one empty line. A random signature is picked from the file for each
168
- newsgroup. You can also source another file within the signature file by starting a line with
169
- &quot;. /path/to/other/file&quot;.</p>
170
- <p>CONTENT: A newsgroup or regular expression per line, followed by a colon, space, and string.</p>
171
- <p>DEFAULT: As configured in flnews.</p>
172
- <p>EXAMPLE: alt.test: &quot;Signature for alt.test\r\nsecond line&quot;
173
- EXAMPLE: comp.*: /home/[user]/.my_sigs</p>
174
- <p><strong>CUSTOM_HEADERS</strong>
175
- Additional custom headers to be added to outgoing articles.</p>
176
- <p>CONTENT: One line per header, starting with a dash and space, followed by the header name and value.</p>
177
- <p>DEFAULT: Undefined</p>
178
- <dl class="docutils">
179
- <dt>EXAMPLE:</dt>
180
- <dd><ul class="first last simple">
181
- <li>'X-My-Header: nothing fancy'</li>
182
- <li>'X-Another-Header: care not!'</li>
183
- </ul>
184
- </dd>
185
- </dl>
186
- <p><strong>NO_ARCHIVE_GROUPS</strong>
187
- Newsgroups where the &quot;Archive: no&quot; and &quot;X-No-Archive: YES&quot; headers should be set.</p>
188
- <p>CONTENT: A line with a dash and space, followed by the group name or a regular expression.</p>
189
- <p>DEFAULT: Empty</p>
190
- <dl class="docutils">
191
- <dt>EXAMPLE:</dt>
192
- <dd><ul class="first last simple">
193
- <li>&quot;alt.test&quot;</li>
194
- <li>&quot;^news.*&quot;</li>
195
- </ul>
196
- </dd>
197
- </dl>
198
- <p><strong>DEBUG_LOG</strong>
199
- The name of the file where debug messages are logged. If specified, logging will be enabled.
200
- If empty, logging is disabled.</p>
201
- <p>CONTENT: The name of a writable file, which will be created if it doesn't exist and overwritten if necessary.</p>
202
- <p>DEFAULT: Empty</p>
203
- <p>EXAMPLE: '/tmp/a_log-file.txt'</p>
204
- <p><strong>LOG LEVEL</strong>
205
- One of: debug, fatal, error, info, warn.</p>
206
- <p><strong>REFERENCES_SEPARATOR</strong>
207
- A symbol or sequence marking the end of the message body and the beginning of a footnote list.
208
- If not defined, footnotes are appended directly after the message body.</p>
209
- <p>CONTENT: A quoted symbol or sequence.</p>
210
- <p>DEFAULT: Empty</p>
211
- <p>EXAMPLE: '---------'</p>
212
- <p><strong>REFERENCES_DELIMITER</strong>
213
- A sequence marking the beginning and end of text to be used as a footnote or reference. The reversed
214
- sequence is used to mark the end.</p>
215
- <p>CONTENT: A quoted symbol or sequence.</p>
216
- <p>DEFAULT: None (empty)</p>
217
- <p>EXAMPLE: '%?'</p>
218
- <p><strong>REFERENCE_FORMAT</strong>
219
- A format string using <cite>%s</cite> for a number to replace the reference text in the body.</p>
220
- <p>DEFAULT: &quot; %s)&quot; → becomes 1) ... 2) ... 3)</p>
221
- <p>EXAMPLE: &quot;(%s)&quot; → becomes (1) ... (2) ... (3)</p>
222
- <p><strong>VFY_URLS</strong>
223
- A boolean constant determining whether URLs should be verified and corrected if necessary.
224
- URL manipulations include adding angular brackets ('&lt;', '&gt;') and slashes after &quot;http(s):&quot;.</p>
225
- <p>CONTENT: One of YES, yes, NO, no (case insensitive).</p>
226
- <p>DEFAULT: yes</p>
227
- <p>EXAMPLE: ... I leave this to your discretion.</p>
228
- <p><strong>OVERRIDE_CONFIG</strong>
229
- A boolean constant that controls whether configuration options can be overridden before posting.</p>
230
- <p>Set this to &quot;no&quot; to disable the dialog.</p>
231
- <p>DEFAULT: yes</p>
232
- <p>EXAMPLE: No</p>
233
- </div>
234
- </div>
235
- <div class="section" id="other-information">
236
- <h1>Other Information</h1>
237
- <div class="section" id="testing">
238
- <h2>Testing</h2>
239
- <p>You can verify the post-processor’s effect by using one of two methods:</p>
240
- <ol class="arabic">
241
- <li><p class="first">Pipe a saved post into the program:</p>
242
- <p><strong>:~$ /usr/local/bin/[post-processor] &lt; [test-article]</strong></p>
243
- <p>This will show the modified article, and you can pipe it into another file for further testing.</p>
244
- </li>
245
- <li><p class="first">Post directly to a test newsgroup (e.g., alt.test). This is essential before posting to
246
- real newsgroups, especially when the post-processor will alter the article.</p>
247
- </li>
248
- </ol>
249
- </div>
250
- <div class="section" id="source-code">
251
- <h2>Source Code</h2>
252
- <p>The gem file for the program, available via the gem utility or rubygems.org, contains all
253
- the source code and documentation (this page included). To extract it, do the following:</p>
254
- <ol class="arabic simple">
255
- <li>Extract the gem file: <cite>tar -xf flnews_post_proc-0.1.gem</cite></li>
256
- <li>Uncompress the data archive: <cite>gunzip data.gz</cite></li>
257
- <li>Extract the data archive: <cite>tar -xf data.tar</cite></li>
258
- </ol>
259
- <p>This will create the directories <cite>bin</cite>, <cite>doc</cite>, and <cite>lib</cite>.</p>
260
- </div>
261
- <div class="section" id="license">
262
- <h2>License</h2>
263
- <p>The flnews_post_proc is distributed under the WTFPL-2.0 or later License.
264
- For more details, visit <a class="reference external" href="http://www.wtfpl.net/txt/copying/">http://www.wtfpl.net/txt/copying/</a> or refer to the license file in the
265
- documentation directory of the gem.</p>
266
- </div>
267
- <div class="section" id="author">
268
- <h2>Author</h2>
269
- <p>flnews_post_proc has been developed by
270
- Michael Uplawski &lt;<a class="reference external" href="mailto:michael.uplawski&#64;uplawski.eu">michael.uplawski&#64;uplawski.eu</a>&gt;</p>
271
- </div>
272
- </div>
273
- <div class="section" id="section-1">
274
- <h1>Ω</h1>
275
- </div>
276
- </div>
59
+ <main id="flnews-post-proc">
60
+ <h1 class="title">flnews_post_proc</h1>
61
+
62
+ <p class="subtitle" id=
63
+ "post-processor-for-the-flnews-newsreader">Post-Processor for
64
+ the flnews Newsreader</p>
65
+
66
+ <section id="synopsis">
67
+ <h2>SYNOPSIS</h2>
68
+
69
+ <p>The post-processor is invoked by piping an article into
70
+ it. This typically occurs automatically when the "post_proc"
71
+ variable is set to <strong>flnews_post_proc</strong> in the
72
+ flnews <a class="reference internal" href=
73
+ "#configuration">configuration</a> file.</p>
74
+
75
+ <p>For testing purposes, you can also pipe locally stored
76
+ articles into the post-processor using a command like:</p>
77
+
78
+ <blockquote>
79
+ <p><strong>flnews_post_proc</strong> &lt; article</p>
80
+ </blockquote>
81
+
82
+ <p>or:</p>
83
+
84
+ <blockquote>
85
+ <p>cat article.txt | <strong>flnews_post_proc</strong></p>
86
+ </blockquote>
87
+ </section>
88
+
89
+ <section id="description">
90
+ <h2>DESCRIPTION</h2>
91
+
92
+ <p>The flnews newsreader fully supports Usenet access,
93
+ enabling the reception and reading of articles from
94
+ newsgroups, as well as composing and posting them.</p>
95
+
96
+ <p>When comparing various news clients, differences will
97
+ often influence your choice of preferred client. Flnews
98
+ distinguishes itself by not only offering control over its
99
+ internal behavior, but also by allowing you to modify
100
+ outgoing posts just before they are sent to the configured
101
+ NNTP server.</p>
102
+
103
+ <p>The <strong>flnews_post_proc</strong> program can be used
104
+ to modify and enhance a post in ways that flnews alone
105
+ cannot. It is configurable and may meet the needs of some
106
+ Usenet users, though it is primarily intended as a starting
107
+ point for creating your own custom solutions.</p>
108
+
109
+ <section id="limitations-of-basic-newsreaders">
110
+ <h3>Limitations of Basic Newsreaders</h3>
111
+
112
+ <p>While flnews creates posts that are generally complete
113
+ and ready for submission, there are instances where users
114
+ might find the output unsatisfactory for arbitrary
115
+ reasons:</p>
116
+
117
+ <ul>
118
+ <li>
119
+ <p>If you're posting to different newsgroups in
120
+ multiple languages, the introductory line referencing a
121
+ prior post can only be set once in the flnews <a class=
122
+ "reference internal" href=
123
+ "#configuration">configuration</a> file. As a result,
124
+ posts to a French newsgroup, for example, may start
125
+ with an introduction in English. The post-processor can
126
+ address this by setting specific introductory lines for
127
+ each newsgroup.</p>
128
+ </li>
129
+
130
+ <li>
131
+ <p>Similar issues arise when you set a standard
132
+ signature and want it to vary based on the newsgroup.
133
+ The post-processor allows different signatures to be
134
+ used for different newsgroups, and you can even
135
+ randomize the selection from a list of signatures
136
+ stored in a file.</p>
137
+ </li>
138
+
139
+ <li>
140
+ <p>Custom headers, such as GnuPG key IDs or your
141
+ language proficiency, can also be added to posts,
142
+ though signatures may be a better alternative. Custom
143
+ headers can be defined in the <a class=
144
+ "reference internal" href=
145
+ "#configuration">configuration</a> file and will be
146
+ added to outgoing posts.</p>
147
+ </li>
148
+
149
+ <li>
150
+ <p>Headers like "Archive" and "X-No-Archive" are
151
+ sometimes set to prevent an article from being indexed
152
+ by search engines (e.g., Google). For example, test
153
+ posts likely don't need to be included in search
154
+ results. The post-processor can apply both headers to
155
+ all posts sent to certain newsgroups.</p>
156
+
157
+ <p><strong>NOTE</strong>: As of 2024, the
158
+ "X-No-Archive" header has limited effectiveness, and it
159
+ is up to server operators whether or not to honor
160
+ it.</p>
161
+ </li>
162
+
163
+ <li>
164
+ <p>Posts that include many references to other posts or
165
+ URLs can become cluttered. The post-processor can
166
+ convert marked text into footnotes, similar to the
167
+ &lt;ref/&gt; link format used in Wikipedia, with the
168
+ delimiter configurable in the <a class=
169
+ "reference internal" href=
170
+ "#configuration">configuration</a> file. Example (using
171
+ %=): "This is an object %=and this becomes the
172
+ footnote, describing the object further=%"</p>
173
+ </li>
174
+ </ul>
175
+ </section>
176
+
177
+ <section id="dialog-for-overriding-settings">
178
+ <h3>Dialog for Overriding Settings</h3>
179
+
180
+ <p><strong>IMPORTANT</strong>: As of version 1.72, YAD or
181
+ Zenity cannot be used for the dialog interface.</p>
182
+
183
+ <p>Before the post-processor runs, a dialog can be
184
+ displayed to allow users to <strong>disable</strong>
185
+ certain <a class="reference internal" href=
186
+ "#configuration">configuration</a> options. If Whiptail or
187
+ xterm are available, you can choose to disable the
188
+ following options. You <strong>cannot</strong> enable
189
+ options that haven't already been set in the <a class=
190
+ "reference internal" href=
191
+ "#configuration">configuration</a>.</p>
192
+
193
+ <ul class="simple">
194
+ <li>
195
+ <p>Signatures (if set in the <a class=
196
+ "reference internal" href=
197
+ "#configuration">configuration</a>) can be
198
+ <strong>ignored</strong>. A default signature will be
199
+ used, or no signature at all.</p>
200
+ </li>
201
+
202
+ <li>
203
+ <p>Custom headers can be <strong>omitted</strong>.</p>
204
+ </li>
205
+
206
+ <li>
207
+ <p>The "Archive" and "X-No-Archive" headers can be
208
+ <strong>ignored</strong> if set for the current
209
+ newsgroup.</p>
210
+ </li>
211
+
212
+ <li>
213
+ <p>Logging can be <strong>disabled</strong>, if
214
+ enabled.</p>
215
+ </li>
216
+ </ul>
217
+
218
+ <p>Pressing Esc or the Cancel button on the dialog will
219
+ interrupt the process, and flnews will not post the
220
+ article.</p>
221
+
222
+ <p>To disable the dialog entirely (and apply all configured
223
+ options without further interaction), set the
224
+ <strong>OVERRIDE_CONFIG</strong> option.</p>
225
+ </section>
226
+ </section>
227
+
228
+ <section id="configuration">
229
+ <h2>CONFIGURATION</h2>
230
+
231
+ <p>Upon first execution of the program, a copy of the
232
+ original configuration file is created in
233
+ <em>/home/[user]/.flnews_post_proc.conf</em>. This file is
234
+ used thereafter. Deleting it will cause the file to be
235
+ recreated, but any custom changes will be lost.</p>
236
+
237
+ <p>The configuration file uses YAML syntax and includes
238
+ detailed explanations. The variables within it fall into two
239
+ categories:</p>
240
+
241
+ <ol class="arabic simple">
242
+ <li>
243
+ <p>Variables that represent values originally set by
244
+ flnews, which can be used or replaced. These elements are
245
+ typically captured using regular expressions.</p>
246
+ </li>
247
+
248
+ <li>
249
+ <p>Variables that define new or modified content.</p>
250
+ </li>
251
+ </ol>
252
+
253
+ <section id="configuration-options">
254
+ <h3>Configuration Options</h3>
255
+ <!-- empty lines in the following definition list are in reality '\ ' -->
256
+
257
+ <p><strong>FUP_NAME</strong>
258
+ </p>
259
+
260
+ <blockquote>
261
+ <p>A regular expression that matches the name of the
262
+ previous poster in a quoted post. This string is
263
+ recognized in the original article and used with the
264
+ matching element from <a class="reference internal" href=
265
+ "#group-intros">GROUP_INTROS</a>.</p>
266
+
267
+ <p>Leave this field empty to retain the default value
268
+ from the FLNews configuration.</p>
269
+
270
+ <p>CONTENT: A string representing a regular
271
+ expression.</p>
272
+
273
+ <p>DEFAULT: EMPTY</p>
274
+
275
+ <p>EXAMPLE1: "On \\d+.\\d+.\\d{2,4} at \\d+:\\d+
276
+ <strong>(.*)</strong> wrote:"</p>
277
+
278
+ <p>EXAMPLE2: "<strong>(.*)</strong> wrote:"</p>
279
+ </blockquote>
280
+
281
+ <p id="fup-group"><strong>FUP_GROUP</strong>
282
+ </p>
283
+
284
+ <blockquote>
285
+ <p>A regular expression that matches the newsgroup where
286
+ the quoted post was published.</p>
287
+
288
+ <p>Leave this field empty to ignore the exact group.</p>
289
+
290
+ <p>CONTENT: A string representing a regular
291
+ expression.</p>
292
+
293
+ <p>DEFAULT: EMPTY</p>
294
+
295
+ <p>EXAMPLE: "wrote in <strong>(.*)</strong>:"</p>
296
+ </blockquote>
297
+
298
+ <p id="group-intros"><strong>GROUP_INTROS</strong>
299
+ </p>
300
+
301
+ <blockquote>
302
+ <p>Introductory strings referring to the previous poster
303
+ in a quoted post. When the newsgroup matches <a class=
304
+ "reference internal" href="#fup-group">FUP_GROUP</a>,
305
+ these variables are used in the resulting
306
+ introduction.</p>
307
+
308
+ <p>CONTENT: A newsgroup or regular expression per line,
309
+ followed by a colon, space, and string.</p>
310
+
311
+ <p>DEFAULT: As configured in FLNews.</p>
312
+
313
+ <p>EXAMPLE: alt.test: "Thus spoke %fup_name% on that
314
+ baleful %fup_date%:"</p>
315
+ </blockquote>
316
+
317
+ <p><strong>GROUP_SIGS</strong>
318
+ </p>
319
+
320
+ <blockquote>
321
+ <p>Signature lines for each newsgroup or a path to a file
322
+ containing signatures, which should be formatted and
323
+ separated by one empty line. A random signature is picked
324
+ from the file for each newsgroup. You can also source
325
+ another file within the signature file by starting a line
326
+ with ". /path/to/other/file".</p>
327
+
328
+ <p>CONTENT: A newsgroup or regular expression per line,
329
+ followed by a colon, space, and string.</p>
330
+
331
+ <p>DEFAULT: As configured in flnews.</p>
332
+
333
+ <p>EXAMPLE:</p>
334
+
335
+ <pre class=
336
+ "literal-block">alt.test: "Signature for alt.test\\r\\nsecond line"
337
+ comp.*: /home/[user]/.my_sigs</pre>
338
+ </blockquote>
339
+
340
+ <p><strong>CUSTOM_HEADERS</strong>
341
+ </p>
342
+
343
+ <blockquote>
344
+ <p>Additional custom headers to be added to outgoing
345
+ articles.</p>
346
+
347
+ <p>CONTENT: One line per header, starting with a dash and
348
+ space, followed by the header name and value.</p>
349
+
350
+ <p>DEFAULT: Undefined</p>
351
+
352
+ <p>EXAMPLE:</p>
353
+
354
+ <pre class="literal-block">- 'X-My-Header: nothing fancy'
355
+ - 'X-Another-Header: care not!'</pre>
356
+ </blockquote>
357
+
358
+ <p><strong>NO_ARCHIVE_GROUPS</strong>
359
+ </p>
360
+
361
+ <blockquote>
362
+ <p>Newsgroups where the "Archive: no" and "X-No-Archive:
363
+ YES" headers should be set.</p>
364
+
365
+ <p>CONTENT: A line with a dash and space, followed by the
366
+ group name or a regular expression.</p>
367
+
368
+ <p>DEFAULT: Empty</p>
369
+
370
+ <p>EXAMPLE:</p>
371
+
372
+ <pre class="literal-block">- "alt.test"
373
+ - "^news.*"</pre>
374
+ </blockquote>
375
+
376
+ <p><strong>DEBUG_LOG</strong>
377
+ </p>
378
+
379
+ <blockquote>
380
+ <p>The name of the file where debug messages are logged.
381
+ If specified, logging will be enabled. If empty, logging
382
+ is disabled.</p>
383
+
384
+ <p>CONTENT: The name of a writable file, which will be
385
+ created if it doesn't exist and overwritten if
386
+ necessary.</p>
387
+
388
+ <p>DEFAULT: Empty</p>
389
+
390
+ <p>EXAMPLE: '/tmp/a_log-file.txt'</p>
391
+ </blockquote>
392
+
393
+ <p><strong>LOG LEVEL</strong>
394
+ </p>
395
+
396
+ <blockquote>
397
+ <p>One of: debug, fatal, error, info, warn.</p>
398
+ </blockquote>
399
+
400
+ <p><strong>REFERENCES_SEPARATOR</strong>
401
+ </p>
402
+
403
+ <blockquote>
404
+ <p>A symbol or sequence marking the end of the message
405
+ body and the beginning of a footnote list. If not
406
+ defined, footnotes are appended directly after the
407
+ message body.</p>
408
+
409
+ <p>CONTENT: A quoted symbol or sequence.</p>
410
+
411
+ <p>DEFAULT: Empty</p>
412
+
413
+ <p>EXAMPLE: '---------'</p>
414
+ </blockquote>
415
+
416
+ <p><strong>REFERENCES_DELIMITER</strong>
417
+ </p>
418
+
419
+ <blockquote>
420
+ <p>A sequence marking the beginning and end of text to be
421
+ used as a footnote or reference. The reversed sequence is
422
+ used to mark the end.</p>
423
+
424
+ <p>CONTENT: A quoted symbol or sequence.</p>
425
+
426
+ <p>DEFAULT: None (empty)</p>
427
+
428
+ <p>EXAMPLE: '%?'</p>
429
+ </blockquote>
430
+
431
+ <p><strong>REFERENCE_FORMAT</strong>
432
+ </p>
433
+
434
+ <blockquote>
435
+ <p>A format string using <cite>%s</cite> for a number to
436
+ replace the reference text in the body.</p>
437
+
438
+ <p>DEFAULT: " %s)" → becomes 1) ... 2) ... 3)</p>
439
+
440
+ <p>EXAMPLE: "(%s)" → becomes (1) ... (2) ... (3)</p>
441
+ </blockquote>
442
+
443
+ <p><strong>VFY_URLS</strong>
444
+ </p>
445
+
446
+ <blockquote>
447
+ <p>A boolean constant determining whether URLs should be
448
+ verified and corrected if necessary. URL manipulations
449
+ include adding angular brackets ('&lt;', '&gt;') and
450
+ slashes after "http(s):".</p>
451
+
452
+ <p>CONTENT: One of YES, yes, NO, no (case
453
+ insensitive).</p>
454
+
455
+ <p>DEFAULT: yes</p>
456
+
457
+ <p>EXAMPLE: ... I leave this to your discretion.</p>
458
+ </blockquote>
459
+
460
+ <p><strong>OVERRIDE_CONFIG</strong>
461
+ </p>
462
+
463
+ <blockquote>
464
+ <p>A boolean constant that controls whether configuration
465
+ options can be overridden before posting.</p>
466
+
467
+ <p>Set this to "no" to disable the dialog.</p>
468
+
469
+ <p>DEFAULT: yes</p>
470
+
471
+ <p>EXAMPLE: No</p>
472
+ </blockquote>
473
+ </section>
474
+ </section>
475
+
476
+ <section id="other-information">
477
+ <h2>Other Information</h2>
478
+
479
+ <section id="testing">
480
+ <h3>Testing</h3>
481
+
482
+ <p>You can verify the post-processor’s effect by using one
483
+ of two methods:</p>
484
+
485
+ <ol class="arabic">
486
+ <li>
487
+ <p>Pipe a saved post into the program:</p>
488
+
489
+ <p><strong>:~$ /usr/local/bin/[post-processor] &lt;
490
+ [test-article]</strong>
491
+ </p>
492
+
493
+ <p>This will show the modified article, and you can
494
+ pipe it into another file for further testing.</p>
495
+ </li>
496
+
497
+ <li>
498
+ <p>Post directly to a test newsgroup (e.g., alt.test).
499
+ This is essential before posting to real newsgroups,
500
+ especially when the post-processor will alter the
501
+ article.</p>
502
+ </li>
503
+ </ol>
504
+ </section>
505
+
506
+ <section id="source-code">
507
+ <h3>Source Code</h3>
508
+
509
+ <p>The gem file for the program, available via the gem
510
+ utility or <a class="reference external" href=
511
+ "https://rubygems.org/gems/flnews_post_proc">rubygems.org</a>,
512
+ contains all the source code and documentation (this page
513
+ included). To extract it, do the following:</p>
514
+
515
+ <ol class="arabic simple">
516
+ <li>
517
+ <p>Extract the gem file: <cite>tar -xf
518
+ flnews_post_proc-0.1.gem</cite></p>
519
+ </li>
520
+
521
+ <li>
522
+ <p>Uncompress the data archive: <cite>gunzip
523
+ data.gz</cite></p>
524
+ </li>
525
+
526
+ <li>
527
+ <p>Extract the data archive: <cite>tar -xf
528
+ data.tar</cite></p>
529
+ </li>
530
+ </ol>
531
+
532
+ <p>This will create the directories <cite>bin</cite>,
533
+ <cite>doc</cite>, and <cite>lib</cite>.</p>
534
+ </section>
535
+
536
+ <section id="license">
537
+ <h3>License</h3>
538
+
539
+ <p>The <strong>flnews_post_proc</strong> is distributed
540
+ under the <a class="reference external" href=
541
+ "https://www.wtfpl.net/about/">WTFPL-2.0</a> or later
542
+ License. For the complete license text, visit <a class=
543
+ "reference external" href=
544
+ "http://www.wtfpl.net/txt/copying/">http://www.wtfpl.net/txt/copying/</a>
545
+ or refer to the license file in the documentation directory
546
+ of the gem.</p>
547
+ </section>
548
+
549
+ <section id="author">
550
+ <h3>Author</h3>
551
+
552
+ <p><strong>flnews_post_proc</strong> has been developed by
553
+ Michael Uplawski &lt;<a class="reference external" href=
554
+ "mailto:michael.uplawski@uplawski.eu">michael.uplawski@uplawski.eu</a>&gt;</p>
555
+ </section>
556
+ </section>
557
+
558
+ <section id="section-1">
559
+ <h2>Ω</h2>
560
+ </section>
561
+ </main>
277
562
  </body>
278
563
  </html>