From 57db51a7c8837d970b5785e1e6ed5e81dbae6f12 Mon Sep 17 00:00:00 2001 From: pommicket Date: Wed, 30 Aug 2023 00:27:16 -0400 Subject: misc nonsense --- .gitignore | 1 + Makefile | 6 ++++++ guide-src/development/index.html | 7 ++++++- guide-src/make.py | 2 +- index.html | 3 ++- pugl.js | 2 +- 6 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index cc42ca3..c647576 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ scratch *~ node_modules guide +public diff --git a/Makefile b/Makefile index 4590fa2..10de838 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,8 @@ +public-target: guide-target + rm -rf public + mkdir public + cp -r guide public + cp index.html style.css pugl.js move.svg x.svg favicon.ico public/ + guide-target: python3 guide-src/make.py diff --git a/guide-src/development/index.html b/guide-src/development/index.html index 717ff6d..c9a75d2 100644 --- a/guide-src/development/index.html +++ b/guide-src/development/index.html @@ -18,10 +18,15 @@ the main files of interest are index.html and pugl.js, the JavaScript for pugl (hopefully it doesn't become too unmanageable to have just one file).

+

+you can run make to generate a public/ directory which has just the files +that should be hosted. +

+

contributing to the guide

the guide is automatically generated from the files in guide-src/ by guide-src/make.py (you can also just run make to generate it), which is a simple script whose main purpose is adding -a sidebar to all of the guide pages. any PNG files are automatically copied from guide-src/ to guide/. +a sidebar to all of the guide pages. any PNG/JPG/SVG files are automatically copied from guide-src/ to guide/. when you add or remove pages from the guide, you'll need to edit guide-src/outline.txt.

diff --git a/guide-src/make.py b/guide-src/make.py index 6f03513..69a0fd1 100644 --- a/guide-src/make.py +++ b/guide-src/make.py @@ -10,7 +10,7 @@ os.makedirs(OUTPUT_DIR, exist_ok=True) try: for f in os.listdir(INPUT_DIR): - if f.endswith('.png'): + if f.endswith('.png') or f.endswith('.svg') or f.endswith('.jpg') or f.endswith('.jpeg'): shutil.copyfile(INPUT_DIR + '/' + f, OUTPUT_DIR + '/' + f) elif not '.' in f: os.makedirs(OUTPUT_DIR + '/' + f, exist_ok=True) diff --git a/index.html b/index.html index be3525b..950d0e7 100644 --- a/index.html +++ b/index.html @@ -77,7 +77,8 @@
error
-

about pugl

+

pugl

+ pommicket's utility for gl shaders

pugl is a tool that lets you create & share shaders without writing any code. diff --git a/pugl.js b/pugl.js index c6b63f8..a45b995 100644 --- a/pugl.js +++ b/pugl.js @@ -2,7 +2,7 @@ /* TODO: -- guide +- multiple creations */ const APP_ID = 'dh3YgVZQdX1Q'; -- cgit v1.2.3