Rename to rep.dcgi - gophercgis - Collection of gopher CGI/DCGI for geomyidae
(HTM) hg clone https://bitbucket.org/iamleot/gophercgis
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) changeset ccc2fbb8c0375d5c7a90739a58ea2019625814e5
(DIR) parent 41205430638ac133712ec23d42bb905c1cd6c346
(HTM) Author: Leonardo Taccari <iamleot@gmail.com>
Date: Sun, 9 Sep 2018 02:04:59
Rename to rep.dcgi
It will be adopted in order to honor possible search.
Diffstat:
rep/cover.dcgi | 57 ---------------------------------------------------------
rep/rep.dcgi | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 57 insertions(+), 57 deletions(-)
---
diff -r 41205430638a -r ccc2fbb8c037 rep/cover.dcgi
--- a/rep/cover.dcgi Sun Sep 09 01:32:31 2018 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-#!/bin/sh
-
-ARTICLE_CGI="/cgi/rep/article.cgi"
-
-echo ""
-echo "Rep - Repubblica"
-echo ""
-
-url="https://rep.repubblica.it/ws/cover.json"
-/usr/bin/ftp -V -o - "${url}" |
-/usr/pkg/bin/jq -r '.feed.zones | .[].blocks | .[].entries | .[] |
- .title + "\u001c" +
- .author + "\u001c" +
- .created[0:10] + "\u001c" +
- .links[1].href + "\u001c" +
- .summary + "\u001e"
-' | awk '
-
-BEGIN {
- FS = "\034"
- RS = "\036"
-}
-
-function html_decode(s)
-{
- gsub(/“/, "\"", s);
- gsub(/”/, "\"", s);
- gsub(/’/, "\047", s);
- gsub(/à/, "à", s);
- gsub(/é/, "é", s);
- gsub(/è/, "è", s);
- gsub(/ì/, "ì", s);
- gsub(/ò/, "ò", s);
- gsub(/ù/, "ù", s);
-
- return s
-}
-
-NF == 5 {
- gsub(/\n/, "")
-
- title = $1
- author = $2
- created = $3
- link = $4
- summary = $5
-
- gsub("\\|", "\\|", title)
- gsub("\\|", "\\|", link)
-
- title = html_decode(title)
-
- printf("[0|%s|%s|server|port]\n", title, "'${ARTICLE_CGI}?'" link)
- printf("t%s %s\n", author, created)
- printf("\n")
-}
-'
diff -r 41205430638a -r ccc2fbb8c037 rep/rep.dcgi
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/rep/rep.dcgi Sun Sep 09 02:04:59 2018 +0200
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+ARTICLE_CGI="/cgi/rep/article.cgi"
+
+echo ""
+echo "Rep - Repubblica"
+echo ""
+
+url="https://rep.repubblica.it/ws/cover.json"
+/usr/bin/ftp -V -o - "${url}" |
+/usr/pkg/bin/jq -r '.feed.zones | .[].blocks | .[].entries | .[] |
+ .title + "\u001c" +
+ .author + "\u001c" +
+ .created[0:10] + "\u001c" +
+ .links[1].href + "\u001c" +
+ .summary + "\u001e"
+' | awk '
+
+BEGIN {
+ FS = "\034"
+ RS = "\036"
+}
+
+function html_decode(s)
+{
+ gsub(/“/, "\"", s);
+ gsub(/”/, "\"", s);
+ gsub(/’/, "\047", s);
+ gsub(/à/, "à", s);
+ gsub(/é/, "é", s);
+ gsub(/è/, "è", s);
+ gsub(/ì/, "ì", s);
+ gsub(/ò/, "ò", s);
+ gsub(/ù/, "ù", s);
+
+ return s
+}
+
+NF == 5 {
+ gsub(/\n/, "")
+
+ title = $1
+ author = $2
+ created = $3
+ link = $4
+ summary = $5
+
+ gsub("\\|", "\\|", title)
+ gsub("\\|", "\\|", link)
+
+ title = html_decode(title)
+
+ printf("[0|%s|%s|server|port]\n", title, "'${ARTICLE_CGI}?'" link)
+ printf("t%s %s\n", author, created)
+ printf("\n")
+}
+'