Compare commits

...

71 commits

Author SHA1 Message Date
Thomas Hochstein 09d51964aa Update POD documentation (URLs).
Signed-off-by: Thomas Hochstein <thh@thh.name>
2024-05-27 01:01:08 +02:00
Thomas Hochstein 99d4cbcae2 Add README.
Signed-off-by: Thomas Hochstein <thh@thh.name>
2024-05-26 00:33:07 +02:00
Thomas Hochstein 4fe0c455ea Change mail address.
Signed-off-by: Thomas Hochstein <thh@thh.name>
2020-08-23 22:47:56 +02:00
Thomas Hochstein 15dd22593e Don't warn for missing optional encoding setting.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2017-08-19 16:21:14 +02:00
Thomas Hochstein 6e49580a28 Mark yapfaq.pl executable.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2017-08-19 16:10:43 +02:00
Thomas Hochstein 3b06ebf93a Add Charset setting to config file.
Fixes .

Signed-off-by: Thomas Hochstein <thh@inter.net>
2017-08-19 15:52:23 +02:00
Thomas Hochstein cc74e2f92b Bump version, copyright; update URLs.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2017-08-19 15:32:13 +02:00
Thomas Hochstein 04eac1b541 Fix typo in POD.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2012-10-12 20:12:11 +02:00
Thomas Hochstein 9224368882 Release 0.9.1 (Maintenance Release)
Add changelog entry.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-11-01 18:01:32 +01:00
Thomas Hochstein 0b68926d7c Test mode: Add X-Supersedes only if Supersedes would be set.
Fixes .

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-10-31 18:42:52 +01:00
Thomas Hochstein 373681d034 Bump version number to 0.91.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-10-31 18:42:17 +01:00
Thomas Hochstein bd3a4c3841 Release 0.9
Add changelog entries.
Bump version number.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-09-11 23:58:15 +02:00
Thomas Hochstein f5a291096e Drop use of Fcntl (not needed).
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-06-15 22:30:11 +02:00
Thomas Hochstein c4765a39f3 Changed packaging.
- Drop .yapfaqrc and yapfaq.cfg in favor of .yapfaqrc.sample
  and yapfaq.cfg.sample; rename test.txt to sample.txt.
- Change contents of these files to reflect the new names.
- Update some defaults, change sample.txt contents to English.
- Add "INSTALLATION" chapter to documentation.

Fixes .

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-05-15 19:16:40 +02:00
Thomas Hochstein 8f65a0a519 Change default Message-ID format.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-05-15 19:04:24 +02:00
Thomas Hochstein b146f21475 Change: Modify headers for test posts.
- Change MID so you can do multiple tests.
- Replace Supersedes with X-Supersedes so you do not delete
  postings while testing.
- Add remark ("This is a test message.").
- Change documentation accordingly.

Fixes .

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-05-15 17:22:20 +02:00
Thomas Hochstein 3b2e5e066d Change: Drop %LM from subject if Last-Modified is not found.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-05-15 16:36:52 +02:00
Thomas Hochstein b16eb1aec4 Fix: Accept leading/trailing whitespace for Last-modified pseudo header.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-05-15 16:32:58 +02:00
Thomas Hochstein dc66bfa3f5 Bump version (0.9-prelease).
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-05-14 22:15:31 +02:00
Thomas Hochstein 994d975969 Release 0.8.1 (Maintenance Release)
Add changelog entries.
Bump version number.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-05-14 22:04:00 +02:00
Thomas Hochstein ba8ae1cfe5 Fix broken implementation of "Program" in .yapfaqrc.
Fixes .

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-05-14 21:58:15 +02:00
Thomas Hochstein cdfec198d6 Release 0.8
Add changelog entries.
Bump version number.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-05-13 22:00:21 +02:00
Thomas Hochstein 2d8e5cdbc7 Documentation: Add Git repository and bug tracker.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-05-13 19:33:40 +02:00
Thomas Hochstein bdbb9d7043 Making use of Getopt::Std's --help and --version.
Fixes .

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-05-13 19:33:25 +02:00
Thomas Hochstein 39cb5672df Add "Program" to .yapfaqrc.
Fixes .

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-05-13 19:31:49 +02:00
Thomas Hochstein 0e741504fe Drop PGP support.
You may use tinews.pl from
ftp://ftp.tin.org/tin/tools/tinews.pl instead.

Fixes .

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-05-13 19:24:44 +02:00
Thomas Hochstein 8f067a2ffb Fix: Consistency check for MID-Format fixed (regexp).
Signed-off-by: Thomas Hochstein <thh@inter.net>

Fix.
2010-04-14 23:31:37 +02:00
Thomas Hochstein 13ce8c26a3 Add: MID-Format may now contain %t for a Unix timestamp.
%t will be replaced by the number of seconds since the epoch.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-04-14 23:31:23 +02:00
Thomas Hochstein 605916ef61 Add comments pointing to .yapfaqrc to source.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-04-14 10:10:28 +02:00
Thomas Hochstein 9817f98a91 Fix: Add "-V", NNTPSERVER to documentation, add more examples.
Added examples for -s and -c.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-04-14 10:02:48 +02:00
Thomas Hochstein b802358a60 readconfig(): Add file name to verbose output.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-04-14 09:38:23 +02:00
Thomas Hochstein 7ef63844b5 Reset default for NNTPServer to "unset".
Since yapfaq fill fall back to Perl's build-in defaults,
that should be no problem; furthermore user may now
override this setting via .yapfaqrc without changing
the code.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-04-14 09:11:45 +02:00
Thomas Hochstein e16539c99c Change sample yapfaq.cfg (mark optional settings).
Optional settings are mostly commented out.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-04-14 09:10:05 +02:00
Thomas Hochstein 647af2ea07 Bump version (0.8-prelease).
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-04-14 09:07:19 +02:00
Thomas Hochstein ace701c4a6 Release 0.7
Add changelog entries.
Bump version number.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-04-14 08:00:30 +02:00
Thomas Hochstein ac69c3ee90 readconfig(): Make mid-format optional.
Set defaults for expires and mid-format when they're invalid
(defaults were already set in postfaq() if undefined).

Change documentation accordingly; make it more clear if
parameters are optional or mandatory.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-04-13 23:59:43 +02:00
Thomas Hochstein 2ef9b9cd23 Fix: Wrong text for content check (configuration file).
Check for Message-ID had text from check for Expires.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-04-12 00:20:48 +02:00
Thomas Hochstein 5a6670c7ff Fix: Save status information only after successful posting.
* New Function: updatestaus
  Move status information save to updatestatus.

* post() now returns exit code.

* postfaq() will update status information only
  when post() was successful.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-04-11 23:23:12 +02:00
Thomas Hochstein 227afd47f6 Update documentation for .rcfile.
Add the according sections to the POD documentation.
Fix some wording.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-04-10 22:07:18 +02:00
Thomas Hochstein 86c0a10044 Add option '-c': define another .rcfile.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-04-10 22:07:08 +02:00
Thomas Hochstein 6f235aca38 Add sample .yapfaqrc with defaults.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-04-10 22:06:59 +02:00
Thomas Hochstein d60c2d5fdf Add rcfile (.yapfaqrc) for configuration.
All configuration data is read from .yapfaqrc
with defaults set in yapfaq.pl

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-04-10 22:06:49 +02:00
Thomas Hochstein 2507947f17 Moved configuration to a hash (%Config).
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-04-10 22:05:40 +02:00
Thomas Hochstein b855559ee3 Add option '-s': pipe article to script.
Use an external program to post - or otherwise handle -
the article.

Amend documentation.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-04-10 02:14:59 +02:00
Thomas Hochstein 55bfbd3cde -t CONSOLE: Change delimiter.
No leading \n is necessary.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-04-10 01:43:19 +02:00
Thomas Hochstein b955062245 Add some more comments.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-04-10 01:42:25 +02:00
Thomas Hochstein a052296f3b Add option '-V': print version and copyright information.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-04-10 01:05:55 +02:00
Thomas Hochstein ae3b1b7906 -h: Replace version/usage information with man page.
Feed script to perldoc when called with -h.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-04-10 01:05:25 +02:00
Thomas Hochstein d69ba0bb34 Change: Authenticate only if $NNTPUser is set.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-04-10 00:49:24 +02:00
Thomas Hochstein dbca4ad8a1 Add checks for mandatory content in configuration file.
Enhance and optimize existing checks.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-04-08 08:33:01 +02:00
Thomas Hochstein 40847f71a0 Add check for MID-Format and fallback to FQDN.
Uses hostfqdn from Net::Domain.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-04-08 08:30:21 +02:00
Thomas Hochstein 366322b2c8 Code optimisation (verbose output).
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-04-08 08:00:04 +02:00
Thomas Hochstein 6b42155376 Release 0.6.2
Add changelog entries.
Bump version number.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-02-26 09:33:32 +01:00
Thomas Hochstein 7823ece977 Fix default for Expires.
Bug introduced in v0.6.1.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-02-26 09:29:01 +01:00
Thomas Hochstein fd0f4fcfae Release 0.6.1
Add changelog entries.
Bump version number.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-02-26 08:33:35 +01:00
Thomas Hochstein 5ddba442da Fix: Test mode must not update status information.
Also fix runtime warning concerning expires.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-02-26 08:28:06 +01:00
Thomas Hochstein afd3e33441 Release 0.6
Add changelog entries.
Bump version number.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-02-25 19:32:51 +01:00
Thomas Hochstein c2cafcca00 Merge branch 'documentation' 2010-02-25 19:22:28 +01:00
Thomas Hochstein a0605478dd Merge branch 'Options'
Conflicts:
	yapfaq.pl
2010-02-25 19:22:15 +01:00
Thomas Hochstein 272b024313 Add documentation in POD format.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-02-25 17:44:49 +01:00
Thomas Hochstein 0c6ebe7841 Add variable expiry.
* New Function: calcdelta

  Move date calculation for new posting date to
  calcdelta

* Add 'Expires' to yapfaq.cfg

  Parse 'Expires'
  Use calcdelta to calculate expiry.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-02-25 16:21:18 +01:00
Thomas Hochstein 4251e5451c Add commandline options.
Using Getopt::Std.

Implement option '-h': display version and usage information.

Implement option '-v': Print progress information to STDOUT
on reading the configuration, skipping a FAQ, preparing it
for posting, posting it and writing status information to disk.

Implement option '-f': limit operation to the given project
name. Skip parsing all other information from yapfaq.cfg,
skip posting all other FAQs.

Add option '-d': 'dry run', simulation mode: nothing is posted.

Add option '-p': 'post anyway', files are unconditionally
posted irrespective of Posting-Frequency settings.

Add option '-t <newsgroups>': 'test mode', post to
(an)other newsgroup(s) given on the command line or to
STDOUT ('console').

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-02-25 16:19:02 +01:00
Thomas Hochstein d196f6ed59 Cleanup on yapfaq.cfg
Reformat, translate to English language, add descriptions.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-02-25 16:16:49 +01:00
Thomas Hochstein 5f5909d225 Change: Default $NNTPServer to 'localhost'
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-02-25 15:15:57 +01:00
Thomas Hochstein 744071463a Change: Add script name and Warning/Error to warn() and die() output.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-02-25 09:23:14 +01:00
Thomas Hochstein 1ee30cc37f Add .gitignore.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-02-24 22:17:54 +01:00
Thomas Hochstein 114be30251 Change: Inform user when writing to ERROR.dat.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-02-21 19:14:15 +01:00
Thomas Hochstein c2f107a55e Change: Don't output line number if .cfg file can't be opened.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-02-21 18:56:06 +01:00
Thomas Hochstein 7aaba0e0ae Update header/introduction, bump version/copyright information.
Fix typo/language in header/introduction.
Add new author / copyright information.
Bump version to 0.6-unreleased.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-02-21 18:51:39 +01:00
Thomas Hochstein 8e1cb154c3 Fix: Accept case-insensitive Last-modified pseudo header.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-02-21 18:39:05 +01:00
Thomas Hochstein 15dd764aad Don't use PGP by default.
Change default: Do not sign by default.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2010-02-21 18:38:27 +01:00
9 changed files with 1049 additions and 279 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
TODO

6
.yapfaqrc.sample Normal file
View file

@ -0,0 +1,6 @@
NNTPServer = 'localhost'
NNTPUser = ''
NNTPPass = ''
Sender = ''
ConfigFile = 'yapfaq.cfg.sample'
Program = ''

249
ChangeLog
View file

@ -1,3 +1,252 @@
yapfaq 0.10 (unreleased)
* Add: Charset definition.
Fixes #29.
* Mark yapfaq.pl executable.
* Change mail address.
Version 0.9.1
* Fix: Test mode: Add X-Supersedes only if Supersedes would be set.
Fixes #28.
Thomas Hochstein <thh@inter.net> Sun Oct 31 18:42:52 2010 +0100
Version 0.9
* Drop use of Fcntl (not needed).
Thomas Hochstein <thh@inter.net> Tue Jun 15 22:30:11 2010 +0200
* Changed packaging.
- Drop .yapfaqrc and yapfaq.cfg in favor of .yapfaqrc.sample
and yapfaq.cfg.sample; rename test.txt to sample.txt.
- Change contents of these files to reflect the new names.
- Update some defaults, change sample.txt contents to English.
- Add "INSTALLATION" chapter to documentation.
Fixes #7.
Thomas Hochstein <thh@inter.net> Sat May 15 19:16:40 2010 +0200
* Change default Message-ID format.
Thomas Hochstein <thh@inter.net> Sat May 15 19:04:24 2010 +0200
* Change: Modify headers for test posts.
- Change MID so you can do multiple tests.
- Replace Supersedes with X-Supersedes so you do not delete
postings while testing.
- Add remark ("This is a test message.").
- Change documentation accordingly.
Fixes #6.
Thomas Hochstein <thh@inter.net> Sat May 15 17:22:20 2010 +0200
* Change: Drop %LM from subject if Last-Modified is not found.
Thomas Hochstein <thh@inter.net> Sat May 15 16:36:52 2010 +0200
Version 0.8.2
* Fix: Accept leading/trailing whitespace for Last-modified pseudo header.
Fixes #5.
Thomas Hochstein <thh@inter.net> Sat May 15 16:32:58 2010 +0200
Version 0.8.1
* Fix broken implementation of "Program" in .yapfaqrc.
Fixes #4.
Thomas Hochstein <thh@inter.net> 2010-05-14 21:58:15
Version 0.8
* Documentation: Add Git repository and bug tracker.
Thomas Hochstein <thh@inter.net> Thu May 13 19:21:05 2010 +0200
* Making use of Getopt::Std's --help and --version.
Fixes #3.
Thomas Hochstein <thh@inter.net> Thu May 13 19:33:25 2010 +0200
* New: Add "Program" to .yapfaqrc.
Fixes #2.
Thomas Hochstein <thh@inter.net> Thu May 13 19:31:49 2010 +0200
* Change: Drop PGP support.
You may use tinews.pl from
ftp://ftp.tin.org/tin/tools/tinews.pl instead.
Fixes #1.
Thomas Hochstein <thh@inter.net> Thu May 13 19:24:44 2010 +0200
* Fix: Consistency check for MID-Format fixed (regexp).
Thomas Hochstein <thh@inter.net> Wed Apr 14 23:17:16 2010 +0200
* New: MID-Format may now contain %t for a Unix timestamp.
%t will be replaced by the number of seconds since the epoch.
Thomas Hochstein <thh@inter.net> Wed Apr 14 23:18:04 2010 +0200
* Documentation changes
- Change sample yapfaq.cfg (mark optional settings).
Optional settings are mostly commented out.
Thomas Hochstein <thh@inter.net> Wed Apr 14 09:10:05 2010 +0200
- Fix: Add "-V", NNTPSERVER to documentation, add more examples.
Added examples for -s and -c.
Thomas Hochstein <thh@inter.net> Wed Apr 14 10:02:48 2010 +0200
- Add comments pointing to .yapfaqrc to source.
Thomas Hochstein <thh@inter.net> Wed Apr 14 10:10:28 2010 +0200
* readconfig(): Add file name to verbose output.
Thomas Hochstein <thh@inter.net> Wed Apr 14 09:38:23 2010 +0200
* Change: Reset default for NNTPServer to "unset".
Since yapfaq fill fall back to Perl's build-in defaults,
that should be no problem; furthermore user may now
override this setting via .yapfaqrc without changing
the code.
Thomas Hochstein <thh@inter.net> Wed Apr 14 09:11:45 2010 +0200
Version 0.7
* Change: readconfig(): Make mid-format optional.
Set defaults for expires and mid-format when they're invalid
(defaults were already set in postfaq() if undefined).
Change documentation accordingly; make it more clear if
parameters are optional or mandatory.
Thomas Hochstein <thh@inter.net> Tue Apr 13 23:59:43 2010 +0200
* Fix: Save status information only after successful posting.
- New Function: updatestaus
Move status information save to updatestatus.
- post() now returns exit code.
- postfaq() will update status information only
when post() was successful.
Thomas Hochstein <thh@inter.net> Sat Apr 10 23:19:44 2010 +0200
* New: Add option '-s': pipe article to script.
Use an external program to post - or otherwise handle -
the article.
Amend documentation.
Thomas Hochstein <thh@inter.net> Sat Apr 10 02:14:59 2010 +0200
* New: runtime configuration
- Moved configuration to a hash (%Config).
Thomas Hochstein <thh@inter.net> Wed Apr 7 22:09:15 2010 +0200
- Add rcfile (.yapfaqrc) for configuration.
All configuration data is read from .yapfaqrc
with defaults set in yapfaq.pl
Thomas Hochstein <thh@inter.net> Sat Apr 10 22:02:24 2010 +0200
- Add sample .yapfaqrc with defaults.
Thomas Hochstein <thh@inter.net> Wed Apr 7 23:16:20 2010 +0200
- Add option '-c': define another .rcfile.
Thomas Hochstein <thh@inter.net> Thu Apr 8 07:41:43 2010 +0200
- Update documentation for .rcfile.
Add the according sections to the POD documentation.
Fix some wording.
Thomas Hochstein <thh@inter.net> Sat Apr 10 02:17:00 2010 +0200
* Small changes.
-t CONSOLE: Change delimiter.
No leading \n is necessary.
Add some more comments.
Thomas Hochstein <thh@inter.net> Sat Apr 10 01:43:19 2010 +0200
* Add option '-V': print version and copyright information.
Thomas Hochstein <thh@inter.net> Thu Apr 8 07:36:11 2010 +0200
* Change: -h: Replace version/usage information with man page.
Feed script to perldoc when called with -h.
Thomas Hochstein <thh@inter.net> Thu Apr 8 06:21:05 2010 +0200
* Change: Authenticate only if $NNTPUser is set.
Thomas Hochstein <thh@inter.net> Sat Apr 10 00:49:24 2010 +0200
* Add check for MID-Format and fallback to FQDN.
Uses hostfqdn from Net::Domain.
Thomas Hochstein <thh@inter.net> Thu Apr 8 08:33:01 2010 +0200
* Add checks for mandatory content in configuration file.
Enhance and optimize existing checks.
Thomas Hochstein <thh@inter.net> Thu Apr 8 08:30:21 2010 +0200
* Code optimisation (verbose output).
Thomas Hochstein <thh@inter.net> Thu Apr 8 08:00:04 2010 +0200
Version 0.6.2
* Fix default for Expires.
Bug introduced in v0.6.1.
Thomas Hochstein <thh@inter.net> Fri Feb 26 09:29:01 2010 +0100
Version 0.6.1
* Fix: Test mode must not update status information.
Also fix runtime warning concerning expires.
Thomas Hochstein <thh@inter.net> Fri Feb 26 08:28:06 2010 +0100
Version 0.6
* Add documentation in POD format.
Thomas Hochstein <thh@inter.net> Thu Feb 25 17:00:07 2010 +0100
* Add commandline options.
- Using Getopt::Std.
- Implement option '-h':
Display version and usage information.
- Implement option '-v':
Print progress information to STDOUT on reading the configuration,
skipping a FAQ, preparing it for posting, posting it and writing
status information to disk.
- Implement option '-f':
Limit operation to the given project name. Skip parsing all other
information from yapfaq.cfg, skip posting all other FAQs.
- Add option '-d':
'dry run', simulation mode: nothing is posted.
- Add option '-p':
'post anyway', files are unconditionally posted irrespective of
Posting-Frequency settings.
- Add option '-t <newsgroups>':
'test mode', post to (an)other newsgroup(s) given on the command
line or to STDOUT ('console').
Thomas Hochstein <thh@inter.net> Thu Feb 25 19:22:15 2010 +0100
* Add variable expiry.
- New Function: calcdelta
Move date calculation for new posting date to
calcdelta.
- Add 'Expires' to yapfaq.cfg
Parse 'Expires'.
Use calcdelta to calculate expiry.
Thomas Hochstein <thh@inter.net> Thu Feb 25 12:55:04 2010 +0100
* Cleanup on yapfaq.cfg
Reformat, translate to English language, add descriptions.
Thomas Hochstein <thh@inter.net> Thu Feb 25 16:16:49 2010 +0100
* Change handling of warnings/errors.
Don't output line number if .cfg file can't be opened.
Inform user when writing to ERROR.dat.
Add script name and Warning/Error to warn() and die() output.
Thomas Hochstein <thh@inter.net> Thu Feb 25 09:23:14 2010 +0100
* Fix: Accept case-insensitive Last-modified pseudo header.
Thomas Hochstein <thh@inter.net> Sun Feb 21 18:39:05 2010 +0100
* Change defaults
Don't use PGP by default.
Default $NNTPServer to 'localhost'
Thomas Hochstein <thh@inter.net> Thu Feb 25 15:15:57 2010 +0100
* Update header/introduction, bump version/copyright information.
Fix typo/language in header/introduction.
Add new author / copyright information.
Bump version to 0.6-unreleased.
Thomas Hochstein <thh@inter.net> Sun Feb 21 18:51:39 2010 +0100
Version 0.5a
- Fixed bug in readconfig().

13
README.md Normal file
View file

@ -0,0 +1,13 @@
# yapfaq
**yapfaq** can post FAQs from text files to Usenet at configurable intervals and automatically adds the necessary headers.
## Description
With **yapfaq**, FAQs or other texts can be posted regularly (every x days, weeks, months or years) to one or more newsgroups. Posting frequency as well as the necessary headers - including the format of the `Message-ID:` headers that will be generated - can be defined in a configuration file. `Expires:` and `Supersedes:` will be set automatically by the script.
The text can either be posted via NNTP or piped to another programme (like `inews` or `tinews.pl`).
## More information
Please see the [distribution page](https://th-h.de/net/software/yapfaq/) (in German).

9
sample.txt Normal file
View file

@ -0,0 +1,9 @@
Last-modified: 2010-05-15
This is a test message.
Foo.
Bar.
That's quite enought, isn't it?

View file

@ -1,11 +0,0 @@
Last-modified: 2003-01-11
Dies ist ein Test-Artikel. Klasse, was?
Bla.
Noch mehr foo.
Bar.
Nu reicht's.

View file

@ -1,13 +0,0 @@
Name = 'testpost' #Name wird in der MID verwendet.
File = 'test.txt' #File mit dem Posting ($File.cfg enthält Daten über letztes Posting/MID, muß also am Anfang leer sein)
Posting-frequency = '1d' #Möglich sind d,w,m,y
From = 'test@domain.invalid' #Der From
Subject = 'No reply - Ignore' #Das Subject
NGs = 'de.test' #Die NGs
Fup2 = 'poster' #Fup2
MID-Format = '<%n-%d.%m.%y@domain.invalid>'#Die MID sieht so aus, %n ist der Name.
Supersede = yes
ExtraHeader = 'Approved: foo@dch-faq.de
X-Header: Some text' #Use this for custom headers like Approved.
# Weitere Postings mit "=====" abtrennen.

52
yapfaq.cfg.sample Normal file
View file

@ -0,0 +1,52 @@
# name of your project
Name = 'sample'
# file to post (complete body and pseudo-headers)
# ($File.cfg contains data on last posting and last MID)
File = 'sample.txt'
# how often your project should be posted
# use (d)ay OR (w)eek OR (m)onth OR (y)ear
Posting-frequency = '1d'
# time period after which the posting should expire
# use (d)ay OR (w)eek OR (m)onth OR (y)ear
# This setting is optional. Default: 3m
# Expires = '3m'
# header "From:"
From = 'John Doe <john-doe@example.com>'
# header "Subject:"
# (may contain "%LM" which will be replaced by the contents of the
# Last-Modified pseudo header).
Subject = 'test noreply ignore'
# comma-separated list of newsgroup(s) to post to
# (header "Newsgroups:")
NGs = 'de.test'
# header "Followup-To:"
# This setting is optional. Default: unset
# Fup2 = 'poster'
# Message-ID ("%n" is $Name)
# This setting is optional. Default: <%n-%y-%m-%d@YOURHOST>
# MID-Format = '<%n-%y-%m-%d@domain.invalid>'
# Character Encoding
# This setting is optional. Default: UTF-8
# Charset = ISO-8859-15
# Supersede last posting?
# This setting is optional. Default: unset
Supersede = yes
# extra headers (appended verbatim)
# use this for custom headers like "Approved:"
# This setting is optional. Default: unset
ExtraHeader = 'Approved: moderator@domain.invalid
X-Header: Some text'
# other projects may follow separated with "====="
# =====

974
yapfaq.pl Normal file → Executable file

File diff suppressed because it is too large Load diff