scrrape fonts

master
bel 2023-07-06 23:25:30 -06:00
parent e6c1d153b7
commit d1278dc5b7
5 changed files with 34 additions and 17 deletions

View File

@ -16,6 +16,7 @@ rm -rf $outdir
mkdir -p $outdir/public
cp ./open-resume.com.d/resume.html.2 $outdir/public/index.html
cp ./open-resume.com.d/resume.pdf $outdir/public/BreeLaPointeResume.pdf
cp -r ./open-resume.com.d/fonts $outdir/public/
echo firebase uses squeaky2x3@gmail.com
firebase login

View File

@ -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' \

Binary file not shown.

Binary file not shown.

View File

@ -1,27 +1,27 @@
<html><head>
<link rel="preload" as="font" href="https://www.open-resume.com/fonts/Lato-Regular.ttf" type="font/ttf" crossorigin="anonymous">
<link rel="preload" as="font" href="https://www.open-resume.com/fonts/Lato-Bold.ttf" type="font/ttf" crossorigin="anonymous">
<link rel="preload" as="font" href="./fonts/Lato-Regular.ttf" type="font/ttf" crossorigin="anonymous">
<link rel="preload" as="font" href="./fonts/Lato-Bold.ttf" type="font/ttf" crossorigin="anonymous">
<link rel="preload" as="font" href="https://www.open-resume.com/fonts/Lora-Regular.ttf" type="font/ttf" crossorigin="anonymous">
<link rel="preload" as="font" href="https://www.open-resume.com/fonts/Lora-Bold.ttf" type="font/ttf" crossorigin="anonymous">
<style>
@font-face {font-family: "Roboto"; src: url("https://www.open-resume.com/fonts/Roboto-Regular.ttf");}
@font-face {font-family: "Roboto"; src: url("https://www.open-resume.com/fonts/Roboto-Bold.ttf"); font-weight: bold;}@font-face {font-family: "Lato"; src: url("https://www.open-resume.com/fonts/Lato-Regular.ttf");}
@font-face {font-family: "Lato"; src: url("https://www.open-resume.com/fonts/Lato-Bold.ttf"); font-weight: bold;}@font-face {font-family: "Montserrat"; src: url("https://www.open-resume.com/fonts/Montserrat-Regular.ttf");}
@font-face {font-family: "Montserrat"; src: url("https://www.open-resume.com/fonts/Montserrat-Bold.ttf"); font-weight: bold;}@font-face {font-family: "OpenSans"; src: url("https://www.open-resume.com/fonts/OpenSans-Regular.ttf");}
@font-face {font-family: "OpenSans"; src: url("https://www.open-resume.com/fonts/OpenSans-Bold.ttf"); font-weight: bold;}@font-face {font-family: "Raleway"; src: url("https://www.open-resume.com/fonts/Raleway-Regular.ttf");}
@font-face {font-family: "Raleway"; src: url("https://www.open-resume.com/fonts/Raleway-Bold.ttf"); font-weight: bold;}@font-face {font-family: "Caladea"; src: url("https://www.open-resume.com/fonts/Caladea-Regular.ttf");}
@font-face {font-family: "Caladea"; src: url("https://www.open-resume.com/fonts/Caladea-Bold.ttf"); font-weight: bold;}@font-face {font-family: "Lora"; src: url("https://www.open-resume.com/fonts/Lora-Regular.ttf");}
@font-face {font-family: "Lora"; src: url("https://www.open-resume.com/fonts/Lora-Bold.ttf"); font-weight: bold;}@font-face {font-family: "RobotoSlab"; src: url("https://www.open-resume.com/fonts/RobotoSlab-Regular.ttf");}
@font-face {font-family: "RobotoSlab"; src: url("https://www.open-resume.com/fonts/RobotoSlab-Bold.ttf"); font-weight: bold;}@font-face {font-family: "PlayfairDisplay"; src: url("https://www.open-resume.com/fonts/PlayfairDisplay-Regular.ttf");}
@font-face {font-family: "PlayfairDisplay"; src: url("https://www.open-resume.com/fonts/PlayfairDisplay-Bold.ttf"); font-weight: bold;}@font-face {font-family: "Merriweather"; src: url("https://www.open-resume.com/fonts/Merriweather-Regular.ttf");}
@font-face {font-family: "Merriweather"; src: url("https://www.open-resume.com/fonts/Merriweather-Bold.ttf"); font-weight: bold;}
@font-face {font-family: "Roboto"; src: url("./fonts/Roboto-Regular.ttf");}
@font-face {font-family: "Roboto"; src: url("./fonts/Roboto-Bold.ttf"); font-weight: bold;}@font-face {font-family: "Lato"; src: url("./fonts/Lato-Regular.ttf");}
@font-face {font-family: "Lato"; src: url("./fonts/Lato-Bold.ttf"); font-weight: bold;}@font-face {font-family: "Montserrat"; src: url("./fonts/Montserrat-Regular.ttf");}
@font-face {font-family: "Montserrat"; src: url("./fonts/Montserrat-Bold.ttf"); font-weight: bold;}@font-face {font-family: "OpenSans"; src: url("./fonts/OpenSans-Regular.ttf");}
@font-face {font-family: "OpenSans"; src: url("./fonts/OpenSans-Bold.ttf"); font-weight: bold;}@font-face {font-family: "Raleway"; src: url("./fonts/Raleway-Regular.ttf");}
@font-face {font-family: "Raleway"; src: url("./fonts/Raleway-Bold.ttf"); font-weight: bold;}@font-face {font-family: "Caladea"; src: url("./fonts/Caladea-Regular.ttf");}
@font-face {font-family: "Caladea"; src: url("./fonts/Caladea-Bold.ttf"); font-weight: bold;}@font-face {font-family: "Lora"; src: url("./fonts/Lora-Regular.ttf");}
@font-face {font-family: "Lora"; src: url("./fonts/Lora-Bold.ttf"); font-weight: bold;}@font-face {font-family: "RobotoSlab"; src: url("./fonts/RobotoSlab-Regular.ttf");}
@font-face {font-family: "RobotoSlab"; src: url("./fonts/RobotoSlab-Bold.ttf"); font-weight: bold;}@font-face {font-family: "PlayfairDisplay"; src: url("./fonts/PlayfairDisplay-Regular.ttf");}
@font-face {font-family: "PlayfairDisplay"; src: url("./fonts/PlayfairDisplay-Bold.ttf"); font-weight: bold;}@font-face {font-family: "Merriweather"; src: url("./fonts/Merriweather-Regular.ttf");}
@font-face {font-family: "Merriweather"; src: url("./fonts/Merriweather-Bold.ttf"); font-weight: bold;}
</style>
</head>
<body style="margin: auto !important; padding-bottom: 2em !important; width: 612pt; margin: 0; padding: 0; -webkit-text-size-adjust:none;">