sfeed_content: content view optimization - sfeed_curses - sfeed curses UI (now … | |
git clone git://git.codemadness.org/sfeed_curses | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 85d1802fa73cb7311c6c2a4c917fcd16f647fbed | |
parent 61c48746013c47d77b47c0b7606882983b185b6d | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Tue, 20 Apr 2021 00:22:47 +0200 | |
sfeed_content: content view optimization | |
- When there is no content or no "plain" or "html" content-type then: | |
- Do not spawn a (HTML) converter program (optimization). | |
- Do not try to unescape the text (small optimization). | |
- Do not print a newline separator (visual). | |
Diffstat: | |
M sfeed_content | 4 +++- | |
1 file changed, 3 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/sfeed_content b/sfeed_content | |
@@ -43,10 +43,12 @@ BEGIN { | |
print "Link: " $3; | |
if (length($8)) | |
print "Enclosure: " $8; | |
+ if (!length($4)) | |
+ next; | |
print ""; | |
if ($5 == "plain") { | |
print unescape($4); | |
- } else { | |
+ } else if ($5 == "html") { | |
print unescape($4) | htmlconv; | |
close(htmlconv); | |
} |