Created
September 30, 2020 08:35
-
-
Save orumin/cd0c6a9e48c718b8f718d9269791d82d to your computer and use it in GitHub Desktop.
売れない芸人の名前ジェネレータ
This file contains hidden or 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
.PHONY: all unpack | |
GEO_DICT=SKK-JISYO.geo.utf8 | |
EN_DICT=SKK-JISYO.edict.utf8 | |
DICTS=$(GEO_DICT) $(EN_DICT) | |
WORD_LISTS=2ch-words.txt 6ch-words.txt | |
all: $(WORD_LISTS) | |
@for i in `seq 50`; \ | |
do \ | |
echo `shuf 6ch-words.txt | head -n 1``shuf 2ch-words.txt | head -n 1`; \ | |
done | |
$(EN_DICT): | |
curl -LO http://openlab.jp/skk/dic/SKK-JISYO.edict.tar.gz | |
tar -xzf SKK-JISYO.edict.tar.gz | |
iconv -f euc-jp -t utf8 SKK-JISYO.edict > SKK-JISYO.edict.utf8 | |
$(GEO_DICT): | |
curl -LO http://openlab.jp/skk/dic/SKK-JISYO.geo.gz | |
gunzip SKK-JISYO.geo.gz | |
iconv -f euc-jp -t utf8 SKK-JISYO.geo > SKK-JISYO.geo.utf8 | |
$(WORD_LISTS): $(DICTS) | |
grep -oE '/[亜-熙]{2}/' SKK-JISYO.geo.utf8 | awk -F'/' '{print $$2}' > 2ch-words.txt | |
grep -oE '/[ァ-ン]{6}/$$' SKK-JISYO.edict.utf8 | awk -F'/' '{print $$2}' > 6ch-words.txt | |
unpack: $(WORD_LISTS) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment