From 4ab26a7ef2cf0a23e19a59e917c93563013ace1c Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Fri, 22 Jun 2018 04:19:08 +0100 Subject: [PATCH] lib/postgres/css_reference.sql --- lib/postgres/css_reference.sql | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/postgres/css_reference.sql b/lib/postgres/css_reference.sql index 5599e3a7..6c8e78ec 100644 --- a/lib/postgres/css_reference.sql +++ b/lib/postgres/css_reference.sql @@ -6,10 +6,19 @@ CREATE TABLE IF NOT EXISTS css_reference ( ); BEGIN TRANSACTION; DELETE FROM css_reference; -COPY css_reference (name,description,link) FROM PROGRAM '. /etc/profile && html2txt https://www.w3schools.com/cssref/ | perl -ne " \ +COPY css_reference (name,description,link) FROM PROGRAM '. /etc/profile && \ +http_get https://www.w3schools.com/cssref/ | \ +html2txt | \ +perl -ne " \ next unless /^align-content .*Specifies/ .. /^z-index/ and /^[a-z]/; \ s/\s+/\t/; \ chomp; /^(\S+)/; \ print qq|\$_\thttps://www.w3schools.com/cssref/pr_\$1.asp\n|" \ ' WITH (format 'text', NULL ''); +-- NB 22.06.18 COPY css_reference (link,name,description) FROM PROGRAM '. /etc/profile && \ +-- NB 22.06.18 http_get https://www.w3schools.com/cssref/ | \ +-- NB 22.06.18 sed -E "s,(.*?),https://www.w3schools.com/cssref/\1\2,g" | \ +-- NB 22.06.18 html2txt | \ +-- NB 22.06.18 perl -ne "s/\s+/\t/ and s/\s+/\t/ and print if /^https.* [a-z]/" +-- NB 22.06.18 ' WITH (format 'text', NULL ''); COMMIT; -- 2.47.3