ジャンプの打ち切り漫画一覧取得のシェル芸
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -s https://ja.wikipedia.org/wiki/%E9%80%B1%E5%88%8A%E5%B0%91%E5%B9%B4%E3%82%B8%E3%83%A3%E3%83%B3%E3%83%97%E9%80%A3%E8%BC%89%E4%BD%9C%E5%93%81%E3%81%AE%E4%B8%80%E8%A6%A7 \ | | |
sed -e 's/<span style="display:none[^>]*>[^>]*>//g;s/<td>/&__________/g;s|</ br>||g' | \ | |
w3m -dump -cols 500 -T text/html | nkf -Lu | sed 's/__________/\x0/g' | \ | |
grep -a -E '^ *[0-9]+ +' | grep -a -v -e '短期集中連載' -e '移籍' -e '連載中' -e '月1連載' -e '続編' | \ | |
sed -r 's/^ *[0-9]+ +//g;s/\^\[[0-9]+\]//g;s/^\x0//g;s/ {2,}/\t/g;s|/[0-9]+||g' | \ | |
awk -F"\0" ' | |
BEGIN{OFS="\t"} | |
{ | |
s=$(NF-2); | |
split(s, st, "."); | |
stx=st[1]*53+st[2]; | |
e=$(NF-1); | |
split(e, en, "."); | |
enx=en[1]*53+en[2]; | |
diff=enx-stx; | |
print $1,s,e,diff | |
}' | \ | |
awk -F"\t" '$NF<53{print}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment