This repository has been archived by the owner on Jan 3, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
433 lines (290 loc) · 13.3 KB
/
README
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
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
whatsnewfm 0.7.1
~~~~~~~~~~~~~~~~
2009/05/30
(c) 2000-2009 by Christian Garbs <mitch@cgarbs.de>
Joerg Plate <Joerg@Plate.cx>
Dominik Brettnacher <dominik@brettnacher.org>
Pedro Melo Cunha <melo@isp.novis.pt>
Matthew Gabeler-Lee <msg2@po.cwru.edu>
Bernd Rilling <brilling@ifsw.uni-stuttgart.de>
Jost Krieger <Jost.Krieger@ruhr-uni-bochum.de>
Licensed under GNU GPL (see COPYING for details)
Contents
~~~~~~~~
Description . . . . . . . . . . . . . . 1
Contact . . . . . . . . . . . . . . . . 2
Requirements . . . . . . . . . . . . . 3
Usage . . . . . . . . . . . . . . . . . 4
The configuration file . . . . . . . . 5
The "hot" database . . . . . . . . . . 6
Data import from v0.4.x . . . . . . . . 7
Manpage . . . . . . . . . . . . . . . . 8
Download . . . . . . . . . . . . . . . 9
Thanks . . . . . . . . . . . . . . . . 10
Feel free to contact the author at <mitch@cgarbs.de>
for any questions or suggestions.
[1] Description
~~~~~~~~~~~~~~~
whatsnewfm is a utility to filter the daily newsletter from
http://freecode.com
The main purpose is to cut the huge newsletter to a smaller size by
only showing items that you didn't see before.
The items already seen will be stored in a database. After some time,
the items expire and will be shown again the next time they are
included in a newsletter.
If you find an item that you consider particularly useful, you can add
it to a "hot" list. Items in the hot list are checked for updates so
that you don't miss anything about your favourite programs.
[2] Contact
~~~~~~~~~~~
Please contact me by email: Christian Garbs <mitch@cgarbs.de>
If you encounter a bug, please tell me. Known bugs will be listed in
the issue tracker and you might find a cure for it in the git
repository if I have not yet released a new version. See [9] for
further information.
[3] Requirements
~~~~~~~~~~~~~~~~
* procmail, maildrop or something else (otherwise you will have to
send every newsletter through the filter by hand)
* perl, sendmail or sendmail-compatible mailer
* BerkeleyDB Perl module
[4] Usage
~~~~~~~~~
1) Extract the archive to a directory of your favour.
2) Copy the file "whatsnewfmrc.sample" to "~/.whatsnewfmrc" and edit
it to your needs. See [4] for details.
3) Add the following lines to your ~/.procmailrc to send all
newsletters through the whatsnewfm filter:
:0 w :
* ^Subject: Freecode Daily Update:
* !^X-Loop:.*whatsnewfm
| /path/to/whatsnewfm.pl
Alternatively, if you are using maildrop, you need to add something
like this to your ~/.mailfilter:
if (/^Subject: Freecode Daily Update:/ && !/^X-Loop:.*whatsnewfm/)
{
xfilter "/path/to/whatsnewfm.pl"
}
4) Add whatsnewfm to your hot database: "whatsnewfm.pl add whatsnewfm"
5) Check your setup by mailing the file "welcome" to yourself with
"Freecode Daily Update: TEST" as subject:
mail -s "Freecode Daily Update: TEST" your@email < welcome
You should then receive an update information for the whatsnewfm
application. This is good. Otherwise, there is an error in your
setup.
6) If you're not yet subscribed to the freecode newsletter, do so at
http://freecode.com
7) If one of the new applications is interesting to you, then add
it to your "hot" database. See [6] for details.
[5] The configuration file
~~~~~~~~~~~~~~~~~~~~~~~~~~
The configuration file is a plain text file in your home directory
named ".whatsnewfmrc". The location and name of the configuration
file can be changed with the -c option. Lines beginning with "#" are
treated as comments. Other lines consist of keywords and values:
KEYWORD=VALUE
You need to specify the following keywords:
* MAILTO=email@address
This is the eMail address to which the filtered newsletter and the
updates of "hot" programs are sent.
* DB_NAME=~/.whatsnewfm.db
This is the filename where the "hot" and "old" databases are kept.
* EXPIRE=12
After this time (in months) an entry from the "old" database expires.
* UPDATE_MAIL=single
All updates of "hot" applications from one newsletter are sent
in one single eMail. If you would like to have a unique eMail for
every application, set this key to "multiple" instead of "single".
* SUMMARY_AT=bottom
Prints the summary at the bottom of a processed newsletter. If you
want the summary to be printed at the top, set this to "top".
Default value is 'bottom'.
* LIST_SKIPPED=no
Show a list the skipped news items (low score and already seen).
Possible values are 'no' (no list), 'bottom' or 'top'.
Default value is 'no'.
* MAIL_CMD=/usr/lib/sendmail
This is the location of your sendmail command (or any command
that can be called in the same way as sendmail).
* MAIL_OPT=-oi -t
Your sendmail command is called with these parameters.
* SCORE=<score> <TAB> <regexp>
This enables scoring of newsletter items (release text and
articles). This keyword can appear multiple times (it may also be
omitted). Each value consists of a score (either a negative or
positive integer value) and a regular expression, both separated by
a tabulator (\t). If the regular expression is found within the
descriptive text of a news item, the score value is added to the
score of that news item. Regular expressions are matched
case-insensitive. The news items then are listed according to their
score values. To learn more about perl regexps, confer the
"perldoc perlre" help page.
* CATSCORE=<score> <TAB> <regexp>
This works exactly like the SCORE keyword, except that not the
release text but the Freshmeat Category fields are scored.
Try "CATSCORE=+100<TAB>Editorial" to mark all editorial articles.
* LICSCORE=<score> <TAB> <regexp>
This works exactly like the SCORE keyword, except that not the
release text but the Freshmeat License fields are scored.
Try "LICSCORE=-50<TAB>Proprietary" to score down all proprietary
software.
* SCORE_MIN=-999
Newsletter items with a score lower than this value will not be
displayed.
If an essential keyword is missing, you will get a message like this:
* using default value for "MAIL_OPT"
Add the keyword to your configuration file to get rid of the message.
[6] The "hot" database
~~~~~~~~~~~~~~~~~~~~~~
This database contains the applications that you are interested in.
You will be informed of every update within these applications. The
applications are identified by the "project id" that is shown in the
parsed freecode newsletter.
To see what is in the database, just may use "less" or "cat" on the
database file (although the 'view' command (see below) should be used,
that's what I wrote it for).
To edit the database, please use the whatsnewfm commands as shown
below - DON'T edit the files with a text editor. Some strange things
might happen when you edit the database while whatsnewfm is running in
the background (your text editor won't recognize a lock on the
database).
These examples use the project id "whatsnewfm" - in case you forgot:
That's the program you're just reading about.
To view all applications that are in the database, just type this:
whatsnewfm.pl view
This just prints the whole database file on stdout. If you want to
cut the output down to some entries, you can add a regular expression
to the view command (instead of using grep):
whatsnewfm.pl view ^li
This will print all entries entries starting with "li".
The regular expression is always matched case-insensitive.
To add an application to the database, just type this:
whatsnewfm.pl add whatsnewfm
You can enter a comment to help you remember what this application
does (good for project ids that are acronymns):
whatsnewfm.pl add whatsnewfm Parses the freecode newsletter.
If you want to enter multiple applications (eg copy'n'paste while
reading the new freecode newsletter) you can start whatsnewfm like
this:
whatsnewfm.pl add
whatsnewfm.pl then reads from stdin. Every line must begin with a
project id. Comments might follow after a whitespace character
(space, tab or the like). If you're finished, press CTRL-D. All
entered applications will be added to the "hot" database.
Deleting applications is as easy as adding applications. You can give
the project ids directly (just one or even more):
whatsnewfm.pl del whatsnewfm
You can also give the ids on stdin (like the add command):
whatsnewfm.pl del
This time multiple project ids are allowed on one line when they are
separated by whitespaces.
[7] Data import from v0.4.x
~~~~~~~~~~~~~~~~~~~~~~~~~~~
To import your "hot" database from an older version, run this small
shell script. Replace ~/.whatsnewfm.db.hot with the filename of your
"hot" database from version 0.4.x.
while read LINE ; do
./whatsnewfm.pl add $LINE
done < ~/.whatsnewfm.db.hot
To import your "old" database, use this Perl script. Change
$new_database and $old_database to the filenames you actually use.
#!/usr/bin/perl
use warnings;
use strict;
use BerkeleyDB::Hash;
my $new_database = "~/.whatsnewfm.db";
my $old_database = "~/.whatsnewfm.db.old";
my $count = 0;
$new_database =~ s/^~/$ENV{HOME}/;
$old_database =~ s/^~/$ENV{HOME}/;
my $db_env = new BerkeleyDB::Env, BerkeleyDB::DB_INIT_CDB;
my %hash;
tie %hash, 'BerkeleyDB::Hash',
{ -Filename => $new_database,
-Subname => "old",
-Flags => BerkeleyDB::Hash::DB_CREATE
};
open OLD, "<$old_database" or die "can't open `$old_database': $!";
while (<OLD>) {
my ($p, $t) = split /\t/;
$hash{$p} = $t;
$count++;
}
close OLD or die "can't close `$old_database': $!";
untie %hash;
print "$count old projects imported.\n";
[8] Manpage
~~~~~~~~~~~
A manpage is included in the whatsnewfm Perl script. You can extract
it with the pod2* commands. For example:
pod2man whatsnewfm.pl whatsnewfm.pl.1
pod2text whatsnewfm.pl whatsnewfm.txt
pod2html whatsnewfm.pl whatsnewfm.html
[9] Download
~~~~~~~~~~~~
* You can download new and old versions of whatsnewfm from these
locations:
http://www.cgarbs.de/whatsnewfm.en.html
http://whatsnewfm.sourceforge.net/
* Unreleased development versions are available from the git
repository:
web: http://github.com/mmitch/whatsnewfm
clone: git://github.com/mmitch/whatsnewfm.git
* Issue tracking is currently switchen over from ditz to github:
http://github.com/mmitch/whatsnewfm/issues
http://www.cgarbs.de/ditz/whatsnewfm/
[10] Thanks
~~~~~~~~~~~
* Again many thanks to everybody who informed me when the newsletter
format changed again in March 2009. As I lost my newsletter
subscription during the Freshmeat relaunch, I really didn't notice
myself.
* Bernd Rilling sent a patch for the newletter format mentioned above
(sourceforge bug #2691997, fixed in v0.7.0).
* Jost Krieger sent a patch to score the license of releases
(included in v0.7.0).
* Dave Woolaway suggested the use of multiline regexp matches for
scoring (sourceforge feature request #930403, included in v0.6.5).
* Matthew Gabeler-Lee <msg2@po.cwru.edu> wrote a patch to fix '=20'
appearing in mails sent by whatsnewfm (sourceforge bug #891520,
fixed in v0.6.4).
* scottbbbb pointed out that the sendmail options should be
configurable (sourceforge bug #728895, fixed in v0.6.3,
backported to v0.4.15).
* Scott reported a bug with multiline subjects within the newsletter
(sourceforge bug #726261, fixed in v0.6.2, backported to v0.4.14).
* Josef 'Jupp' Schugt <jupp@gmx.de> made some annotations to the
expire algorithm for the 'old' database (changes included on v0.6.2
and backported to v0.4.14).
* Roger H. Goun <rgoun at sourceforge> reported a bug in the RPMs of
v0.4.12.
* Matthias Kluwe <mkluwe@web.de> discovered and fixed the warnings
under Perl 5.8.0 (fixed in v0.4.11). He also made some annotations
to the README (included in v0.4.4).
* Edelhard Becker <becker@edelhard.de> was the first to inform me
about the format change that was fixed in v0.4.10.
* Nikolaus Filus <NFilus@gmx.net> requested the new features in v0.4.9.
* Jost Krieger <Jost.Krieger@ruhr-uni-bochum.de> noticed and fixed the
missing Categories in the 'hot' mails (fixed in v0.4.7).
* Francisco <frandebo@latt.if.usp.br> suggested the scoring of
Freshmeat categories (included in v0.4.6).
* Pedro Melo Cunha <melo@isp.novis.pt> sent a patch to move the
newsletter summary to the top of the mail (included in v0.4.3).
* Eugen Dedu <dedu@ese-metz.fr> reported the missing Project ID in
"hot" mails (fixed in v0.4.3). He also suggested to include the
comments from the "hot" database in an update notification.
* Dominik Brettnacher <dominik@brettnacher.org> sent a patch to
include the freshmeat editorials into the list of new applications
(included in v0.2.5).
* Joerg Plate <Joerg@Plate.cx> sent a patch for those annoying
warnings with Perl 5.6 (fixed in v0.2.4).
* Piotr Sieklucki <psiekl@venus.ci.uw.edu.pl> provided the initial
version of the whatsnewfm RPM and .deb packages. He also suggested
the SCORE_MIN feature and maintained the mirror at wombat.eu.org for
some time.
* All those people who told me that whatsnewfm didn't work any more
when freshmeat changed the newsletter format. Apparently someone
really uses this piece of software :-)
* Michael Reinsch <mr@uue.org> for keeping on asking and not being
convinced by my wrong thoughts. Only because of him versions beyond
v0.0.1 do exist.