From: Amin Bandali Date: Sun, 10 Oct 2021 15:09:55 +0000 (-0400) Subject: txt2html: support extracting publish/update dates (now restored) X-Git-Url: https://git.shemshak.org/~bandali/bndl.org/commitdiff_plain/212ec2e606552fdfa9fcd970a5e27a7dc9ce0042 txt2html: support extracting publish/update dates (now restored) --- diff --git a/bandali-computing.txt b/bandali-computing.txt index a6d1a35..2ce768b 100644 --- a/bandali-computing.txt +++ b/bandali-computing.txt @@ -59,4 +59,6 @@ are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty. +updated: 2021-02-28 +published: 2019-09-14 plain text: https://bndl.org/bandali-computing.txt diff --git a/fa/bandali-computing.fa.txt b/fa/bandali-computing.fa.txt index f22e74f..42fc537 100644 --- a/fa/bandali-computing.fa.txt +++ b/fa/bandali-computing.fa.txt @@ -62,4 +62,6 @@ without any warranty. و در هر رسانه‌ای مجاز است، به این شرط که اعلان حق تکثیر و این اعلان حفظ شوند. این پرونده به صورت موجود و بدون هیچ گونه ضمانت ارائه می‌شود. +ویرایش: 2021-02-28 +انتشار: 2019-09-14 متن ساده: https://bndl.org/fa/bandali-computing.fa.txt diff --git a/fa/fsf-internship-beyond.fa.txt b/fa/fsf-internship-beyond.fa.txt index b529d8d..1c75f4a 100644 --- a/fa/fsf-internship-beyond.fa.txt +++ b/fa/fsf-internship-beyond.fa.txt @@ -98,4 +98,5 @@ without any warranty. و در هر رسانه‌ای مجاز است، به این شرط که اعلان حق تکثیر و این اعلان حفظ شوند. این پرونده به صورت موجود و بدون هیچ گونه ضمانت ارائه می‌شود. +انتشار: 2020-12-18 متن ساده: https://bndl.org/fa/fsf-internship-beyond.fa.txt diff --git a/fa/fsf-internship-intro.fa.txt b/fa/fsf-internship-intro.fa.txt index 1f14dfe..e03f7aa 100644 --- a/fa/fsf-internship-intro.fa.txt +++ b/fa/fsf-internship-intro.fa.txt @@ -76,4 +76,5 @@ without any warranty. و در هر رسانه‌ای مجاز است، به این شرط که اعلان حق تکثیر و این اعلان حفظ شوند. این پرونده به صورت موجود و بدون هیچ گونه ضمانت ارائه می‌شود. +انتشار: 2020-05-29 متن ساده: https://bndl.org/fa/fsf-internship-intro.fa.txt diff --git a/fsf-internship-beyond.txt b/fsf-internship-beyond.txt index 97253b9..cc140db 100644 --- a/fsf-internship-beyond.txt +++ b/fsf-internship-beyond.txt @@ -110,4 +110,5 @@ are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty. +published: 2020-12-18 plain text: https://bndl.org/fsf-internship-beyond.txt diff --git a/fsf-internship-intro.txt b/fsf-internship-intro.txt index 4ea77bc..afba902 100644 --- a/fsf-internship-intro.txt +++ b/fsf-internship-intro.txt @@ -76,4 +76,5 @@ are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty. +published: 2020-05-29 plain text: https://bndl.org/fsf-internship-intro.txt diff --git a/libreplanet-2021.txt b/libreplanet-2021.txt index ebece7c..2bca77e 100644 --- a/libreplanet-2021.txt +++ b/libreplanet-2021.txt @@ -77,4 +77,6 @@ are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty. +updated: 2021-03-21 +published: 2021-03-20 plain text: https://bndl.org/libreplanet-2021.txt diff --git a/txt2html b/txt2html index 10de15d..e6dc30b 100644 --- a/txt2html +++ b/txt2html @@ -96,6 +96,7 @@ sub linkify { my $txt = do { local $/; }; + my $title = html_esc($txt =~ /\A([^\n]+)/); $title =~ s/^\s+|\s+$//g; if ($opt_lang eq 'fa') { @@ -103,7 +104,11 @@ if ($opt_lang eq 'fa') { } else { $title .= ' — bandali' if $title !~ /bandali/; } -my ($url) = $txt =~ /(?:plain text|متن ساده): (.*)\r?\n?\z/; + +my ($upd, $pub, $url) = $txt =~ /(.*)\r?\n(.*)\r?\n(.*)\r?\n?\z/; +($upd) = $upd =~ /(?:updated|ویرایش): (.*)/ if $upd; +($pub) = $pub =~ /(?:published|انتشار): (.*)/ if $pub; +($url) = $url =~ /(?:plain text|متن ساده): (.*)/ if $url; $url = 'https://bndl.org/bandali-cv.txt' if (!$url and $title =~ /curriculum vitae/); $url = html_esc($url) if $url;