Add fields that can will be used for pagination - 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 33b70e68204e1f045aae39ecced5dd3f7db392df
 (DIR) parent 380cfc32ba37536de86c71b4b72335761d3ca09e
 (HTM) Author: Leonardo Taccari <iamleot@gmail.com>
       Date:   Wed, 27 Feb 2019 13:56:20 
       
       Add fields that can will be used for pagination
       
       (to go to the prev/next page just adjusting `i' will do the trick (e.g. i=30,
       and so on))
       
       Diffstat:
        duckduckgo/search.dcgi |  6 ++++--
        1 files changed, 4 insertions(+), 2 deletions(-)
       ---
       diff -r 380cfc32ba37 -r 33b70e68204e duckduckgo/search.dcgi
       --- a/duckduckgo/search.dcgi    Wed Feb 27 11:19:42 2019 +0100
       +++ b/duckduckgo/search.dcgi    Wed Feb 27 13:56:20 2019 +0100
       @@ -6,7 +6,8 @@
        
        if [ -n "$1" ]; then
               query=$1
       -       url="https://duckduckgo.com/lite"
       +       i=0
       +       url="https://duckduckgo.com/lite/"
        else
               exit 1
        fi
       @@ -15,7 +16,8 @@
        echo "tDuckDuckGo"
        echo "t"
        
       -curl -A '' -Lgs -d "q=${query}" -- "${url}" |
       +curl -A '' -Lgs -d "q=${query}" -d "s=${i}" \
       +    -d "nextParams=" -d "v=l" -d "o=json" -d "api=/d.js" -- "${url}" |
        awk \
        '
        function gphize(s)