WIP CGI to list all rai.it programs - 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 cad9380f0115c1cdec4ee19d1502bf33dd3209b4
 (DIR) parent 8ce2816283afcf5c78845b8c7ec949f6281d7f7e
 (HTM) Author: Leonardo Taccari <iamleot@gmail.com>
       Date:   Thu, 13 Sep 2018 13:27:35 
       
       WIP CGI to list all rai.it programs
       
       Diffstat:
        raiplay/elenco-programmi.dcgi |  30 ++++++++++++++++++++++++++++++
        1 files changed, 30 insertions(+), 0 deletions(-)
       ---
       diff -r 8ce2816283af -r cad9380f0115 raiplay/elenco-programmi.dcgi
       --- /dev/null   Thu Jan 01 00:00:00 1970 +0000
       +++ b/raiplay/elenco-programmi.dcgi     Thu Sep 13 13:27:35 2018 +0200
       @@ -0,0 +1,30 @@
       +#!/bin/sh
       +
       +url="https://www.raiplay.it/dl/RaiTV/RaiPlayMobile/Prod/Config/programmiAZ-elenco.json"
       +
       +/usr/pkg/bin/curl -gs "${url}" |
       +/usr/pkg/bin/jq -r '.[] | .[] | (
       +       .name + "\t" +
       +       .tipology + "\t" +
       +       .PLRanno + "\t" +
       +       .PathID
       +)' | sort | awk '
       +BEGIN {
       +       FS = "\t"
       +}
       +
       +{
       +       title = $1
       +       tipology = $2
       +       year = $3
       +       pathid = $4
       +
       +       desc = title
       +       desc = desc " (" year ")"
       +       if (tipology) {
       +               desc = desc " - " tipology
       +       }
       +
       +       printf("%s - %s\n", desc, pathid)
       +}
       +'