From ddb770da6f12a3e49b74288e5cbe5970f39c88ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Thu, 21 Jul 2022 20:26:08 +0200 Subject: [PATCH] hesychius: add download script --- hesychius/download.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 hesychius/download.sh diff --git a/hesychius/download.sh b/hesychius/download.sh new file mode 100755 index 0000000..e861cf7 --- /dev/null +++ b/hesychius/download.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +root=https://el.wikisource.org + +curl -sSL "$root/wiki/%CE%93%CE%BB%CF%8E%CF%83%CF%83%CE%B1%CE%B9" \ + | htmlq --attribute href 'ol li a[title^="Γλ"]' \ + | while read -r slug; do + curl -sSL "$root$slug" | htmlq dd | sed 's###g;s#<#<#g;s#>#>#g' + done