gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[www] 02/02: rssg title


From: gnunet
Subject: [www] 02/02: rssg title
Date: Mon, 04 Nov 2019 13:18:08 +0100

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository www.

commit bf67a008ebd48952ee5576bf15ff62f79e401aaa
Author: ng0 <address@hidden>
AuthorDate: Mon Nov 4 12:01:50 2019 +0000

    rssg title
---
 rssg | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/rssg b/rssg
index 2633cd2..fbb97d4 100755
--- a/rssg
+++ b/rssg
@@ -21,6 +21,7 @@ set -e
 # TODO: Fix date -j for GNU date.
 # TODO: Fix base url (get_url)
 # TODO: Fix link OR a in get_url
+# TODO: get_title: be more dynamic about where the title can be.
 
 main () {
        test -n "$1" || usage
@@ -78,7 +79,8 @@ md_to_html() {
 
 
 get_title() {
-       awk 'tolower($0)~/^<h1/{gsub(/<[^>]*>/,"",$0);print;exit}'
+        awk -F '[<>]' '/<h1/ { gsub(/<h1>/, ""); gsub(/<\/h1>/, ""); sub(/ 
.*/, "", $3); print $0}' | sed 's/^[ \t]*//;s/[ \t]*$//' | awk 'FNR==2'
+       # awk 'tolower($0)~/^<h1/{gsub(/<[^>]*>/,"",$0);print;exit}'
 }
 
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]