Skip to content

Instantly share code, notes, and snippets.

@akanehara
Last active August 1, 2020 02:02
Show Gist options
  • Save akanehara/97a7ee8627413eb5d3d5dece13ac4948 to your computer and use it in GitHub Desktop.
Save akanehara/97a7ee8627413eb5d3d5dece13ac4948 to your computer and use it in GitHub Desktop.
斎藤衛氏の国会証人喚問での発言
curl -s "https://kokkai.ndl.go.jp/api/speech?$(echo 'speaker=斎藤衛' | perl -MURI::Escape -ple '$_=uri_escape $_;')" | xmllint --encode utf-8 --xpath "//session|//date|//speech|//speaker" - | nkf --numchar-input | tr -d '\n' | LANG=C LC_ALL=C sed -e 's/ *//g' | sed -e 's/<[\/0-9a-zA-Z]*>/ /g' | xargs -n4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment