diff options
47 files changed, 654 insertions, 897 deletions
diff --git a/bin/build-web-site b/bin/build-web-site index cbfc8c3..3b5e4a9 100755 --- a/bin/build-web-site +++ b/bin/build-web-site | |||
@@ -18,7 +18,7 @@ umask 022 | |||
18 | 18 | ||
19 | prefix='/home/plugins' | 19 | prefix='/home/plugins' |
20 | 20 | ||
21 | export PATH="$prefix/libexec:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin" | 21 | export PATH="$prefix/libexec:$prefix/opt/poole:$prefix/opt/poole/env/bin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin" |
22 | 22 | ||
23 | myself=${0##*/} | 23 | myself=${0##*/} |
24 | man_source_dir="$prefix/web/work/man" | 24 | man_source_dir="$prefix/web/work/man" |
@@ -54,9 +54,8 @@ ln -s "$output_dir" "$site_work_dir/output" | |||
54 | # See http://pythonhosted.org/Markdown/extensions/ for documentation on the | 54 | # See http://pythonhosted.org/Markdown/extensions/ for documentation on the |
55 | # extensions. | 55 | # extensions. |
56 | # | 56 | # |
57 | poole --build \ | 57 | poole.py --build \ |
58 | --md-ext='extra' \ | 58 | --md-ext='extra' \ |
59 | --md-ext='headerid' \ | ||
60 | --md-ext='toc' \ | 59 | --md-ext='toc' \ |
61 | --md-ext='wikilinks' \ | 60 | --md-ext='wikilinks' \ |
62 | "$site_work_dir" | 61 | "$site_work_dir" |
diff --git a/bin/check-mirrors b/bin/check-mirrors index 446e2fd..168104f 100755 --- a/bin/check-mirrors +++ b/bin/check-mirrors | |||
@@ -13,17 +13,15 @@ | |||
13 | # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 13 | # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
14 | 14 | ||
15 | mirrors=' | 15 | mirrors=' |
16 | ftp://ftp.fu-berlin.de/unix/network/monitoring-plugins/ | 16 | https://ftp.fu-berlin.de/unix/network/monitoring-plugins/ |
17 | ftp://ftp.lysator.liu.se/pub/monitoring-plugins/ | 17 | https://ftp.lysator.liu.se/pub/monitoring-plugins/ |
18 | ftp://ftp.belnet.be/mirror/nagios-plugins.org/ | 18 | https://ftp.belnet.be/mirror/nagios-plugins.org/ |
19 | ftp://ftp.cc.uoc.gr/mirrors/monitoring-plugins/ | 19 | https://ftp.cc.uoc.gr/mirrors/monitoring-plugins/ |
20 | ftp://mirrors.fe.up.pt/pub/monitoring-plugins/ | 20 | https://mirrors.fe.up.pt/pub/monitoring-plugins/ |
21 | ftp://ftp.osuosl.org/pub/monitoring-plugins/ | 21 | https://ftp2.osuosl.org/pub/monitoring-plugins/ |
22 | ftp://mirror.bytemark.co.uk/monitoring-plugins/ | 22 | http://mirror.mephi.ru/nagios-plugins/ |
23 | ftp://mirror.is.co.za/mirror/monitoring-plugins.org/ | 23 | https://ftp.kaist.ac.kr/nagios-plugins/ |
24 | ftp://mirror.webtastix.net/monitoring-plugins/ | 24 | https://mirrors.ustc.edu.cn/monitoring-plugins/ |
25 | ftp://mirror.mephi.ru/nagios-plugins/ | ||
26 | ftp://ftp.kaist.ac.kr/nagios-plugins/ | ||
27 | ' | 25 | ' |
28 | 26 | ||
29 | # | 27 | # |
@@ -33,6 +31,8 @@ mirrors=' | |||
33 | # | 31 | # |
34 | # URLs: | 32 | # URLs: |
35 | # - ftp://ftp.fu-berlin.de/unix/network/monitoring-plugins/ | 33 | # - ftp://ftp.fu-berlin.de/unix/network/monitoring-plugins/ |
34 | # - http://ftp.fu-berlin.de/unix/network/monitoring-plugins/ | ||
35 | # - https://ftp.fu-berlin.de/unix/network/monitoring-plugins/ | ||
36 | # | 36 | # |
37 | # Features: | 37 | # Features: |
38 | # - IPv4 | 38 | # - IPv4 |
@@ -71,7 +71,8 @@ mirrors=' | |||
71 | # | 71 | # |
72 | # URLs: | 72 | # URLs: |
73 | # - ftp://ftp.belnet.be/mirror/nagios-plugins.org/ | 73 | # - ftp://ftp.belnet.be/mirror/nagios-plugins.org/ |
74 | # - http://ftp.belnet.be/nagios-plugins.org/ | 74 | # - http://ftp.belnet.be/mirror/nagios-plugins.org/ |
75 | # - https://ftp.belnet.be/mirror/nagios-plugins.org/ | ||
75 | # | 76 | # |
76 | # Features: | 77 | # Features: |
77 | # - IPv4 | 78 | # - IPv4 |
@@ -89,9 +90,11 @@ mirrors=' | |||
89 | # URLs: | 90 | # URLs: |
90 | # - ftp://ftp.cc.uoc.gr/mirrors/monitoring-plugins/ | 91 | # - ftp://ftp.cc.uoc.gr/mirrors/monitoring-plugins/ |
91 | # - http://ftp.cc.uoc.gr/mirrors/monitoring-plugins/ | 92 | # - http://ftp.cc.uoc.gr/mirrors/monitoring-plugins/ |
93 | # - https://ftp.cc.uoc.gr/mirrors/monitoring-plugins/ | ||
92 | # | 94 | # |
93 | # Features: | 95 | # Features: |
94 | # - IPv4 | 96 | # - IPv4 |
97 | # - IPv6 | ||
95 | # - Updated daily | 98 | # - Updated daily |
96 | # | 99 | # |
97 | # Contacts: | 100 | # Contacts: |
@@ -106,6 +109,7 @@ mirrors=' | |||
106 | # URLs: | 109 | # URLs: |
107 | # - ftp://mirrors.fe.up.pt/pub/monitoring-plugins/ | 110 | # - ftp://mirrors.fe.up.pt/pub/monitoring-plugins/ |
108 | # - http://mirrors.fe.up.pt/pub/monitoring-plugins/ | 111 | # - http://mirrors.fe.up.pt/pub/monitoring-plugins/ |
112 | # - https://mirrors.fe.up.pt/pub/monitoring-plugins/ | ||
109 | # | 113 | # |
110 | # Features: | 114 | # Features: |
111 | # - IPv4 | 115 | # - IPv4 |
@@ -122,8 +126,8 @@ mirrors=' | |||
122 | # UNITED STATES | 126 | # UNITED STATES |
123 | # | 127 | # |
124 | # URLs: | 128 | # URLs: |
125 | # - ftp://ftp.osuosl.org/pub/monitoring-plugins/ | 129 | # - http://ftp2.osuosl.org/pub/monitoring-plugins/ |
126 | # - http://ftp.osuosl.org/pub/monitoring-plugins/ | 130 | # - https://ftp2.osuosl.org/pub/monitoring-plugins/ |
127 | # | 131 | # |
128 | # Features: | 132 | # Features: |
129 | # - IPv4 | 133 | # - IPv4 |
@@ -137,58 +141,6 @@ mirrors=' | |||
137 | # - http://osuosl.org/ | 141 | # - http://osuosl.org/ |
138 | # | 142 | # |
139 | # | 143 | # |
140 | # UNITED KINGDOM | ||
141 | # | ||
142 | # URLs: | ||
143 | # - ftp://mirror.bytemark.co.uk/monitoring-plugins/ | ||
144 | # - http://mirror.bytemark.co.uk/monitoring-plugins/ | ||
145 | # - rsync://mirror.bytemark.co.uk/monitoring-plugins/ (currently not available) | ||
146 | # | ||
147 | # Features: | ||
148 | # - IPv4 | ||
149 | # - IPv6 | ||
150 | # - Updated twice a day | ||
151 | # | ||
152 | # Contacts: | ||
153 | # - James Lawrie <support AT support.bytemark.co.uk> | ||
154 | # | ||
155 | # Home page: | ||
156 | # - http://www.bytemark.co.uk/ | ||
157 | # | ||
158 | # SOUTH AFRICA | ||
159 | # | ||
160 | # URLs: | ||
161 | # - ftp://mirror.is.co.za/mirror/monitoring-plugins.org/ | ||
162 | # - http://mirror.is.co.za/mirror/monitoring-plugins.org/ | ||
163 | # - rsync://mirror.is.co.za/mirror/monitoring-plugins.org/ | ||
164 | # | ||
165 | # Features: | ||
166 | # - IPv4 | ||
167 | # - Updated twice a day | ||
168 | # | ||
169 | # Contacts: | ||
170 | # - Henti Smith <ftpadmin AT is.co.za> | ||
171 | # | ||
172 | # Home page: | ||
173 | # - http://www.is.co.za/ | ||
174 | # | ||
175 | # NEW ZEALAND | ||
176 | # | ||
177 | # URLs: | ||
178 | # - ftp://mirror.webtastix.net/monitoring-plugins/ | ||
179 | # - http://mirror.webtastix.net/monitoring-plugins/ | ||
180 | # | ||
181 | # Features: | ||
182 | # - IPv4 | ||
183 | # - Updated hourly | ||
184 | # | ||
185 | # Contacts: | ||
186 | # - Mirror Admins <mirrors AT webtastix.net> | ||
187 | # - Shane Langley <shane AT webtastix.net> | ||
188 | # | ||
189 | # Home page: | ||
190 | # - http://www.webtastix.net/ | ||
191 | # | ||
192 | # RUSSIA | 144 | # RUSSIA |
193 | # | 145 | # |
194 | # URLs: | 146 | # URLs: |
@@ -213,9 +165,11 @@ mirrors=' | |||
213 | # URLs: | 165 | # URLs: |
214 | # - ftp://ftp.kaist.ac.kr/nagios-plugins/ | 166 | # - ftp://ftp.kaist.ac.kr/nagios-plugins/ |
215 | # - http://ftp.kaist.ac.kr/nagios-plugins/ | 167 | # - http://ftp.kaist.ac.kr/nagios-plugins/ |
168 | # - https://ftp.kaist.ac.kr/nagios-plugins/ | ||
216 | # | 169 | # |
217 | # Features: | 170 | # Features: |
218 | # - IPv4 | 171 | # - IPv4 |
172 | # - IPv6 | ||
219 | # - Updated daily | 173 | # - Updated daily |
220 | # | 174 | # |
221 | # Contacts: | 175 | # Contacts: |
@@ -229,6 +183,7 @@ mirrors=' | |||
229 | # | 183 | # |
230 | # URLs: | 184 | # URLs: |
231 | # - http://mirrors.ustc.edu.cn/monitoring-plugins/ | 185 | # - http://mirrors.ustc.edu.cn/monitoring-plugins/ |
186 | # - https://mirrors.ustc.edu.cn/monitoring-plugins/ | ||
232 | # - rsync://mirrors.ustc.edu.cn/monitoring-plugins/ | 187 | # - rsync://mirrors.ustc.edu.cn/monitoring-plugins/ |
233 | # | 188 | # |
234 | # Features: | 189 | # Features: |
@@ -263,12 +218,12 @@ for mirror in $mirrors | |||
263 | do | 218 | do |
264 | url="${mirror%/}/timestamp" | 219 | url="${mirror%/}/timestamp" |
265 | 220 | ||
266 | if ncftpget -V -t 600 "$url" >'ftp.log' 2>&1 | 221 | if curl -fsSLO -m 600 "$url" >'http.log' 2>&1 |
267 | then | 222 | then |
268 | cmp -s 'expected' 'timestamp' \ | 223 | cmp -s 'expected' 'timestamp' \ |
269 | || echo >&2 "$mirror is outdated ($(cat 'timestamp'))." | 224 | || echo >&2 "$mirror is outdated ($(cat 'timestamp'))." |
270 | else | 225 | else |
271 | tail -n 1 'ftp.log' >&2 | 226 | printf '%s failed: %s\n' "$mirror" "$(tail -n 1 'http.log')" >&2 |
272 | fi | 227 | fi |
273 | rm -f 'timestamp' | 228 | rm -f 'timestamp' |
274 | done | 229 | done |
diff --git a/etc/nginx.conf b/etc/nginx.conf index ee815d3..f8e61bf 100644 --- a/etc/nginx.conf +++ b/etc/nginx.conf | |||
@@ -19,10 +19,12 @@ ssl_dhparam /home/plugins/etc/ssl/dh-parameters.pem; | |||
19 | # Server definition for <https://www.monitoring-plugins.org/>. | 19 | # Server definition for <https://www.monitoring-plugins.org/>. |
20 | # | 20 | # |
21 | server { | 21 | server { |
22 | listen 130.133.8.40:443 ssl; | 22 | listen 130.133.8.40:443 ssl http2; |
23 | listen 130.133.8.40:444 ssl; | 23 | listen 130.133.8.40:444 ssl http2; |
24 | server_name www.monitoring-plugins.org; | 24 | server_name www.monitoring-plugins.org; |
25 | root /home/plugins/web/port-$server_port; | 25 | root /home/plugins/web/port-$server_port; |
26 | ssl_certificate /home/plugins/etc/ssl/monitoring-plugins.crt; | ||
27 | ssl_certificate_key /home/plugins/etc/ssl/monitoring-plugins.key; | ||
26 | 28 | ||
27 | # | 29 | # |
28 | # Downloads and attachments. | 30 | # Downloads and attachments. |
@@ -34,7 +36,10 @@ server { | |||
34 | } | 36 | } |
35 | root /home/plugins/web; | 37 | root /home/plugins/web; |
36 | fancyindex on; | 38 | fancyindex on; |
39 | fancyindex_default_sort date_desc; | ||
40 | fancyindex_name_length 40; | ||
37 | fancyindex_exact_size off; | 41 | fancyindex_exact_size off; |
42 | fancyindex_time_format "%F"; | ||
38 | fancyindex_css_href /resources/plugins.css; | 43 | fancyindex_css_href /resources/plugins.css; |
39 | fancyindex_ignore ^timestamp$; | 44 | fancyindex_ignore ^timestamp$; |
40 | } | 45 | } |
@@ -78,6 +83,15 @@ server { | |||
78 | } | 83 | } |
79 | 84 | ||
80 | # | 85 | # |
86 | # Rspamd. | ||
87 | # | ||
88 | location /rspamd/ { | ||
89 | proxy_pass http://127.0.0.1:11334/; | ||
90 | proxy_set_header Host $host; | ||
91 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
92 | } | ||
93 | |||
94 | # | ||
81 | # Redirects etc. | 95 | # Redirects etc. |
82 | # | 96 | # |
83 | location = /favicon.ico { | 97 | location = /favicon.ico { |
@@ -119,20 +133,55 @@ server { | |||
119 | } | 133 | } |
120 | 134 | ||
121 | # | 135 | # |
122 | # Redirect HTTP and all other domains to <https://www.monitoring-plugins.org/>. | 136 | # Redirect HTTP to <https://www.monitoring-plugins.org/>. Ditto for the test |
123 | # Ditto for the test instance. | 137 | # instance. |
124 | # | 138 | # |
125 | server { | 139 | server { |
126 | listen 130.133.8.40:80 default_server; | 140 | listen 130.133.8.40:80; |
127 | listen 130.133.8.40:443 default_server ssl; | 141 | server_name monitoring-plugins.org www.monitoring-plugins.org; |
142 | return 301 https://www.monitoring-plugins.org$request_uri; | ||
143 | } | ||
144 | |||
145 | server { | ||
146 | listen 130.133.8.40:81; | ||
147 | server_name monitoring-plugins.org www.monitoring-plugins.org; | ||
148 | return 301 https://www.monitoring-plugins.org:444$request_uri; | ||
149 | } | ||
150 | |||
151 | # | ||
152 | # Add "www" prefix. Ditto for the test instance. | ||
153 | # | ||
154 | server { | ||
155 | listen 130.133.8.40:443 ssl http2; | ||
156 | server_name monitoring-plugins.org; | ||
128 | ssl_certificate /home/plugins/etc/ssl/monitoring-plugins.crt; | 157 | ssl_certificate /home/plugins/etc/ssl/monitoring-plugins.crt; |
129 | ssl_certificate_key /home/plugins/etc/ssl/monitoring-plugins.key; | 158 | ssl_certificate_key /home/plugins/etc/ssl/monitoring-plugins.key; |
130 | return 301 https://www.monitoring-plugins.org$request_uri; | 159 | return 301 https://www.monitoring-plugins.org$request_uri; |
131 | } | 160 | } |
161 | |||
132 | server { | 162 | server { |
133 | listen 130.133.8.40:81 default_server; | 163 | listen 130.133.8.40:444 ssl http2; |
134 | listen 130.133.8.40:444 default_server ssl; | 164 | server_name monitoring-plugins.org; |
135 | ssl_certificate /home/plugins/etc/ssl/monitoring-plugins.crt; | 165 | ssl_certificate /home/plugins/etc/ssl/monitoring-plugins.crt; |
136 | ssl_certificate_key /home/plugins/etc/ssl/monitoring-plugins.key; | 166 | ssl_certificate_key /home/plugins/etc/ssl/monitoring-plugins.key; |
137 | return 301 https://www.monitoring-plugins.org:444$request_uri; | 167 | return 301 https://www.monitoring-plugins.org:444$request_uri; |
138 | } | 168 | } |
169 | |||
170 | # | ||
171 | # Outdated domains. Can be deleted in 2026. | ||
172 | # | ||
173 | server { | ||
174 | listen 130.133.8.40:80 default_server; | ||
175 | listen 130.133.8.40:443 default_server ssl http2; | ||
176 | root /home/plugins/web-redirect; | ||
177 | ssl_certificate /home/plugins/etc/ssl/monitoring-plugins.crt; | ||
178 | ssl_certificate_key /home/plugins/etc/ssl/monitoring-plugins.key; | ||
179 | } | ||
180 | |||
181 | server { | ||
182 | listen 130.133.8.40:81 default_server; | ||
183 | listen 130.133.8.40:444 default_server ssl http2; | ||
184 | root /home/plugins/web-redirect; | ||
185 | ssl_certificate /home/plugins/etc/ssl/monitoring-plugins.crt; | ||
186 | ssl_certificate_key /home/plugins/etc/ssl/monitoring-plugins.key; | ||
187 | } | ||
diff --git a/libexec/git-notify b/libexec/git-notify index 64da7c0..228c7d6 100755 --- a/libexec/git-notify +++ b/libexec/git-notify | |||
@@ -4,6 +4,7 @@ | |||
4 | # | 4 | # |
5 | # Copyright 2005 Alexandre Julliard | 5 | # Copyright 2005 Alexandre Julliard |
6 | # Copyright 2009, 2013 Nagios Plugins Development Team | 6 | # Copyright 2009, 2013 Nagios Plugins Development Team |
7 | # Copyright 2024, 2025 Monitoring Plugins Development Team | ||
7 | # | 8 | # |
8 | # This program is free software; you can redistribute it and/or | 9 | # This program is free software; you can redistribute it and/or |
9 | # modify it under the terms of the GNU General Public License as | 10 | # modify it under the terms of the GNU General Public License as |
@@ -34,9 +35,12 @@ | |||
34 | # | 35 | # |
35 | 36 | ||
36 | use strict; | 37 | use strict; |
37 | use Fcntl ':flock'; | 38 | use utf8; |
38 | use Encode qw(encode decode); | 39 | use feature qw(evalbytes unicode_eval unicode_strings); |
40 | use open qw(:std :utf8); | ||
39 | use Cwd 'realpath'; | 41 | use Cwd 'realpath'; |
42 | use Encode qw(encode); | ||
43 | use Fcntl ':flock'; | ||
40 | 44 | ||
41 | sub git_config($); | 45 | sub git_config($); |
42 | sub get_repos_name(); | 46 | sub get_repos_name(); |
@@ -449,7 +453,7 @@ sub send_commit_notice($$) | |||
449 | my ($ref,$obj) = @_; | 453 | my ($ref,$obj) = @_; |
450 | my %info = get_object_info($obj); | 454 | my %info = get_object_info($obj); |
451 | my @notice = (); | 455 | my @notice = (); |
452 | my ($url,$subject,$obj_string); | 456 | my ($url,$from,$subject,$obj_string); |
453 | 457 | ||
454 | if ($gitweb_url) | 458 | if ($gitweb_url) |
455 | { | 459 | { |
@@ -515,9 +519,8 @@ sub send_commit_notice($$) | |||
515 | } | 519 | } |
516 | 520 | ||
517 | $subject .= truncate_str(${$info{"log"}}[0],50); | 521 | $subject .= truncate_str(${$info{"log"}}[0],50); |
518 | $_ = decode($info{"encoding"}, $_) for @notice; | 522 | $from = encode("MIME-Q",$info{'committer_name'}) . " <$from_address>"; |
519 | mail_notification("$info{'committer_name'} <$from_address>", $commitlist_address, $subject, | 523 | mail_notification($from, $commitlist_address, $subject, "text/plain; charset=UTF-8", @notice); |
520 | "text/plain; charset=UTF-8", @notice); | ||
521 | } | 524 | } |
522 | 525 | ||
523 | # send a commit notice to the CIA server | 526 | # send a commit notice to the CIA server |
diff --git a/libexec/poole b/libexec/poole deleted file mode 100755 index 3735f90..0000000 --- a/libexec/poole +++ /dev/null | |||
@@ -1,755 +0,0 @@ | |||
1 | #!/usr/bin/env python | ||
2 | # -*- coding: utf-8 -*- | ||
3 | |||
4 | # ============================================================================= | ||
5 | # | ||
6 | # Poole - A damn simple static website generator. | ||
7 | # Copyright (C) 2012 Oben Sonne <obensonne@googlemail.com> | ||
8 | # | ||
9 | # This file is part of Poole. | ||
10 | # | ||
11 | # Poole is free software: you can redistribute it and/or modify | ||
12 | # it under the terms of the GNU General Public License as published by | ||
13 | # the Free Software Foundation, either version 3 of the License, or | ||
14 | # (at your option) any later version. | ||
15 | # | ||
16 | # Poole is distributed in the hope that it will be useful, | ||
17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
19 | # GNU General Public License for more details. | ||
20 | # | ||
21 | # You should have received a copy of the GNU General Public License | ||
22 | # along with Poole. If not, see <http://www.gnu.org/licenses/>. | ||
23 | # | ||
24 | # ============================================================================= | ||
25 | |||
26 | from __future__ import with_statement | ||
27 | |||
28 | import codecs | ||
29 | import glob | ||
30 | import imp | ||
31 | import optparse | ||
32 | import os | ||
33 | from os.path import join as opj | ||
34 | from os.path import exists as opx | ||
35 | import re | ||
36 | import shutil | ||
37 | import StringIO | ||
38 | import sys | ||
39 | import traceback | ||
40 | import urlparse | ||
41 | |||
42 | from SimpleHTTPServer import SimpleHTTPRequestHandler | ||
43 | from BaseHTTPServer import HTTPServer | ||
44 | |||
45 | try: | ||
46 | import markdown | ||
47 | except ImportError: | ||
48 | print("abort : need python-markdown, get it from " | ||
49 | "http://www.freewisdom.org/projects/python-markdown/Installation") | ||
50 | sys.exit(1) | ||
51 | |||
52 | HERE = os.path.dirname(os.path.realpath(__file__)) | ||
53 | |||
54 | THEME_DIR = opj(HERE, 'themes') | ||
55 | |||
56 | THEME_NAMES = ['minimal'] + [ | ||
57 | os.path.basename(x) | ||
58 | for x in glob.glob(opj(THEME_DIR, '*')) | ||
59 | if os.path.isdir(x) | ||
60 | ] | ||
61 | |||
62 | # ============================================================================= | ||
63 | # init site | ||
64 | # ============================================================================= | ||
65 | |||
66 | EXAMPLE_FILES = { | ||
67 | |||
68 | "page.html": """<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
69 | <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> | ||
70 | <head> | ||
71 | <meta http-equiv="Content-Type" content="text/html; charset={{ __encoding__ }}" /> | ||
72 | <title>poole - {{ hx(page["title"]) }}</title> | ||
73 | <meta name="description" content="{{ hx(page.get("description", "a poole site")) }}" /> | ||
74 | <meta name="keywords" content="{{ hx(page.get("keywords", "poole")) }}" /> | ||
75 | <style type="text/css"> | ||
76 | body { | ||
77 | font-family: sans; | ||
78 | width: 800px; | ||
79 | margin: 1em auto; | ||
80 | color: #2e3436; | ||
81 | } | ||
82 | div#box { | ||
83 | } | ||
84 | div#header, div#menu, div#content, div#footer { | ||
85 | padding: 1em; | ||
86 | } | ||
87 | div#menu { | ||
88 | background-color: #eeeeec; | ||
89 | padding: 0.6em 0 0.6em 0; | ||
90 | } | ||
91 | #menu span { | ||
92 | font-weight: bold; | ||
93 | padding: 0.6em; | ||
94 | } | ||
95 | #menu span.current { | ||
96 | background-color: #ffffff; | ||
97 | border: 1px solid #eeeeec; | ||
98 | } | ||
99 | #menu a { | ||
100 | color: #000000; | ||
101 | text-decoration: none; | ||
102 | } | ||
103 | div#footer { | ||
104 | color: gray; | ||
105 | text-align: center; | ||
106 | font-size: small; | ||
107 | } | ||
108 | div#footer a { | ||
109 | color: gray; | ||
110 | text-decoration: none; | ||
111 | } | ||
112 | pre { | ||
113 | border: dotted black 1px; | ||
114 | background: #eeeeec; | ||
115 | font-size: small; | ||
116 | padding: 1em; | ||
117 | } | ||
118 | </style> | ||
119 | </head> | ||
120 | <body> | ||
121 | <div id="box"> | ||
122 | <div id="header"> | ||
123 | <h1>a poole site</h1> | ||
124 | <h2>{{ hx(page["title"]) }}</h2> | ||
125 | </div> | ||
126 | <div id="menu"> | ||
127 | <!--% | ||
128 | mpages = [p for p in pages if "menu-position" in p] | ||
129 | mpages.sort(key=lambda p: int(p["menu-position"])) | ||
130 | entry = '<span class="%s"><a href="%s">%s</a></span>' | ||
131 | for p in mpages: | ||
132 | style = "current" if p["title"] == page["title"] else "" | ||
133 | print(entry % (style, p["url"], hx(p["title"]))) | ||
134 | %--> | ||
135 | </div> | ||
136 | <div id="content">{{ __content__ }}</div> | ||
137 | </div> | ||
138 | <div id="footer"> | ||
139 | Built with <a href="http://bitbucket.org/obensonne/poole">Poole</a> | ||
140 | · | ||
141 | Licensed as <a href="http://creativecommons.org/licenses/by-sa/3.0">CC-SA</a> | ||
142 | · | ||
143 | <a href="http://validator.w3.org/check?uri=referer">Validate me</a> | ||
144 | </div> | ||
145 | </body> | ||
146 | </html> | ||
147 | """, | ||
148 | |||
149 | # ----------------------------------------------------------------------------- | ||
150 | |||
151 | opj("input", "index.md"): """ | ||
152 | title: home | ||
153 | menu-position: 0 | ||
154 | --- | ||
155 | |||
156 | ## Welcome to Poole | ||
157 | |||
158 | In Poole you write your pages in [markdown][md]. It's easier to write | ||
159 | markdown than HTML. | ||
160 | |||
161 | Poole is made for simple websites you just want to get done, without installing | ||
162 | a bunch of requirements and without learning a template engine. | ||
163 | |||
164 | In a build, Poole copies every file from the *input* directory to the *output* | ||
165 | directory. During that process every markdown file (ending with *md*, *mkd*, | ||
166 | *mdown* or *markdown*) is converted to HTML using the project's `page.html` | ||
167 | as a skeleton. | ||
168 | |||
169 | [md]: http://daringfireball.net/projects/markdown/ | ||
170 | """, | ||
171 | |||
172 | # ----------------------------------------------------------------------------- | ||
173 | |||
174 | opj("input", "logic.md"): """ | ||
175 | menu-position: 4 | ||
176 | --- | ||
177 | Poole has basic support for content generation using Python code inlined in | ||
178 | page files. This is everything but a clear separation of logic and content but | ||
179 | for simple sites this is just a pragmatic way to get things done fast. | ||
180 | For instance the menu on this page is generated by some inlined Python code in | ||
181 | the project's `page.html` file. | ||
182 | |||
183 | Just ignore this feature if you don't need it :) | ||
184 | |||
185 | Content generation by inlined Python code is good to add some zest to your | ||
186 | site. If you use it a lot, you better go with more sophisticated site | ||
187 | generators like [Hyde](http://ringce.com/hyde). | ||
188 | """, | ||
189 | |||
190 | # ----------------------------------------------------------------------------- | ||
191 | |||
192 | opj("input", "layout.md"): """ | ||
193 | menu-position: 3 | ||
194 | --- | ||
195 | Every page of a poole site is based on *one global template file*, `page.html`. | ||
196 | All you need to adjust the site layout is to edit the page template | ||
197 | `page.html`. | ||
198 | """, | ||
199 | |||
200 | opj("input", "blog.md"): """ | ||
201 | menu-position: 10 | ||
202 | --- | ||
203 | Poole has basic blog support. If an input page's file name has a structure like | ||
204 | `page-title.YYYY-MM-DD.post-title.md`, e.g. `blog.2010-02-27.read_this.md`, | ||
205 | Poole recognizes the date and post title and sets them as attributes of the | ||
206 | page. These attributes can then be used to generate a list of blog posts: | ||
207 | |||
208 | <!--% | ||
209 | from datetime import datetime | ||
210 | posts = [p for p in pages if "post" in p] # get all blog post pages | ||
211 | posts.sort(key=lambda p: p.get("date"), reverse=True) # sort post pages by date | ||
212 | for p in posts: | ||
213 | date = datetime.strptime(p.date, "%Y-%m-%d").strftime("%B %d, %Y") | ||
214 | print " * **[%s](%s)** - %s" % (p.post, p.url, date) # markdown list item | ||
215 | %--> | ||
216 | |||
217 | Have a look into `input/blog.md` to see how it works. Feel free to adjust it | ||
218 | to your needs. | ||
219 | """, | ||
220 | |||
221 | # ----------------------------------------------------------------------------- | ||
222 | |||
223 | opj("input", "blog.2013-04-08.Lorem_Ipsum.md") : """ | ||
224 | |||
225 | --- | ||
226 | ## {{ page["post"] }} | ||
227 | |||
228 | *Posted at | ||
229 | <!--% | ||
230 | from datetime import datetime | ||
231 | print datetime.strptime(page["date"], "%Y-%m-%d").strftime("%B %d, %Y") | ||
232 | %-->* | ||
233 | |||
234 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sed pretium arcu. | ||
235 | Nullam eu leo ut justo egestas condimentum sed id dolor. In suscipit est eu | ||
236 | tellus lacinia congue. Nunc tincidunt posuere nibh vitae accumsan. Suspendisse | ||
237 | quis justo quis nulla rhoncus venenatis. Cum sociis natoque penatibus et magnis | ||
238 | dis parturient montes, nascetur ridiculus mus. Suspendisse potenti. | ||
239 | |||
240 | Nullam luctus tortor ac libero eleifend interdum nec eget dolor. Aliquam quis | ||
241 | massa metus, id fringilla odio. Fusce lobortis sollicitudin gravida. Donec | ||
242 | porttitor metus aliquam diam consectetur vitae tristique ligula aliquet. Nulla | ||
243 | facilisi. Mauris eleifend erat id velit eleifend facilisis. Proin orci lacus, | ||
244 | imperdiet eu mollis ac, cursus sit amet ligula. Ut id neque urna, sed dignissim | ||
245 | urna. Cras sit amet sodales orci. In at lacus dui. Duis mi neque, posuere ut | ||
246 | congue non, ornare a magna. Fusce massa ligula, vestibulum sed vulputate quis, | ||
247 | sodales at massa. | ||
248 | |||
249 | No-ASCII characters like `öäüß` are no problems as long as input files are | ||
250 | encoded in UTF8. | ||
251 | """, | ||
252 | |||
253 | # ----------------------------------------------------------------------------- | ||
254 | |||
255 | opj("input", "blog.2013-04-01.Holy_Grail.md"): """ | ||
256 | |||
257 | ## {{ page["post"] }} | ||
258 | |||
259 | *Posted at <!--{ page["date"] }-->.* | ||
260 | |||
261 | Knights of Ni, we are but simple travelers who seek the enchanter who lives | ||
262 | beyond these woods. A newt? Did you dress her up like this? On second thoughts, | ||
263 | let's not go there. It is a silly place. You don't vote for kings. Knights of | ||
264 | Ni, we are but simple travelers who seek the enchanter who lives beyond these | ||
265 | woods. | ||
266 | |||
267 | ### Bridgekeeper ### | ||
268 | |||
269 | Camelot! What do you mean? And this isn't my nose. This is a false one. Ah, now | ||
270 | we see the violence inherent in the system! | ||
271 | |||
272 | You don't frighten us, English pig-dogs! Go and boil your bottoms, sons of a | ||
273 | silly person! I blow my nose at you, so-called Ah-thoor Keeng, you and all your | ||
274 | silly English K-n-n-n-n-n-n-n-niggits! I don't want to talk to you no more, you | ||
275 | empty-headed animal food trough water! I fart in your general direction! Your | ||
276 | mother was a hamster and your father smelt of elderberries! Now leave before I | ||
277 | am forced to taunt you a second time! Shh! Knights, I bid you welcome to your | ||
278 | new home. Let us ride to Camelot! Now, look here, my good man. | ||
279 | |||
280 | ### What a strange ### | ||
281 | |||
282 | She looks like one. Why do you think that she is a witch? Look, my liege! Bring | ||
283 | her forward! | ||
284 | |||
285 | [Ni!](http://chrisvalleskey.com/fillerama/) | ||
286 | """, | ||
287 | } | ||
288 | |||
289 | def init(project, theme): | ||
290 | """Initialize a site project.""" | ||
291 | |||
292 | if not opx(project): | ||
293 | os.makedirs(project) | ||
294 | |||
295 | if os.listdir(project): | ||
296 | print("abort : project dir %s is not empty" % project) | ||
297 | sys.exit(1) | ||
298 | |||
299 | dir_in = opj(project, "input") | ||
300 | dir_out = opj(project, "output") | ||
301 | |||
302 | os.mkdir(dir_in) | ||
303 | os.mkdir(dir_out) | ||
304 | |||
305 | for fname, content in EXAMPLE_FILES.items(): | ||
306 | print('info: create example %r' % fname) | ||
307 | with open(opj(project, fname), 'w') as fp: | ||
308 | fp.write(content) | ||
309 | |||
310 | if theme != 'minimal': | ||
311 | shutil.copy(opj(THEME_DIR, theme, 'page.html'), project) | ||
312 | for fname in glob.glob(opj(THEME_DIR, theme, '*')): | ||
313 | print('info: copy theme data %r' % fname) | ||
314 | if os.path.basename(fname) == 'page.html': | ||
315 | continue | ||
316 | if os.path.isdir(fname): | ||
317 | shutil.copytree(fname, opj(dir_in, os.path.basename(fname))) | ||
318 | else: | ||
319 | shutil.copy(fname, dir_in) | ||
320 | |||
321 | print("success: initialized project") | ||
322 | |||
323 | # ============================================================================= | ||
324 | # build site | ||
325 | # ============================================================================= | ||
326 | |||
327 | MKD_PATT = r'\.(?:md|mkd|mdown|markdown)$' | ||
328 | |||
329 | def hx(s): | ||
330 | """ | ||
331 | Replace the characters that are special within HTML (&, <, > and ") | ||
332 | with their equivalent character entity (e.g., &). This should be | ||
333 | called whenever an arbitrary string is inserted into HTML (so in most | ||
334 | places where you use {{ variable }} in your templates). | ||
335 | |||
336 | Note that " is not special in most HTML, only within attributes. | ||
337 | However, since escaping it does not hurt within normal HTML, it is | ||
338 | just escaped unconditionally. | ||
339 | """ | ||
340 | if getattr(s, 'escaped', False): | ||
341 | return s | ||
342 | |||
343 | escape = { | ||
344 | "&": "&", | ||
345 | '"': """, | ||
346 | ">": ">", | ||
347 | "<": "<", | ||
348 | } | ||
349 | return ''.join(escape.get(c, c) for c in s) | ||
350 | |||
351 | class Page(dict): | ||
352 | """Abstraction of a source page.""" | ||
353 | |||
354 | _template = None # template dictionary | ||
355 | _opts = None # command line options | ||
356 | _pstrip = None # path prefix to strip from (non-virtual) page file names | ||
357 | |||
358 | _re_eom = re.compile(r'^---+ *\r?\n?$') | ||
359 | _re_vardef = re.compile(r'^([^\n:=]+?)[:=]((?:.|\n )*)', re.MULTILINE) | ||
360 | _sec_macros = "macros" | ||
361 | _modmacs = None | ||
362 | |||
363 | def __init__(self, fname, virtual=None, **attrs): | ||
364 | """Create a new page. | ||
365 | |||
366 | Page content is read from `fname`, except when `virtual` is given (a | ||
367 | string representing the raw content of a virtual page). | ||
368 | |||
369 | The filename refers to the page source file. For virtual pages, this | ||
370 | *must* be relative to a projects input directory. | ||
371 | |||
372 | Virtual pages may contain page attribute definitions similar to real | ||
373 | pages. However, it probably is easier to provide the attributes | ||
374 | directly. This may be done using arbitrary keyword arguments. | ||
375 | |||
376 | """ | ||
377 | super(Page, self).__init__() | ||
378 | |||
379 | self.update(self._template) | ||
380 | self.update(attrs) | ||
381 | |||
382 | self._virtual = virtual is not None | ||
383 | |||
384 | fname = opj(self._pstrip, fname) if virtual else fname | ||
385 | |||
386 | self["fname"] = fname | ||
387 | |||
388 | self["url"] = re.sub(MKD_PATT, ".html", fname) | ||
389 | self["url"] = self["url"][len(self._pstrip):].lstrip(os.path.sep) | ||
390 | self["url"] = self["url"].replace(os.path.sep, "/") | ||
391 | |||
392 | if virtual: | ||
393 | self.raw = virtual | ||
394 | else: | ||
395 | with codecs.open(fname, 'r', self._opts.input_enc) as fp: | ||
396 | self.raw = fp.readlines() | ||
397 | |||
398 | # split raw content into macro definitions and real content | ||
399 | vardefs = "" | ||
400 | self.source = "" | ||
401 | for line in self.raw: | ||
402 | if not vardefs and self._re_eom.match(line): | ||
403 | vardefs = self.source | ||
404 | self.source = "" # only macro defs until here, reset source | ||
405 | else: | ||
406 | self.source += line | ||
407 | |||
408 | for key, val in self._re_vardef.findall(vardefs): | ||
409 | key = key.strip() | ||
410 | val = val.strip() | ||
411 | val = re.sub(r' *\n +', ' ', val) # clean out line continuation | ||
412 | self[key] = val | ||
413 | |||
414 | basename = os.path.basename(fname) | ||
415 | |||
416 | fpatt = r'(.+?)(?:\.([0-9]+-[0-9]+-[0-9]+)(?:\.(.*))?)?%s' % MKD_PATT | ||
417 | title, date, post = re.match(fpatt, basename).groups() | ||
418 | title = title.replace("_", " ") | ||
419 | post = post and post.replace("_", " ") or None | ||
420 | self["title"] = self.get("title", title) | ||
421 | if date and "date" not in self: self["date"] = date | ||
422 | if post and "post" not in self: self["post"] = post | ||
423 | |||
424 | self.html = "" | ||
425 | |||
426 | def __getattr__(self, name): | ||
427 | """Attribute-style access to dictionary items.""" | ||
428 | try: | ||
429 | return self[name] | ||
430 | except KeyError: | ||
431 | raise AttributeError(name) | ||
432 | |||
433 | def __str__(self): | ||
434 | """Page representation by file name.""" | ||
435 | return ('%s (virtual)' % self.fname) if self._virtual else self.fname | ||
436 | |||
437 | # ----------------------------------------------------------------------------- | ||
438 | |||
439 | def build(project, opts): | ||
440 | """Build a site project.""" | ||
441 | |||
442 | # ------------------------------------------------------------------------- | ||
443 | # utilities | ||
444 | # ------------------------------------------------------------------------- | ||
445 | |||
446 | def abort_iex(page, itype, inline, exc): | ||
447 | """Abort because of an exception in inlined Python code.""" | ||
448 | print("abort : Python %s in %s failed" % (itype, page)) | ||
449 | print((" %s raising the exception " % itype).center(79, "-")) | ||
450 | print(inline) | ||
451 | print(" exception ".center(79, "-")) | ||
452 | print(exc) | ||
453 | sys.exit(1) | ||
454 | |||
455 | def copy(src, dst): | ||
456 | if os.path.islink(src): | ||
457 | linkto = os.readlink(src) | ||
458 | if os.path.isdir(dst): | ||
459 | dst = opj(dst, os.path.basename(src)) | ||
460 | os.symlink(linkto, dst) | ||
461 | else: | ||
462 | shutil.copy2(src, opj(dir_out, cwd_site)) | ||
463 | |||
464 | # ------------------------------------------------------------------------- | ||
465 | # regex patterns and replacements | ||
466 | # ------------------------------------------------------------------------- | ||
467 | |||
468 | regx_escp = re.compile(r'\\((?:(?:<|<)!--|{)(?:{|%))') # escaped code | ||
469 | repl_escp = r'\1' | ||
470 | regx_rurl = re.compile(r'(?<=(?:(?:\n| )src|href)=")([^#/&%].*?)(?=")') | ||
471 | repl_rurl = lambda m: urlparse.urljoin(opts.base_url, m.group(1)) | ||
472 | |||
473 | regx_eval = re.compile(r'(?<!\\)(?:(?:<!--|{){)(.*?)(?:}(?:-->|}))', re.S) | ||
474 | |||
475 | def repl_eval(m): | ||
476 | """Replace a Python expression block by its evaluation.""" | ||
477 | |||
478 | expr = m.group(1) | ||
479 | try: | ||
480 | repl = eval(expr, macros.copy()) | ||
481 | except: | ||
482 | abort_iex(page, "expression", expr, traceback.format_exc()) | ||
483 | else: | ||
484 | if not isinstance(repl, basestring): # e.g. numbers | ||
485 | repl = unicode(repl) | ||
486 | elif not isinstance(repl, unicode): | ||
487 | repl = repl.decode("utf-8") | ||
488 | return repl | ||
489 | |||
490 | regx_exec = re.compile(r'(?<!\\)(?:(?:<!--|{)%)(.*?)(?:%(?:-->|}))', re.S) | ||
491 | |||
492 | def repl_exec(m): | ||
493 | """Replace a block of Python statements by their standard output.""" | ||
494 | |||
495 | stmt = m.group(1).replace("\r\n", "\n") | ||
496 | |||
497 | # base indentation | ||
498 | ind_lvl = len(re.findall(r'^(?: *\n)*( *)', stmt, re.MULTILINE)[0]) | ||
499 | ind_rex = re.compile(r'^ {0,%d}' % ind_lvl, re.MULTILINE) | ||
500 | stmt = ind_rex.sub('', stmt) | ||
501 | |||
502 | # execute | ||
503 | sys.stdout = StringIO.StringIO() | ||
504 | try: | ||
505 | exec stmt in macros.copy() | ||
506 | except: | ||
507 | sys.stdout = sys.__stdout__ | ||
508 | abort_iex(page, "statements", stmt, traceback.format_exc()) | ||
509 | else: | ||
510 | repl = sys.stdout.getvalue()[:-1] # remove last line break | ||
511 | sys.stdout = sys.__stdout__ | ||
512 | if not isinstance(repl, unicode): | ||
513 | repl = repl.decode(opts.input_enc) | ||
514 | return repl | ||
515 | |||
516 | # ------------------------------------------------------------------------- | ||
517 | # preparations | ||
518 | # ------------------------------------------------------------------------- | ||
519 | |||
520 | dir_in = opj(project, "input") | ||
521 | dir_out = opj(project, "output") | ||
522 | page_html = opj(project, "page.html") | ||
523 | |||
524 | # check required files and folders | ||
525 | for pelem in (page_html, dir_in, dir_out): | ||
526 | if not opx(pelem): | ||
527 | print("abort : %s does not exist, looks like project has not been " | ||
528 | "initialized" % pelem) | ||
529 | sys.exit(1) | ||
530 | |||
531 | # prepare output directory | ||
532 | for fod in glob.glob(opj(dir_out, "*")): | ||
533 | if os.path.isdir(fod): | ||
534 | shutil.rmtree(fod) | ||
535 | else: | ||
536 | os.remove(fod) | ||
537 | if not opx(dir_out): | ||
538 | os.mkdir(dir_out) | ||
539 | |||
540 | # macro module | ||
541 | fname = opj(opts.project, "macros.py") | ||
542 | macros = imp.load_source("macros", fname).__dict__ if opx(fname) else {} | ||
543 | |||
544 | macros["__encoding__"] = opts.output_enc | ||
545 | macros["options"] = opts | ||
546 | macros["project"] = project | ||
547 | macros["input"] = dir_in | ||
548 | macros["output"] = dir_out | ||
549 | |||
550 | # "builtin" items for use in macros and templates | ||
551 | macros["hx"] = hx | ||
552 | macros["htmlspecialchars"] = hx # legacy name of `htmlx` function | ||
553 | macros["Page"] = Page | ||
554 | |||
555 | # ------------------------------------------------------------------------- | ||
556 | # process input files | ||
557 | # ------------------------------------------------------------------------- | ||
558 | |||
559 | Page._template = macros.get("page", {}) | ||
560 | Page._opts = opts | ||
561 | Page._pstrip = dir_in | ||
562 | pages = [] | ||
563 | custom_converter = macros.get('converter', {}) | ||
564 | |||
565 | for cwd, dirs, files in os.walk(dir_in.decode(opts.filename_enc)): | ||
566 | cwd_site = cwd[len(dir_in):].lstrip(os.path.sep) | ||
567 | for sdir in dirs[:]: | ||
568 | if re.search(opts.ignore, opj(cwd_site, sdir)): | ||
569 | dirs.remove(sdir) | ||
570 | else: | ||
571 | os.mkdir(opj(dir_out, cwd_site, sdir)) | ||
572 | for f in files: | ||
573 | if re.search(opts.ignore, opj(cwd_site, f)): | ||
574 | pass | ||
575 | elif re.search(MKD_PATT, f): | ||
576 | page = Page(opj(cwd, f)) | ||
577 | pages.append(page) | ||
578 | else: | ||
579 | # either use a custom converter or do a plain copy | ||
580 | for patt, (func, ext) in custom_converter.items(): | ||
581 | if re.search(patt, f): | ||
582 | f_src = opj(cwd, f) | ||
583 | f_dst = opj(dir_out, cwd_site, f) | ||
584 | f_dst = '%s.%s' % (os.path.splitext(f_dst)[0], ext) | ||
585 | print('info : convert %s (%s)' % (f_src, func.__name__)) | ||
586 | func(f_src, f_dst) | ||
587 | break | ||
588 | else: | ||
589 | src = opj(cwd, f) | ||
590 | try: | ||
591 | copy(src, opj(dir_out, cwd_site)) | ||
592 | except OSError: | ||
593 | # some filesystems like FAT won't allow shutil.copy | ||
594 | shutil.copyfile(src, opj(dir_out, cwd_site, f)) | ||
595 | |||
596 | pages.sort(key=lambda p: int(p.get("sval", "0"))) | ||
597 | |||
598 | macros["pages"] = pages | ||
599 | |||
600 | # ------------------------------------------------------------------------- | ||
601 | # run pre-convert hooks in macro module (named 'once' before) | ||
602 | # ------------------------------------------------------------------------- | ||
603 | |||
604 | hooks = [a for a in macros if re.match(r'hook_preconvert_|once_', a)] | ||
605 | for fn in sorted(hooks): | ||
606 | macros[fn]() | ||
607 | |||
608 | # ------------------------------------------------------------------------- | ||
609 | # convert pages (markdown to HTML) | ||
610 | # ------------------------------------------------------------------------- | ||
611 | |||
612 | for page in pages: | ||
613 | |||
614 | print("info : convert %s" % page) | ||
615 | |||
616 | # replace expressions and statements in page source | ||
617 | macros["page"] = page | ||
618 | out = regx_eval.sub(repl_eval, page.source) | ||
619 | out = regx_exec.sub(repl_exec, out) | ||
620 | |||
621 | # convert to HTML | ||
622 | page.html = markdown.Markdown(extensions=opts.md_ext).convert(out) | ||
623 | |||
624 | # ------------------------------------------------------------------------- | ||
625 | # run post-convert hooks in macro module | ||
626 | # ------------------------------------------------------------------------- | ||
627 | |||
628 | hooks = [a for a in macros if a.startswith("hook_postconvert_")] | ||
629 | for fn in sorted(hooks): | ||
630 | macros[fn]() | ||
631 | |||
632 | # ------------------------------------------------------------------------- | ||
633 | # render complete HTML pages | ||
634 | # ------------------------------------------------------------------------- | ||
635 | |||
636 | with codecs.open(opj(project, "page.html"), 'r', opts.input_enc) as fp: | ||
637 | skeleton = fp.read() | ||
638 | |||
639 | for page in pages: | ||
640 | |||
641 | print("info : render %s" % page.url) | ||
642 | |||
643 | # replace expressions and statements in page.html | ||
644 | macros["page"] = page | ||
645 | macros["__content__"] = page.html | ||
646 | out = regx_eval.sub(repl_eval, skeleton) | ||
647 | out = regx_exec.sub(repl_exec, out) | ||
648 | |||
649 | # un-escape escaped python code blocks | ||
650 | out = regx_escp.sub(repl_escp, out) | ||
651 | |||
652 | # make relative links absolute | ||
653 | out = regx_rurl.sub(repl_rurl, out) | ||
654 | |||
655 | # write HTML page | ||
656 | fname = page.fname.replace(dir_in, dir_out) | ||
657 | fname = re.sub(MKD_PATT, ".html", fname) | ||
658 | with codecs.open(fname, 'w', opts.output_enc) as fp: | ||
659 | fp.write(out) | ||
660 | |||
661 | print("success: built project") | ||
662 | |||
663 | # ============================================================================= | ||
664 | # serve site | ||
665 | # ============================================================================= | ||
666 | |||
667 | def serve(project, port): | ||
668 | """Temporary serve a site project.""" | ||
669 | |||
670 | root = opj(project, "output") | ||
671 | if not os.listdir(project): | ||
672 | print("abort : output dir is empty (build project first!)") | ||
673 | sys.exit(1) | ||
674 | |||
675 | os.chdir(root) | ||
676 | server = HTTPServer(('', port), SimpleHTTPRequestHandler) | ||
677 | server.serve_forever() | ||
678 | |||
679 | # ============================================================================= | ||
680 | # options | ||
681 | # ============================================================================= | ||
682 | |||
683 | def options(): | ||
684 | """Parse and validate command line arguments.""" | ||
685 | |||
686 | usage = ("Usage: %prog --init [OPTIONS] [path/to/project]\n" | ||
687 | " %prog --build [OPTIONS] [path/to/project]\n" | ||
688 | " %prog --serve [OPTIONS] [path/to/project]\n" | ||
689 | "\n" | ||
690 | " Project path is optional, '.' is used as default.") | ||
691 | |||
692 | op = optparse.OptionParser(usage=usage) | ||
693 | |||
694 | op.add_option("-i" , "--init", action="store_true", default=False, | ||
695 | help="init project") | ||
696 | op.add_option("-b" , "--build", action="store_true", default=False, | ||
697 | help="build project") | ||
698 | op.add_option("-s" , "--serve", action="store_true", default=False, | ||
699 | help="serve project") | ||
700 | |||
701 | og = optparse.OptionGroup(op, "Init options") | ||
702 | og.add_option("", "--theme", type="choice", default="minimal", | ||
703 | choices=THEME_NAMES, | ||
704 | help="theme for a new project (choices: %s)" % ', '.join(THEME_NAMES)) | ||
705 | op.add_option_group(og) | ||
706 | |||
707 | og = optparse.OptionGroup(op, "Build options") | ||
708 | og.add_option("", "--base-url", default="/", metavar="URL", | ||
709 | help="base url for relative links (default: /)") | ||
710 | og.add_option("" , "--ignore", default=r"^\.|~$", metavar="REGEX", | ||
711 | help="input files to ignore (default: '^\.|~$')") | ||
712 | og.add_option("" , "--md-ext", default=[], metavar="EXT", | ||
713 | action="append", help="enable a markdown extension") | ||
714 | og.add_option("", "--input-enc", default="utf-8", metavar="ENC", | ||
715 | help="encoding of input pages (default: utf-8)") | ||
716 | og.add_option("", "--output-enc", default="utf-8", metavar="ENC", | ||
717 | help="encoding of output pages (default: utf-8)") | ||
718 | og.add_option("", "--filename-enc", default="utf-8", metavar="ENC", | ||
719 | help="encoding of file names (default: utf-8)") | ||
720 | op.add_option_group(og) | ||
721 | |||
722 | og = optparse.OptionGroup(op, "Serve options") | ||
723 | og.add_option("" , "--port", default=8080, | ||
724 | metavar="PORT", type="int", | ||
725 | help="port for serving (default: 8080)") | ||
726 | op.add_option_group(og) | ||
727 | |||
728 | opts, args = op.parse_args() | ||
729 | |||
730 | if opts.init + opts.build + opts.serve < 1: | ||
731 | op.print_help() | ||
732 | op.exit() | ||
733 | |||
734 | opts.project = args and args[0] or "." | ||
735 | |||
736 | return opts | ||
737 | |||
738 | # ============================================================================= | ||
739 | # main | ||
740 | # ============================================================================= | ||
741 | |||
742 | def main(): | ||
743 | |||
744 | opts = options() | ||
745 | |||
746 | if opts.init: | ||
747 | init(opts.project, opts.theme) | ||
748 | if opts.build: | ||
749 | build(opts.project, opts) | ||
750 | if opts.serve: | ||
751 | serve(opts.project, opts.port) | ||
752 | |||
753 | if __name__ == '__main__': | ||
754 | |||
755 | main() | ||
diff --git a/logo/monitoring-plugins-logo.svg b/logo/monitoring-plugins-logo.svg new file mode 100644 index 0000000..a4c0a8c --- /dev/null +++ b/logo/monitoring-plugins-logo.svg | |||
@@ -0,0 +1,5 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <svg enable-background="new 0 0 400 400" version="1.1" viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg"> | ||
3 | <path d="m229 401h-227.96v-399.9h399.8v399.9h-171.84m-98.055-111.4c1.7595 20.751 4.3705 41.345 11.996 60.93 5.556 14.27 14.202 25.384 29.983 29.38 3.7832 0.95801 7.5948 0.96225 9.4829-2.0467 1.3598-2.1671 1.2246-6.1725 0.2316-8.7766-10.271-26.935-18.244-54.49-23.244-82.887-0.41646-2.3651-0.3638-4.8129-0.54993-7.5258 1.6416 0.078552 2.6109 0.085235 3.5721 0.17694 13.877 1.3241 27.579 2.5204 41.691 0.56299 28.225-3.9149 52.43-15.397 72.53-35.277 22.102-21.86 34.147-48.73 37.423-79.539 3.0643-28.819-1.9521-56.049-17.23-80.919-20.046-32.631-50.418-49.55-87.486-54.154-29.996-3.7251-58.167 2.449-82.749 21.404-16.565 12.773-31.464 26.838-37.419 47.729-3.4788 12.203-4.0628 24.657 0.88403 36.729 3.2219 7.8627 10.57 10.836 18.322 7.8787 7.7131-2.9429 11.067-10.127 8.3491-18.211-1.056-3.1413-2.3707-6.2034-3.6993-9.2441-5.3279-12.194-4.9894-24.464 0.64456-36.253 11.889-24.878 33.148-37.834 59.224-42.202 22.455-3.7619 43.711 1.6097 61.999 15.816 32.137 24.964 46.402 59.195 48.755 98.669 1.5185 25.467-5.4491 49.322-18.382 71.434-21.057 36.002-60.218 56.441-103.39 44.8-3.4929-0.9419-5.5533-2.5361-5.7879-6.3405-0.584-9.4685-1.9139-18.93-1.8783-28.39 0.07956-21.141 0.62759-42.285 1.3168-63.417 0.99449-30.494 4.9942-60.649 10.773-90.59 0.27675-1.4338-0.89792-3.1478-1.3967-4.7313-1.5896 0.81478-3.9243 1.2223-4.633 2.5187-2.3822 4.3581-4.7028 8.8782-6.1167 13.614-5.0264 16.836-10.395 33.623-14.241 50.741-3.4882 15.525-5.8868 31.387-7.4399 47.231-1.7858 18.216-2.1077 36.576-3.097 54.872-0.048386 0.89488-0.39987 1.7734-0.81609 3.5269-2.3973-2.1286-4.0817-3.9067-6.0385-5.3032-4.1583-2.9678-8.33-5.9581-12.741-8.5165-3.4146-1.9803-7.6648-2.1283-10.029 1.1114-1.9518 2.675-2.7932 6.5781-2.9524 9.9918-0.1012 2.1696 1.6509 4.6517 3.0787 6.6275 6.1984 8.5777 15.354 13.015 24.774 16.868 3.3218 1.3587 5.2033 3.0851 5.3024 6.8225 0.12363 4.6573 0.61266 9.305 0.98292 14.89z" fill="#5A95C7"/> | ||
4 | <path d="m130.93 289.13c-0.35075-5.1186-0.83978-9.7663-0.96341-14.424-0.099182-3.7374-1.9807-5.4638-5.3024-6.8225-9.4199-3.8531-18.576-8.2907-24.774-16.868-1.4278-1.9758-3.1799-4.4579-3.0787-6.6275 0.15923-3.4137 1.0006-7.3168 2.9524-9.9918 2.3639-3.2398 6.6141-3.0918 10.029-1.1114 4.4114 2.5584 8.5831 5.5487 12.741 8.5165 1.9568 1.3966 3.6412 3.1747 6.0385 5.3032 0.41621-1.7535 0.7677-2.632 0.81609-3.5269 0.98932-18.296 1.3112-36.655 3.097-54.872 1.5532-15.843 3.9518-31.706 7.4399-47.231 3.8461-17.118 9.2148-33.906 14.241-50.741 1.4139-4.7359 3.7345-9.256 6.1167-13.614 0.70863-1.2964 3.0433-1.7039 4.633-2.5187 0.49876 1.5835 1.6734 3.2975 1.3967 4.7313-5.7792 29.942-9.7789 60.097-10.773 90.59-0.68918 21.132-1.2372 42.276-1.3168 63.417-0.035598 9.4601 1.2943 18.921 1.8783 28.39 0.23465 3.8044 2.2951 5.3987 5.7879 6.3405 43.169 11.641 82.33-8.7983 103.39-44.8 12.933-22.113 19.901-45.967 18.382-71.434-2.3535-39.473-16.618-73.704-48.755-98.669-18.288-14.206-39.543-19.578-61.999-15.816-26.077 4.3687-47.336 17.325-59.224 42.202-5.6339 11.789-5.9725 24.059-0.64456 36.253 1.3286 3.0406 2.6433 6.1027 3.6993 9.2441 2.7177 8.0844-0.63596 15.268-8.3491 18.211-7.7522 2.9578-15.1-0.015976-18.322-7.8787-4.9468-12.072-4.3629-24.526-0.88403-36.729 5.9557-20.891 20.855-34.956 37.419-47.729 24.582-18.955 52.753-25.129 82.749-21.404 37.068 4.6033 67.44 21.522 87.486 54.154 15.278 24.87 20.295 52.1 17.23 80.919-3.276 30.809-15.321 57.679-37.423 79.539-20.101 19.88-44.305 31.362-72.53 35.277-14.112 1.9574-27.815 0.76108-41.691-0.56299-0.96117-0.091705-1.9304-0.098388-3.5721-0.17694 0.18613 2.7129 0.13347 5.1607 0.54993 7.5258 5 28.397 12.973 55.952 23.244 82.887 0.99298 2.6041 1.1282 6.6096-0.2316 8.7766-1.888 3.009-5.6997 3.0047-9.4829 2.0467-15.781-3.9961-24.427-15.11-29.983-29.38-7.6255-19.585-10.237-40.179-12.016-61.397z" fill="#023560"/> | ||
5 | </svg> | ||
@@ -2,7 +2,9 @@ Web Site Design | |||
2 | =============== | 2 | =============== |
3 | 3 | ||
4 | The Monitoring Plugins web site is generated using | 4 | The Monitoring Plugins web site is generated using |
5 | <https://bitbucket.org/obensonne/poole>. | 5 | <https://hg.sr.ht/~obensonne/poole>. |
6 | |||
7 | The following helper sites are dead by now, unfortunately: | ||
6 | 8 | ||
7 | Color scheme | 9 | Color scheme |
8 | ------------ | 10 | ------------ |
diff --git a/web/input/development.md b/web/input/development.md index 10411c8..67cd3a8 100644 --- a/web/input/development.md +++ b/web/input/development.md | |||
@@ -48,15 +48,15 @@ commands: | |||
48 | Also see our testing-related [development FAQs][dev-faq]. | 48 | Also see our testing-related [development FAQs][dev-faq]. |
49 | 49 | ||
50 | [team]: team.html "Monitoring Plugins Development Team" | 50 | [team]: team.html "Monitoring Plugins Development Team" |
51 | [nagios]: http://www.nagios.org/ "Nagios" | 51 | [nagios]: https://www.nagios.org/ "Nagios" |
52 | [github]: https://github.com/ "GitHub" | 52 | [github]: https://github.com/ "GitHub" |
53 | [fork]: https://help.github.com/articles/fork-a-repo "Fork Documentation" | 53 | [fork]: https://help.github.com/articles/fork-a-repo "Fork Documentation" |
54 | [pull]: https://help.github.com/articles/using-pull-requests "Pull Request Documentation" | 54 | [pull]: https://help.github.com/articles/using-pull-requests "Pull Request Documentation" |
55 | [git-intro]: doc/faq/git.html "Quick Git Introduction" | 55 | [git-intro]: doc/faq/git.html "Quick Git Introduction" |
56 | [git-ref]: doc/faq/git.html#references "Git References" | 56 | [git-ref]: doc/faq/git.html#references "Git References" |
57 | [master-img]: https://github.com/monitoring-plugins/monitoring-plugins/actions/workflows/test.yml/badge.svg?branch=master"Build Status master" | 57 | [master-img]: https://github.com/monitoring-plugins/monitoring-plugins/actions/workflows/test.yml/badge.svg?branch=master "Build Status master" |
58 | [coverity-img]: https://scan.coverity.com/projects/1435/badge.svg?flat=1 "Coverity Metric" | 58 | [coverity-img]: https://scan.coverity.com/projects/1435/badge.svg?flat=1 "Coverity Metric" |
59 | [libtap]: http://jc.ngo.org.uk/trac-bin/trac.cgi/wiki/LibTap "LibTap Homepage" | 59 | [libtap]: https://github.com/zorgnax/libtap "LibTap Homepage" |
60 | [dev-faq]: doc/faq/#development "Development FAQs" | 60 | [dev-faq]: doc/faq/#development "Development FAQs" |
61 | [github-actions]: https://docs.github.com/en/actions "GitHub Docs - GitHub Actions" | 61 | [github-actions]: https://docs.github.com/en/actions "GitHub Docs - GitHub Actions" |
62 | [github-ci-actions]: https://github.com/monitoring-plugins/monitoring-plugins/actions "Monitoring Plugins - Github Workflows" | 62 | [github-ci-actions]: https://github.com/monitoring-plugins/monitoring-plugins/actions "Monitoring Plugins - Github Workflows" |
diff --git a/web/input/download.md b/web/input/download.md index 8c77023..b60b49f 100644 --- a/web/input/download.md +++ b/web/input/download.md | |||
@@ -17,10 +17,9 @@ from here: | |||
17 | 17 | ||
18 | See the [release history][news] for an overview of changes between earlier | 18 | See the [release history][news] for an overview of changes between earlier |
19 | versions. Old releases can be found in the [download area][download]. There | 19 | versions. Old releases can be found in the [download area][download]. There |
20 | are FTP mirrors available in [Belgium][mirror-be], [China][mirror-cn], | 20 | are mirrors available in [Belgium][mirror-be], [China][mirror-cn], |
21 | [Germany][mirror-de], [Greece][mirror-gr], [Korea][mirror-kr], [New | 21 | [Germany][mirror-de], [Greece][mirror-gr], [Korea][mirror-kr], |
22 | Zealand][mirror-nz], [Portugal][mirror-pt], [Russia][mirror-ru], [South | 22 | [Portugal][mirror-pt], [Russia][mirror-ru], [Sweden][mirror-se], and the |
23 | Africa][mirror-za], [Sweden][mirror-se], the [UK][mirror-uk], and the | ||
24 | [USA][mirror-us]. | 23 | [USA][mirror-us]. |
25 | 24 | ||
26 | ### Development Snapshot | 25 | ### Development Snapshot |
@@ -38,7 +37,7 @@ directory][snapshot] of the [download area][download]. | |||
38 | 37 | ||
39 | The Monitoring::Plugin module is available from [CPAN][cpan]: | 38 | The Monitoring::Plugin module is available from [CPAN][cpan]: |
40 | 39 | ||
41 | * <http://search.cpan.org/dist/Monitoring-Plugin/> | 40 | * <https://metacpan.org/dist/Monitoring-Plugin> |
42 | 41 | ||
43 | ## NagiosMIB | 42 | ## NagiosMIB |
44 | 43 | ||
@@ -49,24 +48,22 @@ The current NagiosMIB tarball is available from here: | |||
49 | Old versions can be found [within][mib] the [download area][download]. | 48 | Old versions can be found [within][mib] the [download area][download]. |
50 | 49 | ||
51 | [announcement]: {{release_notes}} "Release Announcement" | 50 | [announcement]: {{release_notes}} "Release Announcement" |
52 | [mirror-be]: ftp://ftp.belnet.be/mirror/nagios-plugins.org/ "FTP Mirror in Belgium" | 51 | [mirror-be]: https://ftp.belnet.be/mirror/nagios-plugins.org/ "Mirror in Belgium" |
53 | [mirror-cn]: http://mirrors.ustc.edu.cn/monitoring-plugins/ "HTTP Mirror in China" | 52 | [mirror-cn]: https://mirrors.ustc.edu.cn/monitoring-plugins/ "Mirror in China" |
54 | [mirror-de]: ftp://ftp.fu-berlin.de/unix/network/monitoring-plugins/ "FTP Mirror in Germany" | 53 | [mirror-de]: https://ftp.fu-berlin.de/unix/network/monitoring-plugins/ "Mirror in Germany" |
55 | [mirror-gr]: ftp://ftp.cc.uoc.gr/mirrors/monitoring-plugins/ "FTP Mirror in Greece" | 54 | [mirror-gr]: https://ftp.cc.uoc.gr/mirrors/monitoring-plugins/ "Mirror in Greece" |
56 | [mirror-kr]: ftp://ftp.kaist.ac.kr/nagios-plugins/ "FTP Mirror in Korea" | 55 | [mirror-kr]: https://ftp.kaist.ac.kr/nagios-plugins/ "Mirror in Korea" |
57 | [mirror-nz]: ftp://mirror.webtastix.net/monitoring-plugins/ "FTP Mirror in New Zealand" | 56 | [mirror-pt]: https://mirrors.fe.up.pt/pub/monitoring-plugins/ "Mirror in Portugal" |
58 | [mirror-pt]: ftp://mirrors.fe.up.pt/pub/monitoring-plugins/ "FTP Mirror in Portugal" | 57 | [mirror-ru]: http://mirror.mephi.ru/nagios-plugins/ "Mirror in Russia" |
59 | [mirror-ru]: ftp://mirror.mephi.ru/nagios-plugins/ "FTP Mirror in Russia" | 58 | [mirror-se]: https://ftp.lysator.liu.se/pub/monitoring-plugins/ "Mirror in Sweden" |
60 | [mirror-za]: ftp://mirror.is.co.za/mirror/monitoring-plugins.org/ "FTP Mirror in South Africa" | 59 | [mirror-uk]: https://mirror.bytemark.co.uk/monitoring-plugins/ "Mirror in the United Kingdom" |
61 | [mirror-se]: ftp://ftp.lysator.liu.se/pub/monitoring-plugins/ "FTP Mirror in Sweden" | 60 | [mirror-us]: https://ftp2.osuosl.org/pub/monitoring-plugins/ "Mirror in the United States" |
62 | [mirror-uk]: ftp://mirror.bytemark.co.uk/monitoring-plugins/ "FTP Mirror in the United Kingdom" | ||
63 | [mirror-us]: ftp://ftp.osuosl.org/pub/monitoring-plugins/ "FTP Mirror in the United States" | ||
64 | [repository]: https://github.com/monitoring-plugins/monitoring-plugins "Monitoring Plugins Git Repository" | 61 | [repository]: https://github.com/monitoring-plugins/monitoring-plugins "Monitoring Plugins Git Repository" |
65 | [news]: doc/news.txt "NEWS" | 62 | [news]: doc/news.txt "NEWS" |
66 | [download]: download/ "Download Area" | 63 | [download]: download/ "Download Area" |
67 | [snapshot]: download/snapshot/ "Snapshot Directory" | 64 | [snapshot]: download/snapshot/ "Snapshot Directory" |
68 | [mib]: download/mib/ "NagiosMIB Directory" | 65 | [mib]: download/mib/ "NagiosMIB Directory" |
69 | [cpan]: http://www.cpan.org/ "CPAN" | 66 | [cpan]: https://www.cpan.org/ "CPAN" |
70 | [tar1]: download/monitoring-plugins-{{plugins_release}}.tar.gz "Current Release Tarball" | 67 | [tar1]: download/monitoring-plugins-{{plugins_release}}.tar.gz "Current Release Tarball" |
71 | [sum1]: download/monitoring-plugins-{{plugins_release}}.tar.gz.sha1 "SHA-1 Sum" | 68 | [sum1]: download/monitoring-plugins-{{plugins_release}}.tar.gz.sha1 "SHA-1 Sum" |
72 | [tar2]: download/snapshot/monitoring-plugins-master.tar.gz "Current Snapshot Tarball" | 69 | [tar2]: download/snapshot/monitoring-plugins-master.tar.gz "Current Snapshot Tarball" |
diff --git a/web/input/impressum.md b/web/input/impressum.md index 83984cb..d79ea74 100644 --- a/web/input/impressum.md +++ b/web/input/impressum.md | |||
@@ -9,12 +9,12 @@ parent: Home | |||
9 | Responsible for the content of this site: | 9 | Responsible for the content of this site: |
10 | 10 | ||
11 | Holger Weiß | 11 | Holger Weiß |
12 | Gutsmuthsstr. 19 | 12 | Buggestr. 11 |
13 | 12163 Berlin | 13 | 12163 Berlin |
14 | Germany | 14 | Germany |
15 | 15 | ||
16 | **Phone:** | 16 | **Phone:** |
17 |   +49 30 61286685 | 17 |   +49 160 7282852 |
18 | 18 | ||
19 | **Email:** | 19 | **Email:** |
20 |   holger@zedat.fu-berlin.de | 20 |   holger@zedat.fu-berlin.de |
@@ -22,6 +22,6 @@ Germany | |||
22 | **Jabber:** | 22 | **Jabber:** |
23 |   holger@jabber.fu-berlin.de | 23 |   holger@jabber.fu-berlin.de |
24 | 24 | ||
25 | [law]: http://www.gesetze-im-internet.de/tmg/__5.html | 25 | [law]: https://www.gesetze-im-internet.de/ddg/__5.html |
26 | 26 | ||
27 | <!--% # vim:set filetype=markdown textwidth=78 joinspaces expandtab: # %--> | 27 | <!--% # vim:set filetype=markdown textwidth=78 joinspaces expandtab: # %--> |
diff --git a/web/input/index.md b/web/input/index.md index 93e7286..29a9285 100644 --- a/web/input/index.md +++ b/web/input/index.md | |||
@@ -2,7 +2,7 @@ title: Home | |||
2 | menu: 1 | 2 | menu: 1 |
3 | --- | 3 | --- |
4 | 4 | ||
5 | # The Monitoring Plugins Project | 5 | # Monitoring Plugins |
6 | 6 | ||
7 | We, the [Monitoring Plugins Development Team][team], maintain a bundle of more | 7 | We, the [Monitoring Plugins Development Team][team], maintain a bundle of more |
8 | than fifty standard plugins for [Icinga][icinga], [Naemon][naemon], | 8 | than fifty standard plugins for [Icinga][icinga], [Naemon][naemon], |
@@ -33,25 +33,25 @@ monitoring products as well. | |||
33 | You can get the latest releases from the [download page][download]. | 33 | You can get the latest releases from the [download page][download]. |
34 | 34 | ||
35 | [team]: team.html "Monitoring Plugins Development Team" | 35 | [team]: team.html "Monitoring Plugins Development Team" |
36 | [icinga]: https://www.icinga.org/ "Icinga" | 36 | [icinga]: https://icinga.com/ "Icinga" |
37 | [naemon]: http://naemon.github.io/ "Naemon" | 37 | [naemon]: https://www.naemon.io/ "Naemon" |
38 | [nagios]: http://www.nagios.org/ "Nagios" | 38 | [nagios]: https://www.nagios.org/ "Nagios" |
39 | [sensu]: http://sensuapp.org/ "Sensu" | 39 | [sensu]: https://sensu.io/ "Sensu" |
40 | [shinken]: http://www.shinken-monitoring.org/ "Shinken" | 40 | [shinken]: https://github.com/shinken-solutions/shinken "Shinken" |
41 | [load]: doc/man/check_load.html "check_load" | 41 | [load]: doc/man/check_load.html "check_load" |
42 | [procs]: doc/man/check_procs.html "check_procs" | 42 | [procs]: doc/man/check_procs.html "check_procs" |
43 | [disk]: doc/man/check_disk.html "check_disk" | 43 | [disk]: doc/man/check_disk.html "check_disk" |
44 | [icmp]: doc/man/check_icmp.html "check_icmp" | 44 | [icmp]: doc/man/check_icmp.html "check_icmp" |
45 | [snmp]: doc/man/check_snmp.html "check_snmp" | 45 | [snmp]: doc/man/check_snmp.html "check_snmp" |
46 | [http]: doc/man/check_http.html "check_http" | 46 | [http]: doc/man/check_http.html "check_http" |
47 | [nagex]: http://exchange.nagios.org/directory/Plugins "Plugins on Nagios Exchange" | 47 | [nagex]: https://exchange.nagios.org/directory/Plugins "Plugins on Nagios Exchange" |
48 | [icnex]: https://exchange.icinga.org/dig/Plugins "Plugins on Icinga Exchange" | 48 | [icnex]: https://exchange.icinga.com/ "Icinga Exchange" |
49 | [module]: http://search.cpan.org/dist/Monitoring-Plugin/ "Monitoring::Plugin Module" | 49 | [module]: https://metacpan.org/dist/Monitoring-Plugin "Monitoring::Plugin Module" |
50 | [guidelines]: doc/guidelines.html "Monitoring Plugin Development Guidelines" | 50 | [guidelines]: doc/guidelines.html "Monitoring Plugin Development Guidelines" |
51 | [perl-plugins]: doc/writing-perl-plugins.html "Monitoring::Plugin Presentation" | 51 | [perl-plugins]: doc/writing-perl-plugins.html "Monitoring::Plugin Presentation" |
52 | [rename]: news/new-project-name.html "New Project Name" | 52 | [rename]: news/new-project-name.html "New Project Name" |
53 | [history]: http://www.nagios.org/about/history "Nagios (Plugins) History" | 53 | [history]: https://www.nagios.org/about/history/ "Nagios (Plugins) History" |
54 | [folks]: http://www.nagios.org/about/team "Nagios Team" | 54 | [folks]: https://www.nagios.org/team/ "Nagios Team" |
55 | [download]: download.html "Download" | 55 | [download]: download.html "Download" |
56 | 56 | ||
57 | <!--% # vim:set filetype=markdown textwidth=78 joinspaces expandtab: # %--> | 57 | <!--% # vim:set filetype=markdown textwidth=78 joinspaces expandtab: # %--> |
diff --git a/web/input/news/bluehats-prize.md b/web/input/news/bluehats-prize.md new file mode 100644 index 0000000..b17a5b1 --- /dev/null +++ b/web/input/news/bluehats-prize.md | |||
@@ -0,0 +1,39 @@ | |||
1 | title: Monitoring Plugins Wins BlueHats Prize | ||
2 | author: Holger Weiß | ||
3 | date: 2024-12-30 | ||
4 | --- | ||
5 | |||
6 | As [announced](https://nlnet.nl/bluehatsprize/2024/4.html) by the NLnet | ||
7 | Foundation, the Monitoring Plugins team is the winner of the fourth 2024 | ||
8 | BlueHats prize!<end-of-teaser> | ||
9 | |||
10 | [BlueHats][bluehats] prizes are an initiative by the French Interministerial | ||
11 | Digital Directorate. They are awarded to maintainers of critical free and open | ||
12 | source projects. In 2024, four prizes of € 10,000 each have been given out. | ||
13 | |||
14 | The jury, made up of public officials from [ANSSI][anssi] and [DINUM][dinum], | ||
15 | recognised the central role of Monitoring Plugins in the running of Internet | ||
16 | services. Monitoring Plugins is critical infrastructure that is widely used and | ||
17 | relies on a small group of contributors. The interface is simple, but the tasks | ||
18 | that the plugins perform can be hard to perform and has to be efficient. Since | ||
19 | so many systems run these programs often, they need to be reliable and safe. | ||
20 | |||
21 | A representative of DINUM says: | ||
22 | |||
23 | > We know for sure that many public administrations depend indirectly on Monitoring Plugins: this project is typical of a niche Free Software initiative that helps other tools to remain accurate, here in the monitoring area. We hope that this award will help the maintainers to get more sponsors and direct contributions! | ||
24 | |||
25 | The Monitoring Plugins team is honored by the recognition by the jury. As a | ||
26 | small corner stone of many IT monitoring solutions, we are seldom as visible as | ||
27 | big name projects, but are happy to contribute our part to support the | ||
28 | infrastructure all of us rely on in our society. Especially as infrastructure | ||
29 | is often boring (as it should be), it is not often visible and usually only | ||
30 | receives attention when it fails. In this spirit we are particulary thankful | ||
31 | for people and institutions who care about the small and boring little cogs of | ||
32 | the big machinery. This is not self-evident and we appreciate the effort and | ||
33 | hope to continue to provide reliable software to the world. | ||
34 | |||
35 | [bluehats]: https://code.gouv.fr/en/bluehats/ | ||
36 | [anssi]: https://cyber.gouv.fr/en | ||
37 | [dinum]: https://www.numerique.gouv.fr/dinum/ | ||
38 | |||
39 | <!--% # vim:set filetype=markdown textwidth=78 joinspaces expandtab: # %--> | ||
diff --git a/web/input/news/release-2-3-2.md b/web/input/news/release-2-3-2.md new file mode 100644 index 0000000..e2e99b7 --- /dev/null +++ b/web/input/news/release-2-3-2.md | |||
@@ -0,0 +1,109 @@ | |||
1 | title: Version 2.3.2 Released | ||
2 | author: Sven Nierlein | ||
3 | date: 2022-10-20 | ||
4 | --- | ||
5 | |||
6 | The Monitoring Plugins Development Team is proud to announce version 2.3.2 of | ||
7 | the Monitoring Plugins! This release comes with various fixes provided by more | ||
8 | than 40 contributors. Many thanks to all of you! | ||
9 | <end-of-teaser> | ||
10 | |||
11 | For the list of notable changes in this release, see below. | ||
12 | |||
13 | You can get the tarball from our [download page][download]. | ||
14 | |||
15 | |||
16 | ### General | ||
17 | * Use netcat-openbsd for debian explicitely by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1704 | ||
18 | * Replace egrep with grep -E by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1791 | ||
19 | * Use silent automake by default by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1747 | ||
20 | |||
21 | ### Single Plugins | ||
22 | * `check_by_ssh`: added option to exit with an warning, if there is output on STDERR by @nafets in https://github.com/monitoring-plugins/monitoring-plugins/pull/1301 | ||
23 | * `check_by_ssh`: Add "-U" flag (#1123). by @archiecobbs in https://github.com/monitoring-plugins/monitoring-plugins/pull/1774 | ||
24 | * `check_by_ssh`: Let ssh decide if a host is valid, enables usage of ssh .config file by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1691 | ||
25 | * `check_curl`: Add an option to check_curl to verify the peer certificate & host using the system CA's by @bazzisoft in https://github.com/monitoring-plugins/monitoring-plugins/pull/1669 | ||
26 | * `check_curl`: fixed -ffollow for HTTP/2.0 (Fixes #1685): added major_version parsing to PicoHTTPParser by @andreasbaumann in https://github.com/monitoring-plugins/monitoring-plugins/pull/1742 | ||
27 | * `check_curl`: fixes check_curl: "CRITICAL - Cannot retrieve certificate subject." by @andreasbaumann in https://github.com/monitoring-plugins/monitoring-plugins/pull/1689 | ||
28 | * `check_curl`: fix if http header contains leading spaces by @sni in https://github.com/monitoring-plugins/monitoring-plugins/pull/1666 | ||
29 | * `check_curl`: Update check_curl.c to display a specific human-readable error message where possible by @bazzisoft in https://github.com/monitoring-plugins/monitoring-plugins/pull/1668 | ||
30 | * `check_curl`: verify certificates option should not force SSL to be used by @bazzisoft in https://github.com/monitoring-plugins/monitoring-plugins/pull/1688 | ||
31 | * `check_disk`: Description for -M was the wrong way around by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1746 | ||
32 | * `check_disk`: Fixing the stuff that is broken on btrfs by @waja in https://github.com/monitoring-plugins/monitoring-plugins/pull/1388 | ||
33 | * `check_disk`: Fix perfdata for big values for check disk by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1714 | ||
34 | * `check_disk_smb`: Add configfile feature by @Napsty in https://github.com/monitoring-plugins/monitoring-plugins/pull/1402 | ||
35 | * `check_disk_smb`: Add timeout by @cdruee in https://github.com/monitoring-plugins/monitoring-plugins/pull/1770 | ||
36 | * `check_dns`: Add --expect-nxdomain by @Jonny007-MKD in https://github.com/monitoring-plugins/monitoring-plugins/pull/1623 | ||
37 | * `check_dns`: split multiple IP addresses passed in one -a argument by @DerDakon in https://github.com/monitoring-plugins/monitoring-plugins/pull/1649 | ||
38 | * `check_file_age`: Make size parameter a little bit more intelligible by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1730 | ||
39 | * `check_fping`: Implements 'host-alive' mode (Closes. #1027) by @waja in https://github.com/monitoring-plugins/monitoring-plugins/pull/1740 | ||
40 | * `check_game`: Update Url to qstat by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1725 | ||
41 | * `check_http`: changed 'STATE_CRITICAL' to 'STATE_WARNING' for infinite loop by @xFuture603 in https://github.com/monitoring-plugins/monitoring-plugins/pull/1690 | ||
42 | * `check_http`: Increase regexp limit by @hydrapolic in https://github.com/monitoring-plugins/monitoring-plugins/pull/1566 | ||
43 | * `check_http`: Support http redirect by @waja in https://github.com/monitoring-plugins/monitoring-plugins/pull/1449 | ||
44 | * `check_icmp`: buffer offerflow by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1733 | ||
45 | * `check_icmp`: delay set_source_ip() until address_family is detected by @ghciv6 in https://github.com/monitoring-plugins/monitoring-plugins/pull/1735 | ||
46 | * `check_icmp`: Fix "Invalid Argument" from sendmsg() under FreeBSD 13.1 and "setsockopt failed" for TTL setting by @eriksejr in https://github.com/monitoring-plugins/monitoring-plugins/pull/1771 | ||
47 | * `check_icmp`: Fix pkt perfdata in check_host mode by @sjoegren in https://github.com/monitoring-plugins/monitoring-plugins/pull/1721 | ||
48 | * `check_ldap`: Allows check_ldap to read password from environment variable by @mullumaus in https://github.com/monitoring-plugins/monitoring-plugins/pull/1724 | ||
49 | * `check_load`: add LOAD prefix to load plugin by @haraldj in https://github.com/monitoring-plugins/monitoring-plugins/pull/1694 | ||
50 | * `check_load`: Display total and scaled load values if check_load scales the values by number of CPUs by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1778 | ||
51 | * `check_log`: Missing oldlog now aborts check_log by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1732 | ||
52 | * `check_mailq`: Add mailq -C option for config dir or config file by @leeclemens in https://github.com/monitoring-plugins/monitoring-plugins/pull/1490 | ||
53 | * `check_mailq`: Check mailq domain specific warnings by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1731 | ||
54 | * `check_mailq`: Fix regexp for nullmailer "mailq" output by @darksoul42 in https://github.com/monitoring-plugins/monitoring-plugins/pull/1493 | ||
55 | * `check_mysql`: fix segfaults with mysql-connector-c #1562 by @ghciv6 in https://github.com/monitoring-plugins/monitoring-plugins/pull/1644 | ||
56 | * `check_pgsql`: add --queryname parameter to check_pgsql by @datamuc in https://github.com/monitoring-plugins/monitoring-plugins/pull/1741 | ||
57 | * `check_ping`: Do not show RTA if no connection was possible by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1697 | ||
58 | * `check_ping`: understang ping6 output from iputils package by @glensc in https://github.com/monitoring-plugins/monitoring-plugins/pull/1412 | ||
59 | * `check_proc`: Fix check proc ps detection by @sni in https://github.com/monitoring-plugins/monitoring-plugins/pull/1712 | ||
60 | * `check_procs`: exchange needle and haystack in strstr() for proper st… by @wolfgangkarall in https://github.com/monitoring-plugins/monitoring-plugins/pull/1654 | ||
61 | * `check_smtp`: add -L flag to support LMTP (LHLO instead of HELO/EHLO). by @ghen2 in https://github.com/monitoring-plugins/monitoring-plugins/pull/1715 | ||
62 | * `check_snmp`: Added option for null zero length string exit codes by @FracKenA in https://github.com/monitoring-plugins/monitoring-plugins/pull/1496 | ||
63 | * `check_snmp`: fix performance thresholds when using multiple oids by @sni in https://github.com/monitoring-plugins/monitoring-plugins/pull/1722 | ||
64 | * `check_snmp` fix segfaults by @adrb in https://github.com/monitoring-plugins/monitoring-plugins/pull/1589 | ||
65 | * `check_snmp`: put the "c" (to mark a counter) after the perfdata value by @lausser in https://github.com/monitoring-plugins/monitoring-plugins/pull/1465 | ||
66 | * `check_swap`: fix parsing swap values by @sni in https://github.com/monitoring-plugins/monitoring-plugins/pull/1780 | ||
67 | * `check_swap`: Fix perfdata for check swap by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1707 | ||
68 | * `check_swap`: Fix unit for total in perfdata by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1779 | ||
69 | * `check_swap`: Handle cached swap by @mdavranche in https://github.com/monitoring-plugins/monitoring-plugins/pull/1642 | ||
70 | * `check_swap`: Small fix to threshold validation and style (indentation) fixes by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1723 | ||
71 | * `check_ups`: Fix possible overflow in check_ups by @phibos in https://github.com/monitoring-plugins/monitoring-plugins/pull/1727 | ||
72 | * `check_uptime`: Add option to report uptime in days instead of seconds by @amotl in https://github.com/monitoring-plugins/monitoring-plugins/pull/1750 | ||
73 | * `check_uptime`: Fix/improve output message "Uptime is ..." by @amotl in https://github.com/monitoring-plugins/monitoring-plugins/pull/1751 | ||
74 | |||
75 | ### Multiple Plugins | ||
76 | * `check_http`, `check_curl`: added --max-redirs=N option (feature #1684) by @andreasbaumann in https://github.com/monitoring-plugins/monitoring-plugins/pull/1744 | ||
77 | * `check_http`, `check_curl`: Enhancement --continue-after-certificate (backport from nagios-plugins) by @andreasbaumann in https://github.com/monitoring-plugins/monitoring-plugins/pull/1762 | ||
78 | * `check_http`, `check_curl`: Remove check_http and check_curl test which are somehow always failing by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1777 | ||
79 | * `check_log`, `check_oracle`, `check_sensors`: Several fixes shellcheck complaining about by @waja in https://github.com/monitoring-plugins/monitoring-plugins/pull/1459 | ||
80 | * `sslutils`: use chain from client certificates by @tobiaswiese in https://github.com/monitoring-plugins/monitoring-plugins/pull/1664 | ||
81 | |||
82 | ### Non functional changes | ||
83 | * Trivial source code whitespace formatting fixes to standard. by @ziesemer in https://github.com/monitoring-plugins/monitoring-plugins/pull/1424 | ||
84 | * docs: fix simple typo, conspicuosly -> conspicuously by @timgates42 in https://github.com/monitoring-plugins/monitoring-plugins/pull/1652 | ||
85 | * Migrate to GitHub actions by @jacobbaungard in https://github.com/monitoring-plugins/monitoring-plugins/pull/1686 | ||
86 | * Point to Icinga Exchange instead of dead Monitoring Exchange by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1737 | ||
87 | * github actions: fix check_users test case by @sni in https://github.com/monitoring-plugins/monitoring-plugins/pull/1713 | ||
88 | * Add CodeQL checks by @phibos in https://github.com/monitoring-plugins/monitoring-plugins/pull/1682 | ||
89 | * Fix some QL problems by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1729 | ||
90 | * Update CodeQL and update runner before installing by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1775 | ||
91 | * `check_disk`: Check disk compiler warnings by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1758 | ||
92 | * `check_disk`: Trivial printf fix and a little bit of code style by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1695 | ||
93 | * `check_http`: Docs: make -C obvious by @stblassitude in https://github.com/monitoring-plugins/monitoring-plugins/pull/1554 | ||
94 | * `check_ifoperstatus`: Re-attach a comment to where it actually belongs by @peternewman in https://github.com/monitoring-plugins/monitoring-plugins/pull/1699 | ||
95 | * `check_ircd`: Restrict the nickname length of the test user for check_ircd by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1710 | ||
96 | * `check_load`: Check load compiler warnings by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1759 | ||
97 | * `check_log` Modernize check log by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1692 | ||
98 | * `check_mailq`: remove duplicate W=i/C=i args in check_mailq.pl by @ichdasich in https://github.com/monitoring-plugins/monitoring-plugins/pull/1755 | ||
99 | * `check_ntp`: Check ntp remove unused variables by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1781 | ||
100 | * `check_pgsql`: Using snprintf which honors the buffers size and guarantees null temination. (Closes: #1601) by @waja in https://github.com/monitoring-plugins/monitoring-plugins/pull/1663 | ||
101 | * `check_procs`: Fix double percentage sign in usage by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1743 | ||
102 | * `check_sensors.sh`: Make shellcheck happier by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1679 | ||
103 | * `check_snmp`: Fixed option description authpassword -> authpasswd + whitespaces by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1676 | ||
104 | * `check_swap`: Check swap compiler warnings by @RincewindsHat in https://github.com/monitoring-plugins/monitoring-plugins/pull/1756 | ||
105 | |||
106 | |||
107 | [download]: /download.html | ||
108 | |||
109 | <!--% # vim:set filetype=markdown textwidth=78 joinspaces expandtab: # %--> | ||
diff --git a/web/input/news/release-2-3-3.md b/web/input/news/release-2-3-3.md new file mode 100644 index 0000000..a87b07a --- /dev/null +++ b/web/input/news/release-2-3-3.md | |||
@@ -0,0 +1,59 @@ | |||
1 | title: Version 2.3.3 Released | ||
2 | author: Jan Wagner | ||
3 | date: 2023-02-02 | ||
4 | --- | ||
5 | |||
6 | The Monitoring Plugins Development Team is proud to announce version 2.3.3 of | ||
7 | the Monitoring Plugins! This release comes with various fixes provided by more | ||
8 | than 16 contributors. Many thanks to all of you! | ||
9 | <end-of-teaser> | ||
10 | |||
11 | For the list of notable changes in this release, see below. | ||
12 | |||
13 | You can get the tarball from our [download page][download]. | ||
14 | |||
15 | ### Enhancements | ||
16 | #### General | ||
17 | * using PRId64 and PRIu64 instead of %ld directly | ||
18 | #### Single Plugins | ||
19 | * check_http: Make faster with larger files | ||
20 | * check_snmp: add 'multiplier' to modify current value | ||
21 | * check_http: Implement chunked encoding decoding | ||
22 | * check_http/check_curl: add chunked encoding test | ||
23 | * check_log: Added --exclude to exclude patterns | ||
24 | * check_log: Add tests | ||
25 | * check_disk: Clarify usage possibilites | ||
26 | |||
27 | ### Fixes | ||
28 | #### General | ||
29 | * fixed two PRId64 to PRIu64 in perfdata_uint64 | ||
30 | #### Single Plugins | ||
31 | * check_pgsql: Removing is_pg_dbname alltogether,using postgres API. | ||
32 | * check_http: Remove superflous CRLF in HTTP-Requests | ||
33 | * check_curl: detect ipv6 | ||
34 | * check_icmp: fix parsing help/version long options | ||
35 | * check_http: fix test plan | ||
36 | * check_disk: Find accessible mount path if multiple are available | ||
37 | * check_apt: Fix unknown escape sequence error output | ||
38 | * check_curl: fix checking large bodys | ||
39 | * check_snmp: Improve tests for check_snmp & multiply option | ||
40 | * check_snmp: always apply format when applying multiplier | ||
41 | * check_http: Use real booleans instead of ints | ||
42 | * check_http: Document process_arguments a little bit better | ||
43 | * check_http: Remove dead code | ||
44 | * check_http: Fix several bug in the implementation of unchunking | ||
45 | * check_http: Reformat a part to increase readability | ||
46 | * check_apt: Put upgrade options in the root sections | ||
47 | * check_apt: Fix comment | ||
48 | * check_apt: Use real booleans | ||
49 | * check_mailq: Fixing nullmailer regex | ||
50 | * check_snmp: Fix regex matches | ||
51 | * check_log: Fixed a bug when using --all | ||
52 | * check_log: Cleaned up duplicated code in the args | ||
53 | * check_http: Fix memory reallocation error in chunk decoding logic | ||
54 | * check_http: Add space for ending NULL byte in array for chunked encoding | ||
55 | |||
56 | |||
57 | [download]: /download.html | ||
58 | |||
59 | <!--% # vim:set filetype=markdown textwidth=78 joinspaces expandtab: # %--> | ||
diff --git a/web/input/news/release-2-3-4.md b/web/input/news/release-2-3-4.md new file mode 100644 index 0000000..5b68282 --- /dev/null +++ b/web/input/news/release-2-3-4.md | |||
@@ -0,0 +1,52 @@ | |||
1 | title: Version 2.3.4 Released | ||
2 | author: Jan Wagner | ||
3 | date: 2023-10-18 | ||
4 | --- | ||
5 | |||
6 | The Monitoring Plugins Development Team is proud to announce version 2.3.4 of | ||
7 | the Monitoring Plugins! This release comes with various fixes provided by more | ||
8 | than 30 contributors. Many thanks to all of you! | ||
9 | <end-of-teaser> | ||
10 | |||
11 | For the list of notable changes in this release, see below. | ||
12 | |||
13 | You can get the tarball from our [download page][download]. | ||
14 | |||
15 | ### Enhancements | ||
16 | #### General | ||
17 | * Sync with the Gnulib code 668c0b8ffa | ||
18 | * Set autoconf prerequisite version to 2.64 | ||
19 | * Remove sha1 and use sha256 in some parts of the plugin structure | ||
20 | #### Single Plugins | ||
21 | * check_curl: added --cookie-jar and doing proper cleanup of libcurl | ||
22 | * check_curl: Include all IPs from getaddrinfo() in curl DNS cache | ||
23 | * check_dhcp: Add dhcp rogue detection | ||
24 | * check_disk: add ignore-missing option to return OK for missing fs | ||
25 | * check_disk_smb: allow checking 0-sized resource (ex. IPC$) | ||
26 | * check_disk: The options to include or exclude specific file systems now allow the usage of regex(7) | ||
27 | * check_icmp: Add support to Jitter, MOS and Score | ||
28 | * check_mysql: Detect running mysqldump and handle it more gracefully | ||
29 | * check_procs: Implement --exclude-process to exclude specific processes | ||
30 | * check_smtp: add new longoption --tls | ||
31 | * check_smtp: Add option to prefix PROXY header | ||
32 | * check_smtp: Add support for SMTP over TLS | ||
33 | * check_smtp: Add support for SNI | ||
34 | * check_snmp: Implement option to ignore mib file parsing errors | ||
35 | * check_users: prefer systemd-logind over utmp | ||
36 | |||
37 | ### Fixes | ||
38 | #### General | ||
39 | * A lot of compiler warnings were fixed | ||
40 | * Some code was refactored a little bit | ||
41 | #### Single Plugins | ||
42 | * check_disk: Display SI units correctly | ||
43 | * check_ircd: use pack_sockaddr_in rather than hand-rolled | ||
44 | * check_log/check_oracle/check_sensors: fixed the outputs of the help functionality | ||
45 | * check_mysql: Add mysql_close to avoid spamming the server logs | ||
46 | * check_smtp: add missing -r option in usage | ||
47 | * check_snmp: disable multiplier when unused | ||
48 | * check_wave: Use compile time determined path to snmpget | ||
49 | |||
50 | [download]: /download.html | ||
51 | |||
52 | <!--% # vim:set filetype=markdown textwidth=78 joinspaces expandtab: # %--> | ||
diff --git a/web/input/news/release-2-3-5.md b/web/input/news/release-2-3-5.md new file mode 100644 index 0000000..ff280e2 --- /dev/null +++ b/web/input/news/release-2-3-5.md | |||
@@ -0,0 +1,26 @@ | |||
1 | title: Version 2.3.5 Released | ||
2 | author: Jan Wagner | ||
3 | date: 2023-10-18 | ||
4 | --- | ||
5 | |||
6 | The Monitoring Plugins Development Team is proud to announce version 2.3.5 of | ||
7 | the Monitoring Plugins! This release comes just with a small fix preventing | ||
8 | the tarball from being built. Sorry for this. | ||
9 | |||
10 | <end-of-teaser> | ||
11 | |||
12 | For the list of notable changes in this release, see below. | ||
13 | |||
14 | You can get the tarball from our [download page][download]. | ||
15 | |||
16 | ### Fixes | ||
17 | #### General | ||
18 | * Include maxfd.h in lib Makefile | ||
19 | |||
20 | Please also have a look into the changes from the [2.3.4 release][234release], | ||
21 | you might have missed. | ||
22 | |||
23 | [download]: /download.html | ||
24 | [234release]: /news/release-2-3-4.html | ||
25 | |||
26 | <!--% # vim:set filetype=markdown textwidth=78 joinspaces expandtab: # %--> | ||
diff --git a/web/input/news/release-2-4-0.md b/web/input/news/release-2-4-0.md new file mode 100644 index 0000000..a1d111b --- /dev/null +++ b/web/input/news/release-2-4-0.md | |||
@@ -0,0 +1,75 @@ | |||
1 | title: Version 2.4.0 Released | ||
2 | author: Jan Wagner | ||
3 | date: 2024-07-25 | ||
4 | --- | ||
5 | |||
6 | The Monitoring Plugins Development Team is proud to announce version 2.4.0 of | ||
7 | the Monitoring Plugins! This release comes with various fixes provided by more | ||
8 | than 12 contributors. Many thanks to all of you! | ||
9 | <end-of-teaser> | ||
10 | |||
11 | For the list of notable changes in this release, see below. | ||
12 | |||
13 | You can get the tarball from our [download page][download]. | ||
14 | |||
15 | ### Enhancements | ||
16 | #### General | ||
17 | * Use C99 booleans | ||
18 | * Improve negate plugin helptext | ||
19 | * Add new test function for percentage expressions | ||
20 | #### Single Plugins | ||
21 | * check_mailq: remove trailing whitespaces | ||
22 | * check_mailq: unify tabs/spaces | ||
23 | * check_oracle: Shellcheck fixes | ||
24 | * check_ups: output ups.realpower if supported | ||
25 | * check_disk: add -n short option for --ignore-missing | ||
26 | * check_procs: Improve help text, mentioning excluded processes | ||
27 | * check_procs: Generalise wording, remove mentioning of nrpe | ||
28 | * check_curl: add haproxy protocol option | ||
29 | * check_disk: increase alert precision | ||
30 | * check_ircd: IPv6 support | ||
31 | * check_nwstat: adds percentage used space | ||
32 | * check_swap: Possibility to run check_swap without thresholds | ||
33 | * check_ups: additional alarm conditions | ||
34 | * check_http/check_curl: added a --regex-state option to change the state of a regex check | ||
35 | |||
36 | ### Fixes | ||
37 | #### General | ||
38 | * Fixes for -Wsign-compare | ||
39 | * Fix logic in is_uint64_t to fix type-limit warning | ||
40 | * Prevent -lcrypto from showing up in Makefile dependencies | ||
41 | * Change irritating NULL assignment | ||
42 | #### Single Plugins | ||
43 | * check_dbi: Compiler warning for uninitialized variable | ||
44 | * check_curl: Initialize pointer before usage | ||
45 | * check_ntp: Initialize intermediate results in any case | ||
46 | * check_tcp: Fixes an error with using the wrong type for a variable | ||
47 | * check_mailq: exit on empty strings and exit early | ||
48 | * check_users: Change option for sanity checking arguments to avoid segfault | ||
49 | * check_users: Update help to properly show that thresholds are ranges | ||
50 | * check_users: fix segfault | ||
51 | * check_dbi: Fix compiler warning for uninitialized variable | ||
52 | * check_curl: Initialize pointer before usage | ||
53 | * check_ntp: Initialize intermediate results in any case | ||
54 | * check_ntp_peer: Fixes for Wmaybe-unitialized and some restructuring | ||
55 | * check_dns: Remove unused variable | ||
56 | * check_disk: fix ignore-missing in combination with includes | ||
57 | * check_procs: ignore our own children | ||
58 | * check_http: Remove self assignment of a variable and add some comments | ||
59 | * check_snmp: Remove unused variable | ||
60 | * check_dhcp: Make implicit conversion explicit to dismiss warning | ||
61 | * Ini Parser: Avoid freeing symbols from text section | ||
62 | * check_icmp: keep performance data order in case of none-reachable hosts | ||
63 | * check_swap: Change another fake boolean to a real one | ||
64 | * check_swap: Rename type since *_t is reserved for C standard types | ||
65 | * check_ssh: Fix a typo in "remote-protocol parameter | ||
66 | * check_ssh: Handle non-alpha software versions | ||
67 | * check_ssh: properly parse a delayed version control string | ||
68 | * check_disk: Fail on missing arguments for --warning and --critical and fix a test case | ||
69 | * check_disk: Use new test function for percentage expressions | ||
70 | * check_load: remove unused code | ||
71 | * check_curl/check_http: clarified format of POST data | ||
72 | |||
73 | [download]: /download.html | ||
74 | |||
75 | <!--% # vim:set filetype=markdown textwidth=78 joinspaces expandtab: # %--> | ||
diff --git a/web/input/resources/fonts/bitter-v32-latin-700.woff b/web/input/resources/fonts/bitter-v32-latin-700.woff new file mode 100644 index 0000000..c41c1af --- /dev/null +++ b/web/input/resources/fonts/bitter-v32-latin-700.woff | |||
Binary files differ | |||
diff --git a/web/input/resources/fonts/bitter-v32-latin-700.woff2 b/web/input/resources/fonts/bitter-v32-latin-700.woff2 new file mode 100644 index 0000000..08115ec --- /dev/null +++ b/web/input/resources/fonts/bitter-v32-latin-700.woff2 | |||
Binary files differ | |||
diff --git a/web/input/resources/fonts/bitter-v32-latin-700italic.woff b/web/input/resources/fonts/bitter-v32-latin-700italic.woff new file mode 100644 index 0000000..2f7509d --- /dev/null +++ b/web/input/resources/fonts/bitter-v32-latin-700italic.woff | |||
Binary files differ | |||
diff --git a/web/input/resources/fonts/bitter-v32-latin-700italic.woff2 b/web/input/resources/fonts/bitter-v32-latin-700italic.woff2 new file mode 100644 index 0000000..2ae3d64 --- /dev/null +++ b/web/input/resources/fonts/bitter-v32-latin-700italic.woff2 | |||
Binary files differ | |||
diff --git a/web/input/resources/fonts/bitter-v32-latin-italic.woff b/web/input/resources/fonts/bitter-v32-latin-italic.woff new file mode 100644 index 0000000..4ed6fef --- /dev/null +++ b/web/input/resources/fonts/bitter-v32-latin-italic.woff | |||
Binary files differ | |||
diff --git a/web/input/resources/fonts/bitter-v32-latin-italic.woff2 b/web/input/resources/fonts/bitter-v32-latin-italic.woff2 new file mode 100644 index 0000000..9f8a7a0 --- /dev/null +++ b/web/input/resources/fonts/bitter-v32-latin-italic.woff2 | |||
Binary files differ | |||
diff --git a/web/input/resources/fonts/bitter-v32-latin-regular.woff b/web/input/resources/fonts/bitter-v32-latin-regular.woff new file mode 100644 index 0000000..640650a --- /dev/null +++ b/web/input/resources/fonts/bitter-v32-latin-regular.woff | |||
Binary files differ | |||
diff --git a/web/input/resources/fonts/bitter-v32-latin-regular.woff2 b/web/input/resources/fonts/bitter-v32-latin-regular.woff2 new file mode 100644 index 0000000..b9dd36d --- /dev/null +++ b/web/input/resources/fonts/bitter-v32-latin-regular.woff2 | |||
Binary files differ | |||
diff --git a/web/input/resources/fonts/source-code-pro-v22-latin-700.woff b/web/input/resources/fonts/source-code-pro-v22-latin-700.woff new file mode 100644 index 0000000..201831d --- /dev/null +++ b/web/input/resources/fonts/source-code-pro-v22-latin-700.woff | |||
Binary files differ | |||
diff --git a/web/input/resources/fonts/source-code-pro-v22-latin-700.woff2 b/web/input/resources/fonts/source-code-pro-v22-latin-700.woff2 new file mode 100644 index 0000000..40ba215 --- /dev/null +++ b/web/input/resources/fonts/source-code-pro-v22-latin-700.woff2 | |||
Binary files differ | |||
diff --git a/web/input/resources/fonts/source-code-pro-v22-latin-700italic.woff b/web/input/resources/fonts/source-code-pro-v22-latin-700italic.woff new file mode 100644 index 0000000..d525961 --- /dev/null +++ b/web/input/resources/fonts/source-code-pro-v22-latin-700italic.woff | |||
Binary files differ | |||
diff --git a/web/input/resources/fonts/source-code-pro-v22-latin-700italic.woff2 b/web/input/resources/fonts/source-code-pro-v22-latin-700italic.woff2 new file mode 100644 index 0000000..4ab0c6b --- /dev/null +++ b/web/input/resources/fonts/source-code-pro-v22-latin-700italic.woff2 | |||
Binary files differ | |||
diff --git a/web/input/resources/fonts/source-code-pro-v22-latin-italic.woff b/web/input/resources/fonts/source-code-pro-v22-latin-italic.woff new file mode 100644 index 0000000..66af57d --- /dev/null +++ b/web/input/resources/fonts/source-code-pro-v22-latin-italic.woff | |||
Binary files differ | |||
diff --git a/web/input/resources/fonts/source-code-pro-v22-latin-italic.woff2 b/web/input/resources/fonts/source-code-pro-v22-latin-italic.woff2 new file mode 100644 index 0000000..1f4bc2a --- /dev/null +++ b/web/input/resources/fonts/source-code-pro-v22-latin-italic.woff2 | |||
Binary files differ | |||
diff --git a/web/input/resources/fonts/source-code-pro-v22-latin-regular.woff b/web/input/resources/fonts/source-code-pro-v22-latin-regular.woff new file mode 100644 index 0000000..597d27a --- /dev/null +++ b/web/input/resources/fonts/source-code-pro-v22-latin-regular.woff | |||
Binary files differ | |||
diff --git a/web/input/resources/fonts/source-code-pro-v22-latin-regular.woff2 b/web/input/resources/fonts/source-code-pro-v22-latin-regular.woff2 new file mode 100644 index 0000000..978a2a3 --- /dev/null +++ b/web/input/resources/fonts/source-code-pro-v22-latin-regular.woff2 | |||
Binary files differ | |||
diff --git a/web/input/resources/fonts/source-sans-pro-v21-latin-700.woff b/web/input/resources/fonts/source-sans-pro-v21-latin-700.woff new file mode 100644 index 0000000..a6786d1 --- /dev/null +++ b/web/input/resources/fonts/source-sans-pro-v21-latin-700.woff | |||
Binary files differ | |||
diff --git a/web/input/resources/fonts/source-sans-pro-v21-latin-700.woff2 b/web/input/resources/fonts/source-sans-pro-v21-latin-700.woff2 new file mode 100644 index 0000000..cd6bfd0 --- /dev/null +++ b/web/input/resources/fonts/source-sans-pro-v21-latin-700.woff2 | |||
Binary files differ | |||
diff --git a/web/input/resources/fonts/source-sans-pro-v21-latin-700italic.woff b/web/input/resources/fonts/source-sans-pro-v21-latin-700italic.woff new file mode 100644 index 0000000..729bdee --- /dev/null +++ b/web/input/resources/fonts/source-sans-pro-v21-latin-700italic.woff | |||
Binary files differ | |||
diff --git a/web/input/resources/fonts/source-sans-pro-v21-latin-700italic.woff2 b/web/input/resources/fonts/source-sans-pro-v21-latin-700italic.woff2 new file mode 100644 index 0000000..b413356 --- /dev/null +++ b/web/input/resources/fonts/source-sans-pro-v21-latin-700italic.woff2 | |||
Binary files differ | |||
diff --git a/web/input/resources/fonts/source-sans-pro-v21-latin-italic.woff b/web/input/resources/fonts/source-sans-pro-v21-latin-italic.woff new file mode 100644 index 0000000..f927419 --- /dev/null +++ b/web/input/resources/fonts/source-sans-pro-v21-latin-italic.woff | |||
Binary files differ | |||
diff --git a/web/input/resources/fonts/source-sans-pro-v21-latin-italic.woff2 b/web/input/resources/fonts/source-sans-pro-v21-latin-italic.woff2 new file mode 100644 index 0000000..9448cd5 --- /dev/null +++ b/web/input/resources/fonts/source-sans-pro-v21-latin-italic.woff2 | |||
Binary files differ | |||
diff --git a/web/input/resources/fonts/source-sans-pro-v21-latin-regular.woff b/web/input/resources/fonts/source-sans-pro-v21-latin-regular.woff new file mode 100644 index 0000000..db90a83 --- /dev/null +++ b/web/input/resources/fonts/source-sans-pro-v21-latin-regular.woff | |||
Binary files differ | |||
diff --git a/web/input/resources/fonts/source-sans-pro-v21-latin-regular.woff2 b/web/input/resources/fonts/source-sans-pro-v21-latin-regular.woff2 new file mode 100644 index 0000000..e49928e --- /dev/null +++ b/web/input/resources/fonts/source-sans-pro-v21-latin-regular.woff2 | |||
Binary files differ | |||
diff --git a/web/input/resources/mastodon.png b/web/input/resources/mastodon.png new file mode 100644 index 0000000..e3ba80e --- /dev/null +++ b/web/input/resources/mastodon.png | |||
Binary files differ | |||
diff --git a/web/input/resources/plugins.css b/web/input/resources/plugins.css index c33d8c8..ab6198d 100644 --- a/web/input/resources/plugins.css +++ b/web/input/resources/plugins.css | |||
@@ -6,11 +6,131 @@ | |||
6 | * - See <http://colorschemedesigner.com/#3y21T--rOw0w0>. | 6 | * - See <http://colorschemedesigner.com/#3y21T--rOw0w0>. |
7 | * - Additionally, we use the CSS color "dimgray" (#696969) for stuff like the | 7 | * - Additionally, we use the CSS color "dimgray" (#696969) for stuff like the |
8 | * breadcrumb navigation and the footer. | 8 | * breadcrumb navigation and the footer. |
9 | * | ||
10 | * Font faces: | ||
11 | * | ||
12 | * - CSS generated by <https://gwfh.mranftl.com/fonts>. | ||
9 | */ | 13 | */ |
10 | 14 | ||
11 | @import url("https://fonts.googleapis.com/css?family=Bitter"); | 15 | /* bitter-regular - latin */ |
12 | @import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro"); | 16 | @font-face { |
13 | @import url("https://fonts.googleapis.com/css?family=Source+Code+Pro"); | 17 | font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ |
18 | font-family: 'Bitter'; | ||
19 | font-style: normal; | ||
20 | font-weight: 400; | ||
21 | src: url('fonts/bitter-v32-latin-regular.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+ */ | ||
22 | url('fonts/bitter-v32-latin-regular.woff') format('woff'); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */ | ||
23 | } | ||
24 | |||
25 | /* bitter-italic - latin */ | ||
26 | @font-face { | ||
27 | font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
28 | font-family: 'Bitter'; | ||
29 | font-style: italic; | ||
30 | font-weight: 400; | ||
31 | src: url('fonts/bitter-v32-latin-italic.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+ */ | ||
32 | url('fonts/bitter-v32-latin-italic.woff') format('woff'); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */ | ||
33 | } | ||
34 | |||
35 | /* bitter-700 - latin */ | ||
36 | @font-face { | ||
37 | font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
38 | font-family: 'Bitter'; | ||
39 | font-style: normal; | ||
40 | font-weight: 700; | ||
41 | src: url('fonts/bitter-v32-latin-700.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+ */ | ||
42 | url('fonts/bitter-v32-latin-700.woff') format('woff'); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */ | ||
43 | } | ||
44 | |||
45 | /* bitter-700italic - latin */ | ||
46 | @font-face { | ||
47 | font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
48 | font-family: 'Bitter'; | ||
49 | font-style: italic; | ||
50 | font-weight: 700; | ||
51 | src: url('fonts/bitter-v32-latin-700italic.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+ */ | ||
52 | url('fonts/bitter-v32-latin-700italic.woff') format('woff'); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */ | ||
53 | } | ||
54 | |||
55 | /* source-sans-pro-regular - latin */ | ||
56 | @font-face { | ||
57 | font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
58 | font-family: 'Source Sans Pro'; | ||
59 | font-style: normal; | ||
60 | font-weight: 400; | ||
61 | src: url('fonts/source-sans-pro-v21-latin-regular.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+ */ | ||
62 | url('fonts/source-sans-pro-v21-latin-regular.woff') format('woff'); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */ | ||
63 | } | ||
64 | |||
65 | /* source-sans-pro-italic - latin */ | ||
66 | @font-face { | ||
67 | font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
68 | font-family: 'Source Sans Pro'; | ||
69 | font-style: italic; | ||
70 | font-weight: 400; | ||
71 | src: url('fonts/source-sans-pro-v21-latin-italic.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+ */ | ||
72 | url('fonts/source-sans-pro-v21-latin-italic.woff') format('woff'); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */ | ||
73 | } | ||
74 | |||
75 | /* source-sans-pro-700 - latin */ | ||
76 | @font-face { | ||
77 | font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
78 | font-family: 'Source Sans Pro'; | ||
79 | font-style: normal; | ||
80 | font-weight: 700; | ||
81 | src: url('fonts/source-sans-pro-v21-latin-700.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+ */ | ||
82 | url('fonts/source-sans-pro-v21-latin-700.woff') format('woff'); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */ | ||
83 | } | ||
84 | |||
85 | /* source-sans-pro-700italic - latin */ | ||
86 | @font-face { | ||
87 | font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
88 | font-family: 'Source Sans Pro'; | ||
89 | font-style: italic; | ||
90 | font-weight: 700; | ||
91 | src: url('fonts/source-sans-pro-v21-latin-700italic.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+ */ | ||
92 | url('fonts/source-sans-pro-v21-latin-700italic.woff') format('woff'); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */ | ||
93 | } | ||
94 | |||
95 | /* source-code-pro-regular - latin */ | ||
96 | @font-face { | ||
97 | font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
98 | font-family: 'Source Code Pro'; | ||
99 | font-style: normal; | ||
100 | font-weight: 400; | ||
101 | src: url('fonts/source-code-pro-v22-latin-regular.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+ */ | ||
102 | url('fonts/source-code-pro-v22-latin-regular.woff') format('woff'); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */ | ||
103 | } | ||
104 | |||
105 | /* source-code-pro-italic - latin */ | ||
106 | @font-face { | ||
107 | font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
108 | font-family: 'Source Code Pro'; | ||
109 | font-style: italic; | ||
110 | font-weight: 400; | ||
111 | src: url('fonts/source-code-pro-v22-latin-italic.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+ */ | ||
112 | url('fonts/source-code-pro-v22-latin-italic.woff') format('woff'); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */ | ||
113 | } | ||
114 | |||
115 | /* source-code-pro-700 - latin */ | ||
116 | @font-face { | ||
117 | font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
118 | font-family: 'Source Code Pro'; | ||
119 | font-style: normal; | ||
120 | font-weight: 700; | ||
121 | src: url('fonts/source-code-pro-v22-latin-700.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+ */ | ||
122 | url('fonts/source-code-pro-v22-latin-700.woff') format('woff'); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */ | ||
123 | } | ||
124 | |||
125 | /* source-code-pro-700italic - latin */ | ||
126 | @font-face { | ||
127 | font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
128 | font-family: 'Source Code Pro'; | ||
129 | font-style: italic; | ||
130 | font-weight: 700; | ||
131 | src: url('fonts/source-code-pro-v22-latin-700italic.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+ */ | ||
132 | url('fonts/source-code-pro-v22-latin-700italic.woff') format('woff'); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */ | ||
133 | } | ||
14 | 134 | ||
15 | body { | 135 | body { |
16 | font-family: "Source Sans Pro", sans-serif; | 136 | font-family: "Source Sans Pro", sans-serif; |
@@ -160,6 +280,26 @@ img.travis { | |||
160 | } | 280 | } |
161 | 281 | ||
162 | /* | 282 | /* |
283 | * Dark scheme. | ||
284 | */ | ||
285 | |||
286 | @media (prefers-color-scheme: dark) { | ||
287 | /* | ||
288 | * Loosely based on: | ||
289 | * | ||
290 | * https://material.io/archive/guidelines/style/color.html#color-themes | ||
291 | */ | ||
292 | body { | ||
293 | color: #eee; | ||
294 | background-color: #212121; | ||
295 | } | ||
296 | |||
297 | h1, h2, h3, h4, h5, h6 { | ||
298 | color: #eee; | ||
299 | } | ||
300 | } | ||
301 | |||
302 | /* | ||
163 | * On narrow displays, replace the menu bar with a simple list of items, and | 303 | * On narrow displays, replace the menu bar with a simple list of items, and |
164 | * omit the GitHub ribbon. | 304 | * omit the GitHub ribbon. |
165 | */ | 305 | */ |
@@ -167,7 +307,7 @@ img.travis { | |||
167 | @media (max-width: 45em) { | 307 | @media (max-width: 45em) { |
168 | div#menu { | 308 | div#menu { |
169 | padding: 1em; | 309 | padding: 1em; |
170 | background-color: #fff; | 310 | background-color: inherit; |
171 | border-bottom: 1px dotted #696969; | 311 | border-bottom: 1px dotted #696969; |
172 | } | 312 | } |
173 | 313 | ||
@@ -178,7 +318,7 @@ img.travis { | |||
178 | 318 | ||
179 | div#menu span#current { | 319 | div#menu span#current { |
180 | color: #5a95c7; | 320 | color: #5a95c7; |
181 | background-color: #fff; | 321 | background-color: inherit; |
182 | } | 322 | } |
183 | 323 | ||
184 | div#menu a { | 324 | div#menu a { |
diff --git a/web/input/resources/twitter.png b/web/input/resources/twitter.png deleted file mode 100644 index 00178c9..0000000 --- a/web/input/resources/twitter.png +++ /dev/null | |||
Binary files differ | |||
diff --git a/web/input/team.md b/web/input/team.md index ca5c374..c5a3149 100644 --- a/web/input/team.md +++ b/web/input/team.md | |||
@@ -9,6 +9,7 @@ The Monitoring Plugins are maintained by the following group of developers: | |||
9 | * Holger Weiß *(Patch Review, Development, Team Lead)* | 9 | * Holger Weiß *(Patch Review, Development, Team Lead)* |
10 | * Jan Wagner *(Patch Review, Development)* | 10 | * Jan Wagner *(Patch Review, Development)* |
11 | * Sven Nierlein *(Patch Review, Development)* | 11 | * Sven Nierlein *(Patch Review, Development)* |
12 | * Lorenz Kästle *(Patch Review, Development)* | ||
12 | 13 | ||
13 | Previous team members: | 14 | Previous team members: |
14 | 15 | ||
diff --git a/web/macros.py b/web/macros.py index df64a26..5536f3f 100644 --- a/web/macros.py +++ b/web/macros.py | |||
@@ -1,19 +1,19 @@ | |||
1 | import email.utils | 1 | import email.utils |
2 | import math | ||
2 | import os.path | 3 | import os.path |
3 | import time | 4 | import time |
4 | 5 | ||
5 | plugins_release = '2.3.1' | 6 | plugins_release = '2.4.0' |
6 | mib_release = '1.0.1' | 7 | mib_release = '1.0.1' |
7 | release_notes = 'news/release-%s.html' % plugins_release.replace('.', '-') | 8 | release_notes = 'news/release-%s.html' % plugins_release.replace('.', '-') |
8 | site_url = 'https://www.monitoring-plugins.org/' | 9 | site_url = 'https://www.monitoring-plugins.org/' |
9 | feeds = """These project news articles are also available as an | 10 | feeds = """These project news articles are also available as an |
10 | [RSS feed][rss]{: rel="alternate" type="application/rss+xml" }. Additional | 11 | [RSS feed][rss]{: rel="alternate" type="application/rss+xml" }. Additional |
11 | stuff is posted to [Twitter][twitter], so you might want to [follow us][follow] | 12 | stuff is posted to [Mastodon][mastodon], so you might want to follow us there as |
12 | there as well. | 13 | well. |
13 | 14 | ||
14 | [rss]: rss.xml "RSS Feed" | 15 | [rss]: rss.xml "RSS Feed" |
15 | [twitter]: https://twitter.com/ "Twitter" | 16 | [mastodon]: https://fosstodon.org/@monitoringplugins "Mastodon" |
16 | [follow]: https://twitter.com/intent/follow?screen_name=monitorplugins "Follow Us" | ||
17 | """ | 17 | """ |
18 | 18 | ||
19 | page = { | 19 | page = { |
@@ -68,9 +68,8 @@ def hook_postconvert_rss(): | |||
68 | desc = 'Announcements published by the Monitoring Plugins Development Team.' | 68 | desc = 'Announcements published by the Monitoring Plugins Development Team.' |
69 | date = email.utils.formatdate() | 69 | date = email.utils.formatdate() |
70 | rss = _RSS % (title, link, desc, date, date, items) | 70 | rss = _RSS % (title, link, desc, date, date, items) |
71 | fp = open(os.path.join(output, 'rss.xml'), 'w') | 71 | with open(os.path.join(output, 'rss.xml'), 'w', encoding='utf-8') as fp: |
72 | fp.write(rss) | 72 | fp.write(rss) |
73 | fp.close() | ||
74 | 73 | ||
75 | # | 74 | # |
76 | # News | 75 | # News |
@@ -80,7 +79,7 @@ def hook_preconvert_news(): | |||
80 | posts_per_page = 10 | 79 | posts_per_page = 10 |
81 | posts = [p for p in pages if 'date' in p] | 80 | posts = [p for p in pages if 'date' in p] |
82 | posts.sort(key=lambda p: p.date, reverse=True) | 81 | posts.sort(key=lambda p: p.date, reverse=True) |
83 | n_news_pages = len(posts) / posts_per_page | 82 | n_news_pages = math.ceil(len(posts) / posts_per_page) |
84 | if len(posts) % posts_per_page > 0: | 83 | if len(posts) % posts_per_page > 0: |
85 | n_news_pages += 1 | 84 | n_news_pages += 1 |
86 | for i, chunk in enumerate(next_news_chunk(posts, posts_per_page)): | 85 | for i, chunk in enumerate(next_news_chunk(posts, posts_per_page)): |
@@ -108,7 +107,7 @@ def make_news_page(posts, current_index): | |||
108 | teaser = ['# ' + title] | 107 | teaser = ['# ' + title] |
109 | for p in posts: | 108 | for p in posts: |
110 | source = list() | 109 | source = list() |
111 | author = p.author.encode('ascii', 'xmlcharrefreplace') | 110 | author = p.author |
112 | timestamp = time.strptime(p.date, '%Y-%m-%d') | 111 | timestamp = time.strptime(p.date, '%Y-%m-%d') |
113 | author_date = author + ', ' + time.strftime('%B %-e, %Y', timestamp) | 112 | author_date = author + ', ' + time.strftime('%B %-e, %Y', timestamp) |
114 | teaser.append('## %s' % p.title) | 113 | teaser.append('## %s' % p.title) |
diff --git a/web/page.html b/web/page.html index 989dd4c..ee36fb2 100644 --- a/web/page.html +++ b/web/page.html | |||
@@ -1,4 +1,4 @@ | |||
1 | <?xml version="1.0" encoding="{{ __encoding__ }}"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" |
3 | "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | 3 | "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
4 | 4 | ||
@@ -6,9 +6,10 @@ | |||
6 | 6 | ||
7 | <head> | 7 | <head> |
8 | <title>Monitoring Plugins - {{ hx(page.title) }}</title> | 8 | <title>Monitoring Plugins - {{ hx(page.title) }}</title> |
9 | <meta http-equiv="Content-Type" content="text/html; charset={{ __encoding__ }}" /> | 9 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
10 | <meta name="description" content="{{ hx(page.description) }}" /> | 10 | <meta name="description" content="{{ hx(page.description) }}" /> |
11 | <meta name="keywords" content="{{ hx(page.keywords) }}" /> | 11 | <meta name="keywords" content="{{ hx(page.keywords) }}" /> |
12 | <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
12 | <link href="rss.xml" rel="alternate" type="application/rss+xml" title="Monitoring Plugins News" /> | 13 | <link href="rss.xml" rel="alternate" type="application/rss+xml" title="Monitoring Plugins News" /> |
13 | <link href="resources/plugins.css" rel="stylesheet" type="text/css" /> | 14 | <link href="resources/plugins.css" rel="stylesheet" type="text/css" /> |
14 | <link href="resources/favicon.ico" rel="shortcut icon" type="image/x-icon" /> | 15 | <link href="resources/favicon.ico" rel="shortcut icon" type="image/x-icon" /> |
@@ -28,10 +29,11 @@ | |||
28 | <div id="menu"> | 29 | <div id="menu"> |
29 | <div id="feed-buttons"> | 30 | <div id="feed-buttons"> |
30 | <a | 31 | <a |
31 | href="https://twitter.com/intent/follow?screen_name=monitorplugins" | 32 | href="https://fosstodon.org/@monitoringplugins" |
32 | title="Follow Us on Twitter"><img | 33 | rel="me" |
33 | src="resources/twitter.png" | 34 | title="Find Us on Mastodon"><img |
34 | alt="Twitter" | 35 | src="resources/mastodon.png" |
36 | alt="Mastodon" | ||
35 | width="20" | 37 | width="20" |
36 | height="20"/></a><a | 38 | height="20"/></a><a |
37 | href="rss.xml" | 39 | href="rss.xml" |