diff --git a/.gitignore b/.gitignore index 3f0b6a8..04b1681 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ build *.html *.pdf -res/badges build.ninja .ninja_log .ninja_deps diff --git a/config.py b/config.py index 049383e..b603c4b 100644 --- a/config.py +++ b/config.py @@ -1,9 +1,9 @@ -import os.path +import os gen = """ rule regen - command = python config.py - generator = 1 + command = python config.py + generator = 1 rule typst depfile = $out.d @@ -19,10 +19,17 @@ rule curl command = curl $url > $out rule cp - command = cp $in $out + command = cp $flags $in $out + +rule cpdir + command = rm -rf $out && cp -rf $in $outdir rule runclean - command = ninja -t clean && rm -rf build + command = rm -rf build && ninja -t clean + +rule ttf2woff + command = fonttools ttLib.woff2 compress $in -o $out + build build/badges.txt: badges_list common.typ @@ -37,8 +44,11 @@ pages = [ "index.typ", "compiler-pattern-matching.typ", "article-favicon.typ", + "article-gpu-arch-1.typ", ] +fonts = [x for x in os.listdir("./res/fonts/")] + variants = [ { "suffix": ".min.pdf", @@ -82,22 +92,43 @@ if os.path.isfile("build/badges.txt"): badge = badge.split("\t") user = badge[0] url = badge[1] - tg = "res/badges/" + user + tg = "build/res/badges/" + user web_targets.append(tg) gen += "\n" gen += "build "+tg+": " if user == "alex": - gen += "cp res/badge.png\n" + gen += "cp res/badge.png | build/res/_.txt\n" else: - gen += "curl\n" + gen += "curl | build/res/_.txt\n" gen += " url = "+url+"\n" +for font in fonts: + font = font.replace(".ttf", "") + tg = f"build/res/{font}.woff2" + web_targets.append(tg) + gen += "\n" + gen += f"build {tg} : ttf2woff res/fonts/{font}.ttf | build/res/_.txt\n" + gen += "\n" gen += "build build/index.html : cp build/index.typ.desktop.html\n" web_targets.append("build/index.html") -gen += "\n" -gen += "default " + " ".join(web_targets) + "\n" +gen += """ +build build/res/_.txt : cpdir res | res/_.txt + outdir = build +""" +web_targets.append("build/res/_.txt") + +gen += """ +build web: phony """+ " ".join(web_targets) +""" + +rule pub_cmd + command = rsync -avz build root@195.26.251.204:/srv/http/alex + pool = console +build pub: pub_cmd | web + +default web +""" with open("build.ninja", "w") as f: f.write(gen) diff --git a/pages/article-gpu-arch-1.typ b/pages/article-gpu-arch-1.typ new file mode 100644 index 0000000..c17b181 --- /dev/null +++ b/pages/article-gpu-arch-1.typ @@ -0,0 +1,30 @@ +#import "../common.typ": * +#import "../simple-page-layout.typ": * +#import "../core-page-style.typ": * +#import "../components/header.typ": rev-and-authors + +#simple-page( + gen-table-of-contents: true, + [GPU architecture: SIMD - Alexander Nutz] +)[ + +#section[ + #title[GPU Architecture: Compute Cores] + + #sized-p(small-font-size)[ + #rev-and-authors((people.alex,)) + ] +] + +#if is-web {section[ + Note that the #gen-min-pdf-link[PDF Version] of this page might look a bit better styling wise. +]} + +#section[ + = Introduction + GPUs consists of multiple (commonly 64) compute units. + +] + + +] diff --git a/pub.sh b/pub.sh deleted file mode 100755 index 962ba7e..0000000 --- a/pub.sh +++ /dev/null @@ -1,5 +0,0 @@ -set -e -ninja -#scp -r build/* root@195.26.251.204:/srv/http/alex -rsync -avz build root@195.26.251.204:/srv/http/alex -#scp -r res/* root@195.26.251.204:/srv/http/alex/res diff --git a/res/_.txt b/res/_.txt new file mode 100644 index 0000000..e69de29 diff --git a/res/badge_sum_alex b/res/badge_sum_alex deleted file mode 100644 index ed442b2..0000000 --- a/res/badge_sum_alex +++ /dev/null @@ -1 +0,0 @@ -f256bdf8d1d8100be843a5f76ccfb5f0cb7315f98d075ae583b29916740e58ab res/badges/alex diff --git a/res/badge_sum_ote b/res/badge_sum_ote deleted file mode 100644 index ff7468b..0000000 --- a/res/badge_sum_ote +++ /dev/null @@ -1 +0,0 @@ -9aecefadc2369798121567c27b4599cb92dd8bd56d926f1544c3ddd860762605 res/badges/ote diff --git a/res/badge_sum_syn b/res/badge_sum_syn deleted file mode 100644 index 5b944a3..0000000 --- a/res/badge_sum_syn +++ /dev/null @@ -1 +0,0 @@ -90a0093089d2ae940639aca8ca4dd86f0b7a20fd5b12adb313480b8b1868bc2b res/badges/syn diff --git a/res/fonts/DejaVuMathTeXGyre.ttf b/res/fonts/DejaVuMathTeXGyre.ttf new file mode 100644 index 0000000..8a24f06 Binary files /dev/null and b/res/fonts/DejaVuMathTeXGyre.ttf differ diff --git a/res/fonts/DejaVuSans-Bold.ttf b/res/fonts/DejaVuSans-Bold.ttf new file mode 100644 index 0000000..6d65fa7 Binary files /dev/null and b/res/fonts/DejaVuSans-Bold.ttf differ diff --git a/res/fonts/DejaVuSans-BoldOblique.ttf b/res/fonts/DejaVuSans-BoldOblique.ttf new file mode 100644 index 0000000..753f2d8 Binary files /dev/null and b/res/fonts/DejaVuSans-BoldOblique.ttf differ diff --git a/res/fonts/DejaVuSans-ExtraLight.ttf b/res/fonts/DejaVuSans-ExtraLight.ttf new file mode 100644 index 0000000..b09f32d Binary files /dev/null and b/res/fonts/DejaVuSans-ExtraLight.ttf differ diff --git a/res/fonts/DejaVuSans-Oblique.ttf b/res/fonts/DejaVuSans-Oblique.ttf new file mode 100644 index 0000000..999bac7 Binary files /dev/null and b/res/fonts/DejaVuSans-Oblique.ttf differ diff --git a/res/fonts/DejaVuSans.ttf b/res/fonts/DejaVuSans.ttf new file mode 100644 index 0000000..e5f7eec Binary files /dev/null and b/res/fonts/DejaVuSans.ttf differ diff --git a/res/fonts/DejaVuSansMono-Bold.ttf b/res/fonts/DejaVuSansMono-Bold.ttf new file mode 100644 index 0000000..8184ced Binary files /dev/null and b/res/fonts/DejaVuSansMono-Bold.ttf differ diff --git a/res/fonts/DejaVuSansMono-BoldOblique.ttf b/res/fonts/DejaVuSansMono-BoldOblique.ttf new file mode 100644 index 0000000..754dca7 Binary files /dev/null and b/res/fonts/DejaVuSansMono-BoldOblique.ttf differ diff --git a/res/fonts/DejaVuSansMono-Oblique.ttf b/res/fonts/DejaVuSansMono-Oblique.ttf new file mode 100644 index 0000000..4c858d4 Binary files /dev/null and b/res/fonts/DejaVuSansMono-Oblique.ttf differ diff --git a/res/fonts/DejaVuSansMono.ttf b/res/fonts/DejaVuSansMono.ttf new file mode 100644 index 0000000..f578602 Binary files /dev/null and b/res/fonts/DejaVuSansMono.ttf differ diff --git a/res/fonts/DejaVuSerif-Bold.ttf b/res/fonts/DejaVuSerif-Bold.ttf new file mode 100644 index 0000000..3bb755f Binary files /dev/null and b/res/fonts/DejaVuSerif-Bold.ttf differ diff --git a/res/fonts/DejaVuSerif-BoldItalic.ttf b/res/fonts/DejaVuSerif-BoldItalic.ttf new file mode 100644 index 0000000..a36dd4b Binary files /dev/null and b/res/fonts/DejaVuSerif-BoldItalic.ttf differ diff --git a/res/fonts/DejaVuSerif-Italic.ttf b/res/fonts/DejaVuSerif-Italic.ttf new file mode 100644 index 0000000..805daf2 Binary files /dev/null and b/res/fonts/DejaVuSerif-Italic.ttf differ diff --git a/res/fonts/DejaVuSerif.ttf b/res/fonts/DejaVuSerif.ttf new file mode 100644 index 0000000..0b803d2 Binary files /dev/null and b/res/fonts/DejaVuSerif.ttf differ