scrrape fonts
This commit is contained in:
@@ -12,8 +12,24 @@ cat resume.html \
|
||||
| sed 's/margin-top: 12pt;/margin-top: 17pt;/g' \
|
||||
| sed 's/margin-top: 8pt;/margin-top: 12pt;/g' \
|
||||
| sed 's/margin-top: 6pt;/margin-top: 10pt;/g' \
|
||||
| sed 's#"/fonts/#"https://www.open-resume.com/fonts/#g' \
|
||||
| sed 's#<link [^>]*as="font"[^>]*/fonts/[^L][^>]*>##g' \
|
||||
| sed "s#<link [^>]*as=\"font\"[^>]*/fonts/[^${font_family:0:1}][^>]*>##g" \
|
||||
| sed "s#<link [^>]*as=\"font\"[^>]*/fonts/${font_family:0:1}[^${font_family:1:1}][^>]*>##g" \
|
||||
| sed "s#/fonts/#./fonts/#g" \
|
||||
> resume.html.2 \
|
||||
|| rm resume.html.2
|
||||
|
||||
for font_file in $(
|
||||
cat resume.html.2 \
|
||||
| grep -o 'href="./fonts/[^"]*' \
|
||||
| sed 's#.*"./##'
|
||||
); do
|
||||
if [ ! -f "$font_file" ]; then
|
||||
mkdir -p ./${font_file%/*}/
|
||||
curl -sS -L https://www.open-resume.com/$font_file > $font_file
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
# | sed 's#"/fonts/#"https://www.open-resume.com/fonts/#g' \
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user