[tz] TZ file comments UTF-8? Bastardized HTML?
Steffen Daode Nurpmeso
sdaoden at gmail.com
Mon Jan 14 14:25:15 UTC 2013
|Russ Allbery <rra at stanford.edu> wrote:
||Steffen "Daode" Nurpmeso <sdaoden at gmail.com> writes:
||> How about turning over to a simple generic approach, as in
||
||> L<http://www.url1.com>
||> and/or
||> L<Some descriptive text><http://www.url2.com>
[.]
||If you do decide to use POD, you may want to pick a different letter than
||I, since I<> is already a POD formatting code (for italics). D<> is safe
||to use; there's no existing formatting code.
|
|Well, that was just what came to my mind on saturday.
|Maybe U<> (for URL)? It seems unused.
I'll append an updated version that uses U<> not I<>.
It also makes use of that in one case, and fixes the one messed up
link i've introduced via the new N<> that can be used for URLs
that should produce an <a> tag but are not checkable by curl(1)
(news:).
--steffen
diff --git a/htwork.pl b/htwork.pl
index 64f0cb3..ee85291 100755
--- a/htwork.pl
+++ b/htwork.pl
@@ -6,7 +6,8 @@ require 5.008_001;
#@ Synopsis: htwork.pl check < DATA_FILE > NEW_DATA_FILE
#@ The latter mode requires an installed curl(1) (<http://curl.haxx.se>).
#@ Understood links: L<URL>, L<Text><URL>. Dead links: D<URL>, D<Text><URL>.
-#@ Links that should not be converted (informational): I<URL>, I<Text><URL>.
+#@ Links that should be converted to <a>, but not checked: N<URL>, N<Text><URL>.
+#@ Links that should neither be converted nor checked: U<URL>, U<Text><URL>.
#@ XXX Assumes links fit on one line.
my $CURL = 'curl -q --silent --fail --head --location';
@@ -17,10 +18,9 @@ use diagnostics -verbose;
use strict;
use warnings;
-# We do support L<URL> and L<text><URL>; D instead of L is for dead links.
my $URL_CONTENT = qr{
(.*?)
- (l|d|i)
+ (l|d|u|n)
<([^>]+)>
(?:<([^>]+)>)?
(.*)
@@ -64,7 +64,7 @@ veals the native languages of entry authors, cities and regions.
The second mode is used in the release phase of the tz zoneinfo
database and checks all L<> and L<><> links for resolvability,
converting all those to D<> and D<><> (dead link) entries that
-cannot be resolved. I<> and I<><> links are left alone.
+cannot be resolved.
This mode requires an installed curl(1) (<http://curl.haxx.se>).
__EOT__
@@ -94,7 +94,7 @@ __EOT__
my $comm = lc $2;
my $url = $4 ? $4 : $3;
my $text = $4 ? $3 : '';
- if ($comm eq 'l') {
+ if ($comm eq 'l' || $comm eq 'n') {
$text = $url unless $text;
$ln .= '<a href="' . $url . '">' . $text . '</a>';
} else {
@@ -115,7 +115,6 @@ __EOT__
</pre>
</body>
</html>
-<!-- vim:set fenc=utf-8 syntax=html ts=8 sts=8 sw=8 noet tw=79: -->
__EOT__
exit
diff --git a/southamerica b/southamerica
index 2e1c973..49a2adb 100644
--- a/southamerica
+++ b/southamerica
@@ -718,7 +718,7 @@ Zone America/La_Paz -4:32:36 - LMT 1890
# It has not yet been posted to L<http://pcdsh01.on.br/DecHV.html>
#
# An official page about it:
-# <http://www.mme.gov.br/site/news/detail.do?newsId=16722>
+# U<http://www.mme.gov.br/site/news/detail.do?newsId=16722>
# Note that this link does not always work directly, but must be accessed
# by going to L<http://www.mme.gov.br/first>
#
@@ -1473,8 +1473,7 @@ Zone America/Asuncion -3:50:40 - LMT 1890
# Peru
#
-# news:xrGmb.39935$gA1.13896113 at news4.srv.hcvlny.cv.net
-# From Evelyn C. Leeper via Mark Brader (2003-10-26):</a>
+# N<From Evelyn C. Leeper via Mark Brader (2003-10-26)><news:xrGmb.39935$gA1.13896113 at news4.srv.hcvlny.cv.net>:
# When we were in Peru in 1985-1986, they apparently switched over
# sometime between December 29 and January 3 while we were on the Amazon.
#
More information about the tz
mailing list