jojoleprowebsite

[Done] The Sauce of https://jojolepro.com
git clone https://git.jojolepro.com/jojoleprowebsite.git
Log | Files | Refs | README | LICENSE

commit 0abee83ecd316f9b26b0b7c2ae382176f1c39cab
parent d925faf613cd6c261556730a353207059c26c90b
Author: Joël Lupien (Jojolepro) <jojolepro@jojolepro.com>
Date:   Thu,  9 Apr 2020 21:43:32 -0400

Fix build process

Diffstat:
Mbuild.sh | 7+++++--
Mbuild/blog/2020-03-31_extracting_data_from_websites/index.html | 10+++++-----
Mbuild/index.html | 2+-
Mtemplate.html | 2+-
4 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/build.sh b/build.sh @@ -12,8 +12,11 @@ while read -r page; do case $page in *.txt) - sed -E "s|([^=][^\'\"])(https[:]//[^ )]*)|\1<a href='\2'>\2</a>|g" \ - "../src/$page" | + sed "s/</&lt/g" "../src/$page" | + sed "s/>/&gt/g" | + sed "s/&/&amp/g" | + + sed -E "s|([^=][^\'\"])(https[:]//[^ )]*)|\1<a href='\2'>\2</a>|g" | sed -E "s|^(https[:]//[^ )]{50})([^ )]*)|<a href='\0'>\1</a>|g" | diff --git a/build/blog/2020-03-31_extracting_data_from_websites/index.html b/build/blog/2020-03-31_extracting_data_from_websites/index.html @@ -21,7 +21,7 @@ display:inline-block; } img{ - max-width:57ch; + max-width:80ch; display:block; height:auto; width:100%; @@ -234,9 +234,9 @@ can remove sections of it. Here, the following request works: -$ curl "https://weather.gc.ca/radar/xhr.php?action=retrieve&target=images"\ -"&region=WUJ&product=PRECIP_SNOW&lang=en-CA&format=json" \ --H 'X-Requested-With:XMLHttpRequest' > /tmp/data.txt +$ curl "https://weather.gc.ca/radar/xhr.php?action=retrieve&amptarget=images"\ +"&ampregion=WUJ&ampproduct=PRECIP_SNOW&amplang=en-CA&ampformat=json" \ +-H 'X-Requested-With:XMLHttpRequest' >gt /tmp/data.txt Getting Our Sources ================================================================================ @@ -256,7 +256,7 @@ Since those aren't actually urls (they are missing <a href='https://....'>https: those. $ cat /tmp/data.txt | jq -r '.short | map(.src) | .[]' | sed \ -'s/^/https:\/\/weather.gc.ca/' > /tmp/urls.txt +'s/^/https:\/\/weather.gc.ca/' >gt /tmp/urls.txt If we look at our file, we see that everything looks good: diff --git a/build/index.html b/build/index.html @@ -21,7 +21,7 @@ display:inline-block; } img{ - max-width:57ch; + max-width:80ch; display:block; height:auto; width:100%; diff --git a/template.html b/template.html @@ -21,7 +21,7 @@ display:inline-block; } img{ - max-width:57ch; + max-width:80ch; display:block; height:auto; width:100%;