-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathscrape-emojis.sh
More file actions
executable file
·54 lines (47 loc) · 1.72 KB
/
Copy pathscrape-emojis.sh
File metadata and controls
executable file
·54 lines (47 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
set -e
mkdir -p .cache
emojilist_file=.cache/emoji-list.html
if [ ! -f "$emojilist_file" ] || [ "$USE_CACHE" != "1" ]; then
echo "$emojilist_file not found or cache disabled."
read -p "Do you want to re-download $emojilist_file from unicode.org? This may take a while. (y/N): " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "Downloading $emojilist_file. May take a while..."
wget https://unicode.org/emoji/charts/emoji-list.html -O $emojilist_file
else
echo "Skipping download $emojilist_file. Using existing file."
fi
fi
emojilist_file=.cache/full-emoji-modifiers.html
if [ ! -f "$emojilist_file" ] || [ "$USE_CACHE" != "1" ]; then
echo "$emojilist_file not found or cache disabled."
read -p "Do you want to re-download $emojilist_file from unicode.org? This may take a while. (y/N): " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "Downloading $emojilist_file. May take a while..."
wget https://unicode.org/emoji/charts/full-emoji-modifiers.html -O $emojilist_file
else
echo "Skipping download $emojilist_file. Using existing file."
fi
fi
if [ "$USE_CACHE" != "1" ] || [ ! -d "emojibase" ]; then
echo "Cloning milesj/emojibase repository"
git clone --depth 1 git@github.com:milesj/emojibase.git
else
echo "Updating milesj/emojibase repository"
cd emojibase
git pull
cd ..
fi
if [ "$USE_CACHE" != "1" ] || [ ! -d "noto-emoji" ]; then
echo "Cloning noto-emoji repository"
git clone --depth 1 git@github.com:googlefonts/noto-emoji.git
else
echo "Updating noto-emoji repository"
cd noto-emoji
git pull
cd ..
fi
echo "Scraping emojis from downloaded files..."
scrapy runspider EmojiSpider.py