dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

article-noecho-news (654B)


      1 #!/bin/sh
      2 output="$(curl -sL 'https://www.noecho.news/api/edge/analyze-article' \
      3  -H 'content-type: application/json' \
      4  -H 'origin: https://www.noecho.news' \
      5  -H 'accept-language: en-US,en;q=0.6' \
      6  -H 'referer: https://www.noecho.news/' \
      7  --data-raw "{\"url\":\"$1\"}")"
      8 
      9 curl -sL 'https://www.noecho.news/api/edge/find-different-perspectives' \
     10  -H 'content-type: application/json' \
     11  -H 'accept-language: en-US,en;q=0.6' \
     12  -H 'origin: https://www.noecho.news' \
     13  -H 'referer: https://www.noecho.news/' \
     14  --data-raw "{\"originalArticle\":$output}" \
     15  | jq -r '.[] | (["# \(.title)", .url, "=> \(.why)"] | join("\n") + "\n")' \
     16  | LESS='' less -X