Compare commits
71 commits
Author | SHA1 | Date | |
---|---|---|---|
|
09d51964aa | ||
|
99d4cbcae2 | ||
|
4fe0c455ea | ||
|
15dd22593e | ||
|
6e49580a28 | ||
|
3b06ebf93a | ||
|
cc74e2f92b | ||
|
04eac1b541 | ||
|
9224368882 | ||
|
0b68926d7c | ||
|
373681d034 | ||
|
bd3a4c3841 | ||
|
f5a291096e | ||
|
c4765a39f3 | ||
|
8f65a0a519 | ||
|
b146f21475 | ||
|
3b2e5e066d | ||
|
b16eb1aec4 | ||
|
dc66bfa3f5 | ||
|
994d975969 | ||
|
ba8ae1cfe5 | ||
|
cdfec198d6 | ||
|
2d8e5cdbc7 | ||
|
bdbb9d7043 | ||
|
39cb5672df | ||
|
0e741504fe | ||
|
8f067a2ffb | ||
|
13ce8c26a3 | ||
|
605916ef61 | ||
|
9817f98a91 | ||
|
b802358a60 | ||
|
7ef63844b5 | ||
|
e16539c99c | ||
|
647af2ea07 | ||
|
ace701c4a6 | ||
|
ac69c3ee90 | ||
|
2ef9b9cd23 | ||
|
5a6670c7ff | ||
|
227afd47f6 | ||
|
86c0a10044 | ||
|
6f235aca38 | ||
|
d60c2d5fdf | ||
|
2507947f17 | ||
|
b855559ee3 | ||
|
55bfbd3cde | ||
|
b955062245 | ||
|
a052296f3b | ||
|
ae3b1b7906 | ||
|
d69ba0bb34 | ||
|
dbca4ad8a1 | ||
|
40847f71a0 | ||
|
366322b2c8 | ||
|
6b42155376 | ||
|
7823ece977 | ||
|
fd0f4fcfae | ||
|
5ddba442da | ||
|
afd3e33441 | ||
|
c2cafcca00 | ||
|
a0605478dd | ||
|
272b024313 | ||
|
0c6ebe7841 | ||
|
4251e5451c | ||
|
d196f6ed59 | ||
|
5f5909d225 | ||
|
744071463a | ||
|
1ee30cc37f | ||
|
114be30251 | ||
|
c2f107a55e | ||
|
7aaba0e0ae | ||
|
8e1cb154c3 | ||
|
15dd764aad |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
TODO
|
6
.yapfaqrc.sample
Normal file
6
.yapfaqrc.sample
Normal file
|
@ -0,0 +1,6 @@
|
|||
NNTPServer = 'localhost'
|
||||
NNTPUser = ''
|
||||
NNTPPass = ''
|
||||
Sender = ''
|
||||
ConfigFile = 'yapfaq.cfg.sample'
|
||||
Program = ''
|
249
ChangeLog
249
ChangeLog
|
@ -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
13
README.md
Normal 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
9
sample.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
Last-modified: 2010-05-15
|
||||
|
||||
This is a test message.
|
||||
|
||||
Foo.
|
||||
|
||||
Bar.
|
||||
|
||||
That's quite enought, isn't it?
|
11
test.txt
11
test.txt
|
@ -1,11 +0,0 @@
|
|||
Last-modified: 2003-01-11
|
||||
|
||||
Dies ist ein Test-Artikel. Klasse, was?
|
||||
|
||||
Bla.
|
||||
|
||||
Noch mehr foo.
|
||||
|
||||
Bar.
|
||||
|
||||
Nu reicht's.
|
13
yapfaq.cfg
13
yapfaq.cfg
|
@ -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
52
yapfaq.cfg.sample
Normal 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 "====="
|
||||
# =====
|
Loading…
Reference in a new issue