rename res/ to scripts/

This commit is contained in:
Abdullah Islam 2023-08-03 19:42:22 +06:00
parent efe0af7aae
commit fe45ac3466
16 changed files with 30 additions and 62 deletions

View File

@ -20,9 +20,9 @@ upload:
scp -r html/* techn0path@vern.cc:public_html
test: testing/input.gmi testing/input_feed.txt
mawk -f res/navbar.awk -f res/path.awk -f res/html.awk -- testing/input.gmi > testing/output.html
mawk -f res/navbar.awk -f res/path.awk -f res/gemini.awk -- testing/input.gmi > testing/output.gmi
mawk -f res/path.awk -f res/feed.awk -- testing/input_feed.txt > testing/output.atom
mawk -f scripts/navbar.awk -f scripts/path.awk -f scripts/html.awk -- testing/input.gmi > testing/output.html
mawk -f scripts/navbar.awk -f scripts/path.awk -f scripts/gemini.awk -- testing/input.gmi > testing/output.gmi
mawk -f scripts/path.awk -f scripts/feed.awk -- testing/input_feed.txt > testing/output.atom
html5validator testing/output.html
subdirs:
@ -43,20 +43,20 @@ gmi/%.webp: src/%.webp
html/style.css: src/style.css
cp $< $@
html/%.html: src/%.gmi res/html.awk res/navbar.awk
mawk -f res/navbar.awk -f res/path.awk -f res/html.awk -- $< > $@
html/%.html: src/%.gmi scripts/html.awk scripts/navbar.awk
mawk -f scripts/navbar.awk -f scripts/path.awk -f scripts/html.awk -- $< > $@
gmi/%.gmi: src/%.gmi res/gemini.awk res/navbar.awk
mawk -f res/navbar.awk -f res/path.awk -f res/gemini.awk -- $< > $@
gmi/%.gmi: src/%.gmi scripts/gemini.awk scripts/navbar.awk
mawk -f scripts/navbar.awk -f scripts/path.awk -f scripts/gemini.awk -- $< > $@
gmi/sitemap.gmi: $(SITEMAP_INDEX_FILES) res/sitemap_gmi.awk res/navbar.awk
mawk -f res/navbar.awk -v 'sourcePath=src/' -f res/path.awk -f res/sitemap_gmi.awk -- $(SITEMAP_INDEX_FILES) > $@
gmi/sitemap.gmi: $(SITEMAP_INDEX_FILES) scripts/sitemap_gmi.awk scripts/navbar.awk
mawk -f scripts/navbar.awk -v 'sourcePath=src/' -f scripts/path.awk -f scripts/sitemap_gmi.awk -- $(SITEMAP_INDEX_FILES) > $@
html/sitemap.html: $(SITEMAP_INDEX_FILES) res/sitemap_html.awk res/navbar.awk
mawk -f res/navbar.awk -v 'sourcePath=src/' -f res/path.awk -f res/sitemap_html.awk -- $(SITEMAP_INDEX_FILES) > $@
html/sitemap.html: $(SITEMAP_INDEX_FILES) scripts/sitemap_html.awk scripts/navbar.awk
mawk -f scripts/navbar.awk -v 'sourcePath=src/' -f scripts/path.awk -f scripts/sitemap_html.awk -- $(SITEMAP_INDEX_FILES) > $@
gmi/feed.atom: res/feed.awk
git log --diff-filter=A --pretty=format:'%aI "%s"' --name-only src/ | mawk -f res/path.awk -f res/feed.awk -- - > $@
gmi/feed.atom: scripts/feed.awk
git log --diff-filter=A --pretty=format:'%aI "%s"' --name-only src/ | mawk -f scripts/path.awk -f scripts/feed.awk -- - > $@
html/feed.atom: res/feed.awk
git log --diff-filter=A --pretty=format:'%aI "%s"' --name-only src/ | mawk -v 'willConvertLinks=1' -f res/path.awk -f res/feed.awk -- - > $@
html/feed.atom: scripts/feed.awk
git log --diff-filter=A --pretty=format:'%aI "%s"' --name-only src/ | mawk -v 'willConvertLinks=1' -f scripts/path.awk -f scripts/feed.awk -- - > $@

View File

@ -10,6 +10,8 @@
BEGIN {
FS = "[\t ]*"
body = ""
lastUpdated = ""
documentUuid = ""
}
/^[^#]/ {

View File

@ -1,13 +0,0 @@
# using AWK+make for static site generation
NOTE: This article is deprecated, see:
=> how-i-generate-this-website.gmi How I generate this website
First, I write raw gemtext. Then I run make, which first copies src/'s directory structure into html/ and gmi/, then runs AWK scripts outputting the pages you see, and finally uploads them to vern.cc.
My HTML generation script html.awk converts gemtext to HTML. gemini.awk merely adds elements to gemtext. navbar.awk is an AWK library file handling navigation bar generation. The index files of this website's sections are used to make the sitemap.
After changing my scripts, I run them on testing input, and record the output using git, which will show any changes.
## related
=> https://www.karl.berlin/static-site.html Karl Berlin: 'make' as a static site generator
=> http://git.vern.cc/techn0path/website My Git Repository

View File

@ -1,14 +0,0 @@
# How I generate this website
First, I write raw gemtext. After doing that, I run make, which generates the pages on this website, and uploads it to vern.cc.
I use AWK since it's quick to write, has good syntax, and well-suited for processing text.
html.awk converts gemtext into HTML.
navbar.awk contains code for generating navigation bars.
gemini.awk adds navigation bars to gemtext.
sitemap_gmi.awk and sitemap_html.awk process all of the gemtext files and create a sitemap.
feed.awk creates ATOM feeds from git-history, which git-log must pass in a specific format. It's sloppy, but I don't know any other method for now.

View File

@ -1,5 +1,5 @@
# On Personal Websites
You are currently on my personal website. I want to talk about some of the reasons for building it. The main purpose of this website for me is having fun; designing, writing, and structuring are enjoyable. But there are other reasons too. Others could learn from my experiences; feedback . Of course, there are many reasons to build a website: personal branding, restoring the Old web, learning about the web stack, or having fun like me.
The main purpose of this website for me is having fun; designing, writing, and structuring are enjoyable. But there are other reasons too. my experiences are pressented for others to learn, I could recieve feedback. Of course, there are many reasons to build a website: personal branding, restoring the Old web, learning about the web stack, or having fun like me.
## Related
=> awk-make-sh.gmi One way to build a website, I guess

View File

@ -1,7 +0,0 @@
# Beginner tips for Oolite
These tips are based on experience.
* Keep your cargo hold full, before buying any extensions to your ship, to make more money faster.
* Buy the Witch Fuel Injectors first, to go faster, and get out of masslock quicker.
* Buy the Advanced Space Compass when you can, so you can find stations quicker.
* Replace your Pulse Laser with Beam Laser if you are serious at combat.
* When trading, look for Poor Agricultural with a Rich Industrial nearby. Buy Fur from the Poor Agricultural, and Computers from the Rich Industral. This makes a lot of money, because the Poor Agricultural wants finished goods (i.e Computers), and the Rich Industrial wants raw materials (i.e Fur).

View File

@ -1,6 +1,6 @@
# On software freedom
I advocate for software free to use, modify, and distribute for any purpose. I'll demonstrate my point using practical examples.
I advocate for software used, modified, and distributed for any purpose.
Firstly, there is NewPipe, an alternative YouTube app available on FDroid. It saves battery, downloads videos to any path, displays videos even with the screen is off, has dark mode for OLED, and supports PeerTube. NewPipe is functionally superior to the official YouTube app, since it's designed by the users, for the users - who contribute to it too.
For example, NewPipe, an alternative YouTube app available on FDroid saves battery, downloads videos to any path, displays videos even with the screen is off, has dark mode for OLED, and supports PeerTube. NewPipe is functionally superior to the official YouTube app, since it's designed by the users, for the users - who contribute to it too.
People forked Newpipe and added features such as a dislike counter on videos (powered by Return Youtube Dislike), SponsorBlock support, and so on. This project is NewPipexSponsorBlock.

View File

@ -1,11 +1,11 @@
# Useful Addons For Palemoon
This is a list of addons I use with Pale Moon:
* eMatrix displays network requests in table-format with websites as rows and resource types as columns, and blocks the specified requests.
* URL Rewriter rewrites URLS.
* Stylem applies user-specified custom stylesheets, often to make websites look nicer, less bloated, or something else.
* Vimperator adds a VIM-like interface to the browser. However, since it was written for XUL Firefox, it's builtin help breaks on Pale Moon
* Classic Add-ons Archive contains Firefox addons made before Firefox switched from XUL to WebExtensions.
* eMatrix blocks network resources unwanted by the user. It displays network resources in a grid, with rows being websites, and columns being resource types.
* URL Rewriter rewrites user-defined rewriting rules to URLs.
* Stylem applies user-defined custom stylesheets, often to make websites look nicer, or less bloated.
* Vimperator adds a VIM-like interface to XUL-based browsers. Unfortunately, since it was written for Firefox, it's builtin help breaks on Pale Moon.
* Classic Add-ons Archive contains Firefox addons made before Firefox switched from XUL.
* HTTPS Always combined with HTTPS Inquirer redirects websites from HTTP to HTTPS when possible.
* Decentraleyes downloads CDN content locally and injects them into webpages that use CDNs.
* Secret Agent shuffles properties of your HTTP(s) requests creating a unique fingerprint on each visit. Being less unique stifles the use of addons, adds burden, and generally is an inferior approach.
* Proxy Privacy Ruler applies your selected proxy only on URLs that match defined patterns.
* Secret Agent shuffles properties of your HTTP(s) requests to create a unique and different fingerprint on each visit, hampering tracking, unlike the approach of blending in.
* Proxy Privacy Ruler applies your selected proxy only to websites that match user-defined patterns.

View File

@ -1,9 +1,9 @@
# Great Software
execline is a non-interactive scripting language that uses chain loading, where one program executes another program after ending. Since scripting glues programs instead of creating them, execlineb lacks functions, variables, and globbing.
execline is a non-interactive scripting language that uses chain loading, where one program executes another program after ending. Since scripting glues programs instead of creating them, execlineb lacks functions.
Password Store, or pass, is a local password manager that stores your passwords at ~/.password-store, and optionally uses git to make accidents reversable. Passwords stored using it are easily manipulated using core utilities.
Password Store, or pass, is a password manager that stores your passwords locally at ~/.password-store, and optionally uses git for reversing accidents. Core utilities easily manipulate passwords stored using pass.
AWK is a programming language for processing text files. AWK Scripts are easy to write, and AWK is optimized specifically for it's purpose.
AWK is a programming language for processing text files. AWK Scripts are easy and quick to write.
Vis is a modal text editor; think of it as if you are giving commands to edit text files. Macros repeat commands again and again.