jojoleprowebsite

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

commit 30e8398b13517a9608d7352a6755da4b6467363f
parent 9b11ca9fd94a485d851bc4249ab4a6082355d1a2
Author: Joël Lupien (Jojolepro) <jojolepro@jojolepro.com>
Date:   Fri, 17 Apr 2020 21:19:00 -0400

Make blog list page

Diffstat:
Mbuild.sh | 11+++++++++++
Abuild/blog/2020-04-09_simple_school_documents/index.html | 250+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Abuild/blog/2020-04-09_simple_school_documents/index.txt | 184+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Abuild/blog/index.html | 68++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/blog/index.html | 2++
5 files changed, 515 insertions(+), 0 deletions(-)

diff --git a/build.sh b/build.sh @@ -33,6 +33,17 @@ while read -r page; do printf '%s\n' "CC $page" ;; + *.html) + cat "../src/$page" | + sed '/%%CONTENT%%/r /dev/stdin' /tmp/template.html | + sed '/%%CONTENT%%/d' | + + sed "s|%%SOURCE%%|/${page##./}|" \ + > "${page%%.html}.html" + + printf '%s\n' "CC $page" + ;; + # Copy over any images or non-txt files. *) cp "../src/$page" "$page" diff --git a/build/blog/2020-04-09_simple_school_documents/index.html b/build/blog/2020-04-09_simple_school_documents/index.html @@ -0,0 +1,250 @@ +<!doctype html> +<html lang=en> + <head> + <link href='data:image/png;base64,R0lGODlhGAAYAOeIAAAAALVSwLlUxLxXyLlZxMlb1cpc1hScoRSepNBf3c9h29Rg4NJh39Nh4BWhps9j3NJi3s1k2dVh4tBk3NVi4tNj39Zi49di49di5NBl3NVj4tNk39hi5dZj49Zj5Nli5dRk4ddj5NVk4thj5dti5tNl4Nhj5tZk49Fm3tlj5dRl4Nlj5tdk49dk5Npj5ddk5dVl4dhk5dZl49lk5tdl5dpk5tZm49Nn5NVn4tVn5dZn49Ro4Nlm5tNo5ddn5NBq29Vo4dVo4haortln5dRp4Ndo49Zp49Nq5Raqr9pp59hr5NFu5Nls5s1y5BevtBawtcp25BizuRi1uhm4vi20wbqG4hm7wRq8whm9w7yI4raM4Bq/xRq/xrSO4RrByBrDyRvDyhvFyxvGzBvHzRvHzqeb4BvIzhvIzxzIzxvJz6ad4CTH0aKf3xzK0BzK0RzL0p6i3xzN1BzP1R3P1pGr3h3Q15Or3RzR2CPP2R3R2B3R2R/R2RzS2R3S2SfP2Yex3Yey3TPN2TbN2Xm43DDP2Xa63EXK2kbK2v///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH+B2hhaSBoYWkAIfkEAQoA/wAsAAAAABgAGAAACP4A/wkcSLCgwYMFASgEgLDhQiFWrkxZ2JAgACl58vTZuDGPwor/ALzhyFEMmI1uGCIEUKfPHABkODoAMGZjHZUJ02wEEAUARwBofNrEOVBoH5EAzuyMA0Djxi9EAXD5mWdOS5JYo2Ld+pNjGpUAEGwVmrLPlqMkwSLhCgAqAgAHjG40wxCAE656ADzBQwWAHz5ZQ2LhashOlR4uSOToAkjQz5BesB5ic4QHiyQyiFiokQJKoZ8ATnIctCQGBCYqRHjYoWPIihUvyhA6CiDMxj10aFhI8MBGhghBZnTg8fp1FkIKa/aBk2LFhQUlbOAoooHDiRbFX2tR2EbPnw+vR0NMMAJEAQwQFBpoCDFCgoCFAOQEapJ9Q5EKDFCUKPKDAPyid6hhQnZK+GDAAPARVdQaN7yGQQEB/AdSSAlOaOGFAgUEADs=' + rel=icon> + <title>Jojolepro.com</title> + <meta charset=utf-8> + <meta name=description content="A bunch of stuff and things!"> + <style> + body{ + text-align:center; + overflow-y:scroll; + /*font:calc(0.75em + 1vmin) monospace;*/ + font: 1.3em monospace; + background-color: #181a1b; + border-color: #575757; + color: #e8e6e3; + } + pre{ + text-align:left; + display:inline-block; + } + img{ + max-width:80ch; + display:block; + height:auto; + width:100%; + } + a { + color: #3391ff; + } + * { + scrollbar-color: #2a2c2e #1c1e1f; + } + /*@media(prefers-color-scheme:dark){ + body{ + background:#000; + color:#fff; + } + a{ + color:#6CF; + } + }*/ + </style> + </head> + <body> + <nav> + <a href=/><b>Jojolepro</b></a> + <br/> + <a href=/blog>Blog </a> + <a href=https://github.com/jojolepro/>GitHub</a> + </nav> + <br/> + <article> + <pre> +Writing Simple School Documents (Groff Articles) +================================================================================ + +Hello there! +Today, I will be teaching you how to write documents really quickly using tools +that are most likely already on your linux installation. + +You are using linux... aren't you? + +Anyways, today I will be showing you the Groff tool using examples. +Let's get started. + +Headers +-------------------------------------------------------------------------------- + +Every good document starts with a header! Let's do this now. +Create a file called "article.ms". + +Insert the following lines into it using your favorite editor: + +.TL +My KKool title +.AU +My Name +.AI +My Institution Name +.NH 1 +Some Heading Text +.PP +This is text in a paragraph. + +Pretty simple right? + +Getting the result +-------------------------------------------------------------------------------- + +To generate a pdf from this, use the following command: + +$ groff -ms -Tpdf article.ms &gt; article.pdf + +Now, this might need a bit of explanation. +Groff is the command we are using. It is used to translate text into... well +formatted text. +The -ms flag indicates that we want to use the "ms" macro. This is what allows +groff to understand what .TL, .AU, .AI and .NH mean +(however, .PP is provided by groff.) +The -Tpdf option means that we want to output to be in pdf format. +Last but not least, we specify our input file (article.ms). +Finally, we redirect the output of groff into an actual file. + +Creating Headers With Multiple Levels +-------------------------------------------------------------------------------- + +Try the following: + +.NH 1 +.NH 1 +.NH 2 +.NH 2 +.NH 2 +.NH 3 +.NH 3 +.NH 3 +.NH 3 + +This should be self explanatory once you see the results. :) + +Creating Blocks Of Code +-------------------------------------------------------------------------------- + +Sometimes, you want to insert text using a monospace font (constant width) +that doesn't get formatted. For this, you can use the following: + +.DS +.ft CW +fn my_kkool_function(int a, int b) { + ... +} +.ft +.DE + +Let's see what happens here: +.DS Creates a block where automatic formatting is disabled. +.ft CW Changes the font to a Constant-Width font. +.ft Changes the font back to normal. +.DE Ends the block, re-enabling automatic text formatting. + +Writing Mathematical Equations +-------------------------------------------------------------------------------- + +For this, we will be using a macro package called "eqn". + +.EQ +n*(n-1) over 2 +.EN + +I assume the macro names stands for .EQuation and .ENd +To see the result however, we will need to modify our command and enable our +eqn package. Here is the new command: + +$ groff -e -ms -Tpdf article.ms &gt; article.pdf + +Now, you should see a (kind of) pretty equation. :) + +Inline Mathematical Equations +-------------------------------------------------------------------------------- + +Now, let's say that you want your equation to show up in the middle of a +sentence. What you can do is set a "delimiter" which you will insert in your +text that will turn on and off the eqn mode. Let's see how that works. + +Insert the following all the way at the top of the document: + +.EQ +delim $$ +.EN + +Then, somewhere in your text, do something like this: + +blablabla...blabla $2*2=4$ blablabla... + +Voilà! + +Tables? Tables!! +-------------------------------------------------------------------------------- + +Tables: + +.TS +tab(,),allbox; +ccc. +a,b,c, +d,e,f, +.TE + +Wow, what is all of that?? +As you might expect by now, .TS and .TE are the start and the end of the table. +Then we have a line that configures the option of the table. +tab(,) means that we are separating each value using a comma ",". +allbox means that we have a box around all the table cells. +Then, the second line defines the column. Here, "c" indicates "centered". +Finally, we have our cell values separated by commas. + +To build our pdf file, we will yet again need to add another macro. This time, +it is the -t (for table) macro. Here is our new command: + +groff -t -e -ms -Tpdf article.ms &gt; article.pdf + +Boom! A pretty table. Flip all the tables! + +Including Images +-------------------------------------------------------------------------------- + +Last but not least, we will learn to include (postscript) images! + +.PSPIC your_picture.ps + +For the images to show up, +we will need to change the output format to postscript and then convert that +postscript file to a pdf. This is simpler than it sounds. + +groff -t -e -ms -Tps article.ms | ps2pdf - article.pdf + +Using Special Characters (éèëïù...) +-------------------------------------------------------------------------------- + +Special characters will have a hard time using the default settings. +Using the a preprocessor called preconv, we can fix this easily. +Simply add -k to our command and we are done! :) + +groff -t -e -k -ms -Tpdf article.ms &gt; article.pdf + +Going Further +-------------------------------------------------------------------------------- + +Sadly, the documentation is very sparse and its not obvious to go through it +all. +Here are some man pages to get you started: +-groff(1) the groff command. +-groff(7) the groff format. +-groff_man(7) for writing manual pages. +-groff_ms(7) for writing articles/manuscripts. +-eqn(1) math equations. +-tbl(1) Tables! Tables! Tables!!! GOTTA FLIP!! + </pre> + </article> + <br/> + <footer> + <div> + (C) Joël Lupien 2020-2020 + </div> + <a href="/blog/2020-04-09_simple_school_documents/index.txt">View page source</a> + </footer> + </body> +</html> diff --git a/build/blog/2020-04-09_simple_school_documents/index.txt b/build/blog/2020-04-09_simple_school_documents/index.txt @@ -0,0 +1,184 @@ +Writing Simple School Documents (Groff Articles) +================================================================================ + +Hello there! +Today, I will be teaching you how to write documents really quickly using tools +that are most likely already on your linux installation. + +You are using linux... aren't you? + +Anyways, today I will be showing you the Groff tool using examples. +Let's get started. + +Headers +-------------------------------------------------------------------------------- + +Every good document starts with a header! Let's do this now. +Create a file called "article.ms". + +Insert the following lines into it using your favorite editor: + +.TL +My KKool title +.AU +My Name +.AI +My Institution Name +.NH 1 +Some Heading Text +.PP +This is text in a paragraph. + +Pretty simple right? + +Getting the result +-------------------------------------------------------------------------------- + +To generate a pdf from this, use the following command: + +$ groff -ms -Tpdf article.ms > article.pdf + +Now, this might need a bit of explanation. +Groff is the command we are using. It is used to translate text into... well +formatted text. +The -ms flag indicates that we want to use the "ms" macro. This is what allows +groff to understand what .TL, .AU, .AI and .NH mean +(however, .PP is provided by groff.) +The -Tpdf option means that we want to output to be in pdf format. +Last but not least, we specify our input file (article.ms). +Finally, we redirect the output of groff into an actual file. + +Creating Headers With Multiple Levels +-------------------------------------------------------------------------------- + +Try the following: + +.NH 1 +.NH 1 +.NH 2 +.NH 2 +.NH 2 +.NH 3 +.NH 3 +.NH 3 +.NH 3 + +This should be self explanatory once you see the results. :) + +Creating Blocks Of Code +-------------------------------------------------------------------------------- + +Sometimes, you want to insert text using a monospace font (constant width) +that doesn't get formatted. For this, you can use the following: + +.DS +.ft CW +fn my_kkool_function(int a, int b) { + ... +} +.ft +.DE + +Let's see what happens here: +.DS Creates a block where automatic formatting is disabled. +.ft CW Changes the font to a Constant-Width font. +.ft Changes the font back to normal. +.DE Ends the block, re-enabling automatic text formatting. + +Writing Mathematical Equations +-------------------------------------------------------------------------------- + +For this, we will be using a macro package called "eqn". + +.EQ +n*(n-1) over 2 +.EN + +I assume the macro names stands for .EQuation and .ENd +To see the result however, we will need to modify our command and enable our +eqn package. Here is the new command: + +$ groff -e -ms -Tpdf article.ms > article.pdf + +Now, you should see a (kind of) pretty equation. :) + +Inline Mathematical Equations +-------------------------------------------------------------------------------- + +Now, let's say that you want your equation to show up in the middle of a +sentence. What you can do is set a "delimiter" which you will insert in your +text that will turn on and off the eqn mode. Let's see how that works. + +Insert the following all the way at the top of the document: + +.EQ +delim $$ +.EN + +Then, somewhere in your text, do something like this: + +blablabla...blabla $2*2=4$ blablabla... + +Voilà! + +Tables? Tables!! +-------------------------------------------------------------------------------- + +Tables: + +.TS +tab(,),allbox; +ccc. +a,b,c, +d,e,f, +.TE + +Wow, what is all of that?? +As you might expect by now, .TS and .TE are the start and the end of the table. +Then we have a line that configures the option of the table. +tab(,) means that we are separating each value using a comma ",". +allbox means that we have a box around all the table cells. +Then, the second line defines the column. Here, "c" indicates "centered". +Finally, we have our cell values separated by commas. + +To build our pdf file, we will yet again need to add another macro. This time, +it is the -t (for table) macro. Here is our new command: + +groff -t -e -ms -Tpdf article.ms > article.pdf + +Boom! A pretty table. Flip all the tables! + +Including Images +-------------------------------------------------------------------------------- + +Last but not least, we will learn to include (postscript) images! + +.PSPIC your_picture.ps + +For the images to show up, +we will need to change the output format to postscript and then convert that +postscript file to a pdf. This is simpler than it sounds. + +groff -t -e -ms -Tps article.ms | ps2pdf - article.pdf + +Using Special Characters (éèëïù...) +-------------------------------------------------------------------------------- + +Special characters will have a hard time using the default settings. +Using the a preprocessor called preconv, we can fix this easily. +Simply add -k to our command and we are done! :) + +groff -t -e -k -ms -Tpdf article.ms > article.pdf + +Going Further +-------------------------------------------------------------------------------- + +Sadly, the documentation is very sparse and its not obvious to go through it +all. +Here are some man pages to get you started: +-groff(1) the groff command. +-groff(7) the groff format. +-groff_man(7) for writing manual pages. +-groff_ms(7) for writing articles/manuscripts. +-eqn(1) math equations. +-tbl(1) Tables! Tables! Tables!!! GOTTA FLIP!! diff --git a/build/blog/index.html b/build/blog/index.html @@ -0,0 +1,68 @@ +<!doctype html> +<html lang=en> + <head> + <link href='data:image/png;base64,R0lGODlhGAAYAOeIAAAAALVSwLlUxLxXyLlZxMlb1cpc1hScoRSepNBf3c9h29Rg4NJh39Nh4BWhps9j3NJi3s1k2dVh4tBk3NVi4tNj39Zi49di49di5NBl3NVj4tNk39hi5dZj49Zj5Nli5dRk4ddj5NVk4thj5dti5tNl4Nhj5tZk49Fm3tlj5dRl4Nlj5tdk49dk5Npj5ddk5dVl4dhk5dZl49lk5tdl5dpk5tZm49Nn5NVn4tVn5dZn49Ro4Nlm5tNo5ddn5NBq29Vo4dVo4haortln5dRp4Ndo49Zp49Nq5Raqr9pp59hr5NFu5Nls5s1y5BevtBawtcp25BizuRi1uhm4vi20wbqG4hm7wRq8whm9w7yI4raM4Bq/xRq/xrSO4RrByBrDyRvDyhvFyxvGzBvHzRvHzqeb4BvIzhvIzxzIzxvJz6ad4CTH0aKf3xzK0BzK0RzL0p6i3xzN1BzP1R3P1pGr3h3Q15Or3RzR2CPP2R3R2B3R2R/R2RzS2R3S2SfP2Yex3Yey3TPN2TbN2Xm43DDP2Xa63EXK2kbK2v///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH+B2hhaSBoYWkAIfkEAQoA/wAsAAAAABgAGAAACP4A/wkcSLCgwYMFASgEgLDhQiFWrkxZ2JAgACl58vTZuDGPwor/ALzhyFEMmI1uGCIEUKfPHABkODoAMGZjHZUJ02wEEAUARwBofNrEOVBoH5EAzuyMA0Djxi9EAXD5mWdOS5JYo2Ld+pNjGpUAEGwVmrLPlqMkwSLhCgAqAgAHjG40wxCAE656ADzBQwWAHz5ZQ2LhashOlR4uSOToAkjQz5BesB5ic4QHiyQyiFiokQJKoZ8ATnIctCQGBCYqRHjYoWPIihUvyhA6CiDMxj10aFhI8MBGhghBZnTg8fp1FkIKa/aBk2LFhQUlbOAoooHDiRbFX2tR2EbPnw+vR0NMMAJEAQwQFBpoCDFCgoCFAOQEapJ9Q5EKDFCUKPKDAPyid6hhQnZK+GDAAPARVdQaN7yGQQEB/AdSSAlOaOGFAgUEADs=' + rel=icon> + <title>Jojolepro.com</title> + <meta charset=utf-8> + <meta name=description content="A bunch of stuff and things!"> + <style> + body{ + text-align:center; + overflow-y:scroll; + /*font:calc(0.75em + 1vmin) monospace;*/ + font: 1.3em monospace; + background-color: #181a1b; + border-color: #575757; + color: #e8e6e3; + } + pre{ + text-align:left; + display:inline-block; + } + img{ + max-width:80ch; + display:block; + height:auto; + width:100%; + } + a { + color: #3391ff; + } + * { + scrollbar-color: #2a2c2e #1c1e1f; + } + /*@media(prefers-color-scheme:dark){ + body{ + background:#000; + color:#fff; + } + a{ + color:#6CF; + } + }*/ + </style> + </head> + <body> + <nav> + <a href=/><b>Jojolepro</b></a> + <br/> + <a href=/blog>Blog </a> + <a href=https://github.com/jojolepro/>GitHub</a> + </nav> + <br/> + <article> + <pre> +<a href="2020-03-31_extracting_data_from_websites">Extracting Data From Websites</a> +<a href="2020-04-09_simple_school_documents">Simple School Documents</a> + </pre> + </article> + <br/> + <footer> + <div> + (C) Joël Lupien 2020-2020 + </div> + <a href="/blog/index.html">View page source</a> + </footer> + </body> +</html> diff --git a/src/blog/index.html b/src/blog/index.html @@ -0,0 +1,2 @@ +<a href="2020-03-31_extracting_data_from_websites">Extracting Data From Websites</a> +<a href="2020-04-09_simple_school_documents">Simple School Documents</a>