Skip to content

Commit

Permalink
Prepare release 1.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rseichter committed Mar 8, 2024
1 parent 0834260 commit 33bebfc
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 48 deletions.
7 changes: 4 additions & 3 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
Changelog
=========

Release 1.9.0 (TBA)
Release 1.9.0 (2024-03-08)

- The logic for on_update* has been largely rewritten. As a user-visible side effect, detailed
debugging information about 'on_update_*' tasks is now available.

- For improved flexibility, configuration sections may now override global 'on_update_exec' and
'on_update_timeout'. Eearlier Fangfrisch versions only examined the DEFAULTS section.

- Add internal default configuration for provider InterServer (https://www.interserver.net/).
As per usual, this new provider is disabled by default.
- Add internal default configurations for providers InterServer (https://www.interserver.net/)
and Fangfrisch News (https://rseichter.github.io/fangfrisch/#ffnews). As per usual, these
new providers are disabled by default.

Release 1.8.1 (2024-02-21)

Expand Down
6 changes: 3 additions & 3 deletions docs/fangfrisch.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Fangfrisch
Ralph Seichter <fangfrisch@seichter.de>
v1.9.0.dev6, {docdate}
v1.9.0, {docdate}
:copyright: © 2020-2024 Ralph Seichter
:encoding: UTF-8
:hyphens: en
Expand Down Expand Up @@ -366,7 +366,7 @@ This pseudo provider does not offer antivirus signature files.
It is only meant for me to pass news about Fangfrisch to you, the user, in lieu of a mailing list.
Don't expect this to happen on a regular basis.
I am only thinking about release notifications at this point in time.
Still, I kindly ask you to please enable this service as you would enable any other provider, by adding the following to your configuration file:
Still, I kindly ask you to please enable this service by adding the following to your configuration file:
----
[fangfrischnews]
enabled = yes
Expand All @@ -377,7 +377,7 @@ This will only enable Fangfrisch to occasionally download small text files, noth
You will not need to read the content, nor will anything else happen, unless you modify the `script` option.
Here is an example script which you could use to have downloaded news items mailed to you.
It needs to be readable for the user account running Fangfrisch, and the sender/recipient addresses obviously have to be adapted.
For your convenience, the latest version of the script can be downloaded https://raw.githubusercontent.com/rseichter/fangfrisch/master/contrib/fangfrisch-has-news.sh[here].
For your convenience, the latest version of the script can be https://raw.githubusercontent.com/rseichter/fangfrisch/master/contrib/fangfrisch-has-news.sh[downloaded here].
----
include::../contrib/fangfrisch-has-news.sh[]
----
Expand Down
Binary file modified docs/fangfrisch.pdf
Binary file not shown.
97 changes: 57 additions & 40 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,8 @@ <h1>Fangfrisch</h1>
<div class="details">
<span id="author" class="author">Ralph Seichter</span><br>
<span id="email" class="email"><a href="mailto:fangfrisch@seichter.de">fangfrisch@seichter.de</a></span><br>
<span id="revnumber">version 1.9.0.dev6,</span>
<span id="revdate">2024-03-01</span>
<span id="revnumber">version 1.9.0,</span>
<span id="revdate">2024-03-08</span>
</div>
<div id="toc" class="toc2">
<div id="toctitle">Table of Contents</div>
Expand Down Expand Up @@ -1329,7 +1329,7 @@ <h2 id="ffnews"><a class="anchor" href="#ffnews"></a>Appendix C: Fangfrisch News
It is only meant for me to pass news about Fangfrisch to you, the user, in lieu of a mailing list.
Don&#8217;t expect this to happen on a regular basis.
I am only thinking about release notifications at this point in time.
Still, I kindly ask you to please enable this service as you would enable any other provider, by adding the following to your configuration file:</p>
Still, I kindly ask you to please enable this service by adding the following to your configuration file:</p>
</div>
<div class="listingblock">
<div class="content">
Expand All @@ -1344,71 +1344,88 @@ <h2 id="ffnews"><a class="anchor" href="#ffnews"></a>Appendix C: Fangfrisch News
You will not need to read the content, nor will anything else happen, unless you modify the <code>script</code> option.
Here is an example script which you could use to have downloaded news items mailed to you.
It needs to be readable for the user account running Fangfrisch, and the sender/recipient addresses obviously have to be adapted.
For your convenience, the latest version of the script can be downloaded <a href="https://raw.githubusercontent.com/rseichter/fangfrisch/master/contrib/fangfrisch-has-news.sh">here</a>.</p>
For your convenience, the latest version of the script can be <a href="https://raw.githubusercontent.com/rseichter/fangfrisch/master/contrib/fangfrisch-has-news.sh">downloaded here</a>.</p>
</div>
<div class="listingblock">
<div class="content">
<pre>#!/usr/bin/env bash
# vim: ts=4 sw=4 noet ft=sh
#
# Example script to process Fangfrisch News.
#
# The caller is required to pass 1..n directories
# to be scanned for news items.

set -euo pipefail
declare -r MAILFROM="noreply"
declare -r MAILTO="alice@example.com"
declare -r SUBJECT="Fangfrisch News are available"

# Option 1: Mutt
#declare -r MAILAPP="mutt"
#declare -r MAILAPP_OPT=( "-s" "$SUBJECT" "$MAILTO" )

# Option 2: sendmail
#declare -r MAILAPP="sendmail"
#declare -r MAILAPP_OPT=( "-t" )
#export PATH="$PATH:/usr/sbin"

# Option 3: swaks
declare -r MAILAPP="swaks"
declare -r MAILAPP_OPT=( "-d" "-" "-f" "$MAILFROM" "-t" "$MAILTO" )

declare -r MAILFROM="noreply@example.net"
declare -r MAILTO="alice@example.org"
declare -r SUBJECT="I have news for you"
### No changes required below this line ###

set -euo pipefail

die() {
echo &gt;&amp;2 "$@"
exit 1
}

usage() {
die "Usage: $(basename "$0") {directory} [[directory] ...]"
die "Usage: $(basename "$0") {directory}"
}

print_header() {
# Mail header must end with an empty line
gen_header() {
cat &lt;&lt;EOT
From: Fangfrisch News &lt;$MAILFROM&gt;
To: $MAILTO
Subject: $SUBJECT

EOT
# Mail header must end with an empty line!
}

declare -a NEWSITEMS=()

report_news() {
[ $# -ge 1 ] || usage
local body counter dir fn
body=$(mktemp)
# shellcheck disable=SC2064
trap "rm $body" EXIT
counter=0
for dir in "$@"; do
[ -d "$dir" ] || die "$dir is not a directory"
while IFS= read -r -d '' fn; do
(( counter+=1 ))
echo -e "\n### $fn:\n" &gt;&gt;"$body"
cat "$fn" &gt;&gt;"$body"
done &lt; &lt;(find "$dir" -maxdepth 1 -type f -name "fangfrisch*.txt" -print0)
done
if [ $counter -gt 0 ]; then
print_header
cat "$body"
local dir=$1 ni
[ -d "$dir" ] || die "$dir is not a directory"
while IFS= read -r -d '' ni; do
if [ ${#NEWSITEMS[*]} -eq 0 ] &amp;&amp; [ "$MAILAPP" != mutt ]; then
# Mutt does not need the header, others do.
gen_header
fi
NEWSITEMS+=( "$ni" )
echo -e "\n### $(basename "$ni"):\n"
cat "$ni"
done &lt; &lt;(find "$dir" -maxdepth 1 -type f -name "fangfrisch*.txt" -print0)
}

main() {
local t
if tty -s; then
# Running in a terminal session
t=$(mktemp)
# shellcheck disable=SC2064
trap "rm $t" EXIT
report_news "$@" | tee "$t" || exit 1
[ ! -s "$t" ] || "$MAILAPP" "${MAILAPP_OPT[@]}" &gt;/dev/null &lt;"$t"
else
report_news "$@" 2&gt;&amp;1 | "$MAILAPP" "${MAILAPP_OPT[@]}" &gt;/dev/null
[ ${#NEWSITEMS[*]} -eq 0 ] || rm -v "${NEWSITEMS[@]}"
fi
}

# When running in a terminal session, simply print
# the news. Otherwise, report the news via email.
if tty -s; then
report_news "$@"
else
report_news "$@" 2&gt;&amp;1 | /usr/sbin/sendmail -t
fi</pre>
[ $# -ge 1 ] || usage
main "$@"</pre>
</div>
</div>
</div>
Expand Down Expand Up @@ -1450,8 +1467,8 @@ <h3 id="_accessing_mappings"><a class="anchor" href="#_accessing_mappings"></a>D
</div>
<div id="footer">
<div id="footer-text">
Version 1.9.0.dev6<br>
Last updated 2024-03-01 20:55:03 +0100
Version 1.9.0<br>
Last updated 2024-03-08 12:14:07 +0100
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion fangfrisch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with Fangfrisch. If not, see <https://www.gnu.org/licenses/>.
"""
__version__ = '1.9.0.dev6'
__version__ = '1.9.0'


class ClamavItem:
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ project_urls =
Source = https://github.com/rseichter/fangfrisch
Tracker = https://github.com/rseichter/fangfrisch/issues
url = https://github.com/rseichter/fangfrisch
version = 1.9.0.dev6
version = 1.9.0

[options]
install_requires =
Expand Down

0 comments on commit 33bebfc

Please sign in to comment.