]> git.nbdom.net Git - nb.git/commitdiff
lib/postgres/css_reference.sql
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 22 Jun 2018 03:19:08 +0000 (04:19 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 22 Jun 2018 03:19:08 +0000 (04:19 +0100)
lib/postgres/css_reference.sql

index 5599e3a71e70a874a0d6d5de5a19d4b212378f38..6c8e78ec55b9453d9a0e1b13e2aec6305fd6e86f 100644 (file)
@@ -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,<a href=\"([a-z][^\"]+)\">(.*?)</a>,https://www.w3schools.com/cssref/\1</td><td>\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;