From 87b1664a0e2f12c0792c0ebd8dc450b150a3f24c Mon Sep 17 00:00:00 2001 From: Thomas Walker Lynch Date: Mon, 22 Jun 2026 08:28:36 +0000 Subject: [PATCH] adding build component to developer/authored/RT, renaming project to RT-style --- README.md | 6 +- administrator/document/how-to_release.html | 12 +- administrator/document/setup.js | 4 - administrator/tool/html_to_v31 | 63 +++++++++ .../authored/ExampleGreet.make/Greeter.lib.c | 20 +++ .../authored/ExampleGreet.make/Math.lib.c | 12 ++ .../authored/ExampleGreet.make/hello.CLI.c | 20 +++ .../core/block_visibility_during_layout.js | 0 .../authored/{RT => RT.copy}/core/loader.js | 0 .../authored/{RT => RT.copy}/core/utility.js | 0 .../authored/{RT => RT.copy}/document/RT0 | 0 .../document/style_manual.html | 1 + .../authored/{RT => RT.copy}/element/TOC.js | 0 .../{RT => RT.copy}/element/chapter.js | 0 .../authored/{RT => RT.copy}/element/code.js | 0 .../{RT => RT.copy}/element/constraint.js | 0 .../{RT => RT.copy}/element/crossref.js | 0 .../{RT => RT.copy}/element/endnote.js | 0 .../authored/{RT => RT.copy}/element/math.js | 0 .../{RT => RT.copy}/element/symbol.js | 0 .../authored/{RT => RT.copy}/element/term.js | 0 .../{RT => RT.copy}/element/theme_selector.js | 0 .../authored/{RT => RT.copy}/element/title.js | 0 .../layout/article_tech_ref.js | 0 .../{RT => RT.copy}/layout/memo_State.js | 0 .../{RT => RT.copy}/layout/page_fixed_glow.js | 0 .../layout/paginate_by_element.js | 0 .../{RT => RT.copy}/theme/dark_gold.js | 0 .../authored/{RT => RT.copy}/theme/light.js | 0 .../{RT => RT.copy}/theme/light_gold.js | 0 .../authored/{RT => RT.copy}/tool/to_pdf.py | 0 .../authored/{RT => RT.copy}/tool/to_pdf2.py | 0 developer/document/RT-code-format-Lisp.html | 12 +- developer/document/RT-code-format.html | 12 +- .../document/naming_file-and-directory.html | 12 +- developer/document/setup.js | 4 - .../single-file_C-module-and-namespace.html | 12 +- developer/made/.gitkeep | 0 developer/tool/.gitkeep | 0 developer/tool/build | 123 ++++++++++++++++++ developer/tool/build_component/copy | 17 +++ developer/tool/build_component/make | 15 +++ developer/tool/{ => build_component}/makefile | 8 +- developer/tool/do-all | 24 ---- developer/tool/do_all | 24 ---- developer/tool/make | 114 ---------------- document/.gitkeep | 0 document/RT-semantic-HTML-tags.html | 12 +- document/install_standalone.md | 16 +-- document/introduction_Harmony.html | 16 ++- ...role-and-workflow_product-development.html | 12 +- ...role-and-workflow_product-maintenance.html | 12 +- document/setup.js | 4 - document/style/rt_dark_doc.css | 44 ------- setup | 4 +- shared/document/setup.js | 4 - shared/tool/link-RT | 2 +- shared/tool/setup | 35 ----- shared/tool/version | 2 +- 59 files changed, 371 insertions(+), 307 deletions(-) delete mode 100644 administrator/document/setup.js create mode 100755 administrator/tool/html_to_v31 create mode 100644 developer/authored/ExampleGreet.make/Greeter.lib.c create mode 100644 developer/authored/ExampleGreet.make/Math.lib.c create mode 100644 developer/authored/ExampleGreet.make/hello.CLI.c rename developer/authored/{RT => RT.copy}/core/block_visibility_during_layout.js (100%) rename developer/authored/{RT => RT.copy}/core/loader.js (100%) rename developer/authored/{RT => RT.copy}/core/utility.js (100%) rename developer/authored/{RT => RT.copy}/document/RT0 (100%) rename developer/authored/{RT => RT.copy}/document/style_manual.html (99%) rename developer/authored/{RT => RT.copy}/element/TOC.js (100%) rename developer/authored/{RT => RT.copy}/element/chapter.js (100%) rename developer/authored/{RT => RT.copy}/element/code.js (100%) rename developer/authored/{RT => RT.copy}/element/constraint.js (100%) rename developer/authored/{RT => RT.copy}/element/crossref.js (100%) rename developer/authored/{RT => RT.copy}/element/endnote.js (100%) rename developer/authored/{RT => RT.copy}/element/math.js (100%) rename developer/authored/{RT => RT.copy}/element/symbol.js (100%) rename developer/authored/{RT => RT.copy}/element/term.js (100%) rename developer/authored/{RT => RT.copy}/element/theme_selector.js (100%) rename developer/authored/{RT => RT.copy}/element/title.js (100%) rename developer/authored/{RT => RT.copy}/layout/article_tech_ref.js (100%) rename developer/authored/{RT => RT.copy}/layout/memo_State.js (100%) rename developer/authored/{RT => RT.copy}/layout/page_fixed_glow.js (100%) rename developer/authored/{RT => RT.copy}/layout/paginate_by_element.js (100%) rename developer/authored/{RT => RT.copy}/theme/dark_gold.js (100%) rename developer/authored/{RT => RT.copy}/theme/light.js (100%) rename developer/authored/{RT => RT.copy}/theme/light_gold.js (100%) rename developer/authored/{RT => RT.copy}/tool/to_pdf.py (100%) rename developer/authored/{RT => RT.copy}/tool/to_pdf2.py (100%) delete mode 100644 developer/document/setup.js delete mode 100644 developer/made/.gitkeep delete mode 100644 developer/tool/.gitkeep create mode 100755 developer/tool/build create mode 100755 developer/tool/build_component/copy create mode 100755 developer/tool/build_component/make rename developer/tool/{ => build_component}/makefile (89%) delete mode 100755 developer/tool/do-all delete mode 100755 developer/tool/do_all delete mode 100755 developer/tool/make delete mode 100644 document/.gitkeep delete mode 100644 document/setup.js delete mode 100644 document/style/rt_dark_doc.css delete mode 100644 shared/document/setup.js diff --git a/README.md b/README.md index 07a4dcd..d899fee 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# RT-style-JS_public +# RT-style A JavaScript based layout, themes, and semantic elements for HTML documents. Used for documents on RT projects. @@ -77,7 +77,7 @@ With the bootstrap script in place alongside the HTML file, the document authori

Introduction

- This is a demonstration of the RT-style-JS_public engine in action. + This is a demonstration of the RT-style engine in action.

@@ -89,7 +89,7 @@ With the bootstrap script in place alongside the HTML file, the document authori If the project utilizes the **Harmony** skeleton, these paths map directly to standard locations: * `` is `shared/`. -* `` is `shared/third_party/RT-style-JS_public`. +* `` is `shared/third_party/RT-style`. * The `setup.js` script is placed in the role-specific document folder (e.g., `administrator/document/setup.js`). * `` is `../../` (stepping up out of `document/` and `administrator/` back to the root). diff --git a/administrator/document/how-to_release.html b/administrator/document/how-to_release.html index 888d414..e2e8a60 100644 --- a/administrator/document/how-to_release.html +++ b/administrator/document/how-to_release.html @@ -3,10 +3,16 @@ Release howto - + diff --git a/administrator/document/setup.js b/administrator/document/setup.js deleted file mode 100644 index de1173d..0000000 --- a/administrator/document/setup.js +++ /dev/null @@ -1,4 +0,0 @@ -window.RT_REPO_ROOT = "../../"; -document.write(''); -document.write(''); -document.write(''); diff --git a/administrator/tool/html_to_v31 b/administrator/tool/html_to_v31 new file mode 100755 index 0000000..b1aba38 --- /dev/null +++ b/administrator/tool/html_to_v31 @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# -*- mode: python; coding: utf-8; python-indent-offset: 2; indent-tabs-mode: nil -*- +""" +html_update_to_3-1 + +Replaces specific StyleRT script blocks with RT 3.1 loader blocks using +literal string replacement. +""" + +import sys ,os + +OLD_BLOCK = \ +""" + """ + +NEW_BLOCK = \ +""" + """ + +def process_file(file_path: str) -> None: + try: + with open(file_path ,"r" ,encoding="utf-8") as f: + content = f.read() + except Exception as e: + print(f"Error reading {file_path}: {e}" ,file=sys.stderr) + return + + # Normalize line endings to ensure a match across environments + normalized_content = content.replace("\r\n" ,"\n") + normalized_old = OLD_BLOCK.replace("\r\n" ,"\n") + + if( normalized_old in normalized_content ): + new_content = normalized_content.replace(normalized_old ,NEW_BLOCK) + with open(file_path ,"w" ,encoding="utf-8") as f: + f.write(new_content) + print(f"Updated: {file_path}") + else: + print(f"Target lines not found in: {file_path}") + +def CLI() -> None: + args = sys.argv[1:] + + if( not args or "-h" in args or "--help" in args ): + print("Usage: html_update_to_3-1 ") + sys.exit(0) + + for TM_f in args: + process_file(TM_f) + +if __name__ == "__main__": + CLI() diff --git a/developer/authored/ExampleGreet.make/Greeter.lib.c b/developer/authored/ExampleGreet.make/Greeter.lib.c new file mode 100644 index 0000000..1d23879 --- /dev/null +++ b/developer/authored/ExampleGreet.make/Greeter.lib.c @@ -0,0 +1,20 @@ +#ifndef ExampleGreet·Greeter·ONCE +#define ExampleGreet·Greeter·ONCE + +#include "Math.lib.c" + +void ExampleGreet·Greeter·hello_loop(int count); + +#ifdef ExampleGreet·Greeter + #include + + void ExampleGreet·Greeter·hello_loop(int count){ + for(int TM = 0; TM < count; ++TM){ + int current_count = ExampleGreet·Math·add(TM ,1); + printf("Hello iteration: %d\n" ,current_count); + } + } + +#endif // ExampleGreet·Greeter + +#endif // ExampleGreet·Greeter·ONCE diff --git a/developer/authored/ExampleGreet.make/Math.lib.c b/developer/authored/ExampleGreet.make/Math.lib.c new file mode 100644 index 0000000..6f1880e --- /dev/null +++ b/developer/authored/ExampleGreet.make/Math.lib.c @@ -0,0 +1,12 @@ +#ifndef ExampleGreet·Math·ONCE +#define ExampleGreet·Math·ONCE + +int ExampleGreet·Math·add(int a ,int b); + +#ifdef ExampleGreet·Math + int ExampleGreet·Math·add(int a ,int b){ + return a + b; + } +#endif // ExampleGreet·Math + +#endif // ExampleGreet·Math·ONCE diff --git a/developer/authored/ExampleGreet.make/hello.CLI.c b/developer/authored/ExampleGreet.make/hello.CLI.c new file mode 100644 index 0000000..684e2a7 --- /dev/null +++ b/developer/authored/ExampleGreet.make/hello.CLI.c @@ -0,0 +1,20 @@ +#include +#include + +#include "Math.lib.c" +#include "Greeter.lib.c" + +void CLI(void){ + int base_count = ExampleGreet·Math·add(1 ,2); + printf("Calculated base loop count: %d\n" ,base_count); + ExampleGreet·Greeter·hello_loop(base_count); +} + +int main(int argc ,char **argv){ + (void)argc; + (void)argv; + + CLI(); + + return EXIT_SUCCESS; +} diff --git a/developer/authored/RT/core/block_visibility_during_layout.js b/developer/authored/RT.copy/core/block_visibility_during_layout.js similarity index 100% rename from developer/authored/RT/core/block_visibility_during_layout.js rename to developer/authored/RT.copy/core/block_visibility_during_layout.js diff --git a/developer/authored/RT/core/loader.js b/developer/authored/RT.copy/core/loader.js similarity index 100% rename from developer/authored/RT/core/loader.js rename to developer/authored/RT.copy/core/loader.js diff --git a/developer/authored/RT/core/utility.js b/developer/authored/RT.copy/core/utility.js similarity index 100% rename from developer/authored/RT/core/utility.js rename to developer/authored/RT.copy/core/utility.js diff --git a/developer/authored/RT/document/RT0 b/developer/authored/RT.copy/document/RT0 similarity index 100% rename from developer/authored/RT/document/RT0 rename to developer/authored/RT.copy/document/RT0 diff --git a/developer/authored/RT/document/style_manual.html b/developer/authored/RT.copy/document/style_manual.html similarity index 99% rename from developer/authored/RT/document/style_manual.html rename to developer/authored/RT.copy/document/style_manual.html index 61e0d74..3ceb591 100644 --- a/developer/authored/RT/document/style_manual.html +++ b/developer/authored/RT.copy/document/style_manual.html @@ -15,6 +15,7 @@ window.RT.load('theme'); window.RT.load('layout/article_tech_ref'); + diff --git a/developer/authored/RT/element/TOC.js b/developer/authored/RT.copy/element/TOC.js similarity index 100% rename from developer/authored/RT/element/TOC.js rename to developer/authored/RT.copy/element/TOC.js diff --git a/developer/authored/RT/element/chapter.js b/developer/authored/RT.copy/element/chapter.js similarity index 100% rename from developer/authored/RT/element/chapter.js rename to developer/authored/RT.copy/element/chapter.js diff --git a/developer/authored/RT/element/code.js b/developer/authored/RT.copy/element/code.js similarity index 100% rename from developer/authored/RT/element/code.js rename to developer/authored/RT.copy/element/code.js diff --git a/developer/authored/RT/element/constraint.js b/developer/authored/RT.copy/element/constraint.js similarity index 100% rename from developer/authored/RT/element/constraint.js rename to developer/authored/RT.copy/element/constraint.js diff --git a/developer/authored/RT/element/crossref.js b/developer/authored/RT.copy/element/crossref.js similarity index 100% rename from developer/authored/RT/element/crossref.js rename to developer/authored/RT.copy/element/crossref.js diff --git a/developer/authored/RT/element/endnote.js b/developer/authored/RT.copy/element/endnote.js similarity index 100% rename from developer/authored/RT/element/endnote.js rename to developer/authored/RT.copy/element/endnote.js diff --git a/developer/authored/RT/element/math.js b/developer/authored/RT.copy/element/math.js similarity index 100% rename from developer/authored/RT/element/math.js rename to developer/authored/RT.copy/element/math.js diff --git a/developer/authored/RT/element/symbol.js b/developer/authored/RT.copy/element/symbol.js similarity index 100% rename from developer/authored/RT/element/symbol.js rename to developer/authored/RT.copy/element/symbol.js diff --git a/developer/authored/RT/element/term.js b/developer/authored/RT.copy/element/term.js similarity index 100% rename from developer/authored/RT/element/term.js rename to developer/authored/RT.copy/element/term.js diff --git a/developer/authored/RT/element/theme_selector.js b/developer/authored/RT.copy/element/theme_selector.js similarity index 100% rename from developer/authored/RT/element/theme_selector.js rename to developer/authored/RT.copy/element/theme_selector.js diff --git a/developer/authored/RT/element/title.js b/developer/authored/RT.copy/element/title.js similarity index 100% rename from developer/authored/RT/element/title.js rename to developer/authored/RT.copy/element/title.js diff --git a/developer/authored/RT/layout/article_tech_ref.js b/developer/authored/RT.copy/layout/article_tech_ref.js similarity index 100% rename from developer/authored/RT/layout/article_tech_ref.js rename to developer/authored/RT.copy/layout/article_tech_ref.js diff --git a/developer/authored/RT/layout/memo_State.js b/developer/authored/RT.copy/layout/memo_State.js similarity index 100% rename from developer/authored/RT/layout/memo_State.js rename to developer/authored/RT.copy/layout/memo_State.js diff --git a/developer/authored/RT/layout/page_fixed_glow.js b/developer/authored/RT.copy/layout/page_fixed_glow.js similarity index 100% rename from developer/authored/RT/layout/page_fixed_glow.js rename to developer/authored/RT.copy/layout/page_fixed_glow.js diff --git a/developer/authored/RT/layout/paginate_by_element.js b/developer/authored/RT.copy/layout/paginate_by_element.js similarity index 100% rename from developer/authored/RT/layout/paginate_by_element.js rename to developer/authored/RT.copy/layout/paginate_by_element.js diff --git a/developer/authored/RT/theme/dark_gold.js b/developer/authored/RT.copy/theme/dark_gold.js similarity index 100% rename from developer/authored/RT/theme/dark_gold.js rename to developer/authored/RT.copy/theme/dark_gold.js diff --git a/developer/authored/RT/theme/light.js b/developer/authored/RT.copy/theme/light.js similarity index 100% rename from developer/authored/RT/theme/light.js rename to developer/authored/RT.copy/theme/light.js diff --git a/developer/authored/RT/theme/light_gold.js b/developer/authored/RT.copy/theme/light_gold.js similarity index 100% rename from developer/authored/RT/theme/light_gold.js rename to developer/authored/RT.copy/theme/light_gold.js diff --git a/developer/authored/RT/tool/to_pdf.py b/developer/authored/RT.copy/tool/to_pdf.py similarity index 100% rename from developer/authored/RT/tool/to_pdf.py rename to developer/authored/RT.copy/tool/to_pdf.py diff --git a/developer/authored/RT/tool/to_pdf2.py b/developer/authored/RT.copy/tool/to_pdf2.py similarity index 100% rename from developer/authored/RT/tool/to_pdf2.py rename to developer/authored/RT.copy/tool/to_pdf2.py diff --git a/developer/document/RT-code-format-Lisp.html b/developer/document/RT-code-format-Lisp.html index edbed6b..888e5fe 100644 --- a/developer/document/RT-code-format-Lisp.html +++ b/developer/document/RT-code-format-Lisp.html @@ -3,10 +3,16 @@ RT Code Format: Lisp Addendum - + diff --git a/developer/document/RT-code-format.html b/developer/document/RT-code-format.html index 8260a9f..e4924fa 100644 --- a/developer/document/RT-code-format.html +++ b/developer/document/RT-code-format.html @@ -3,10 +3,16 @@ RT code format conventions - + diff --git a/developer/document/naming_file-and-directory.html b/developer/document/naming_file-and-directory.html index c4bd65c..7fb7619 100644 --- a/developer/document/naming_file-and-directory.html +++ b/developer/document/naming_file-and-directory.html @@ -3,10 +3,16 @@ File and directory naming conventions - + diff --git a/developer/document/setup.js b/developer/document/setup.js deleted file mode 100644 index 77ec522..0000000 --- a/developer/document/setup.js +++ /dev/null @@ -1,4 +0,0 @@ -window.RT_REPO_ROOT = "../../"; -document.write(''); -document.write(''); -document.write(''); diff --git a/developer/document/single-file_C-module-and-namespace.html b/developer/document/single-file_C-module-and-namespace.html index 23af5f8..930f028 100644 --- a/developer/document/single-file_C-module-and-namespace.html +++ b/developer/document/single-file_C-module-and-namespace.html @@ -3,10 +3,16 @@ C modules, namespaces, and the build lifecycle - + diff --git a/developer/made/.gitkeep b/developer/made/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/developer/tool/.gitkeep b/developer/tool/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/developer/tool/build b/developer/tool/build new file mode 100755 index 0000000..547fc4c --- /dev/null +++ b/developer/tool/build @@ -0,0 +1,123 @@ +#!/usr/bin/env python3 +# -*- mode: python; coding: utf-8; python-indent-offset: 2; indent-tabs-mode: nil -*- +""" +developer/tool/build - Build Orchestrator Wrapper + +This script acts as the primary entry point for staging the project. +It parses colon-separated arguments mapping specific namespaces to their +intended build arguments. + +It enforces the structural convention where authored directories must +be named .. The script delegates execution to +developer/tool/build_component/. +""" + +import sys, os, subprocess, fnmatch +from typing import Dict, Tuple + +def check_environment() -> None: + setup_must_be = "developer/tool/setup" + current_setup = os.environ.get("SETUP", "") + if current_setup != setup_must_be: + print(f"developer/tool/build:: error: must be run in the {setup_must_be} environment", file=sys.stderr) + sys.exit(1) + +def get_namespaces() -> Dict[str, Tuple[str, str]]: + authored_dir = os.path.join(os.environ.get("REPO_HOME", "."), "developer", "authored") + if not os.path.isdir(authored_dir): + return {} + + namespaces = {} + for TM_item in os.listdir(authored_dir): + path = os.path.join(authored_dir, TM_item) + if os.path.isdir(path) and not TM_item.startswith("."): + parts = TM_item.rsplit(".", 1) + if len(parts) == 2: + ns = parts[0] + tool = parts[1] + namespaces[ns] = (tool, TM_item) + else: + print(f"(warning) Ignoring '{TM_item}': directory lacks the required . suffix.", file=sys.stderr) + + return dict(sorted(namespaces.items())) + +def print_usage(namespaces: Dict[str, Tuple[str, str]]) -> None: + print("Usage: build [[:]*]*\n") + print("Arguments are passed directly to the component specified by the directory suffix.\n") + + print("Available namespaces:") + if namespaces: + for TM_ns, (TM_tool, TM_raw_dir) in namespaces.items(): + print(f" {TM_ns:<20} (Component: {TM_tool}, Dir: {TM_raw_dir})") + else: + print(" (No conforming namespaces currently found in authored/)") + + print("\nExamples:") + print(" build (Displays this usage message)") + print(" build ExampleGreet (Executes 'all' via its assigned component)") + print(" build Ex*:library RT:all:information (Batch execution with pattern matching)") + print(" build \"*:clean\" (Cleans all namespaces. Quotes prevent Bash expansion)") + +def run_build(argument: str, namespace: str, tool: str, raw_dir: str) -> None: + tool_path = os.path.join("tool", "build_component", tool) + + if not os.path.isfile(tool_path) or not os.access(tool_path, os.X_OK): + print(f"error: Build component '{tool}' for namespace '{namespace}' is missing or not executable at {tool_path}", file=sys.stderr) + sys.exit(1) + + env = os.environ.copy() + env["NAMESPACE"] = namespace + env["NAMESPACE_DIR"] = raw_dir + + tool_cmd = [tool_path, argument] + + try: + subprocess.run(tool_cmd, env=env, check=True) + except subprocess.CalledProcessError as e: + print(f"Build component '{tool}' failed for namespace '{namespace}' with exit code {e.returncode}", file=sys.stderr) + sys.exit(e.returncode) + +def CLI() -> None: + check_environment() + + repo_home = os.environ.get("REPO_HOME", ".") + dev_dir = os.path.join(repo_home, "developer") + os.chdir(dev_dir) + + args = sys.argv[1:] + namespaces = get_namespaces() + + if not args or args[0] in ["usage", "help", "-h", "--help"]: + print_usage(namespaces) + sys.exit(0) + + matched_any = False + ns_keys = list(namespaces.keys()) + + for TM_arg in args: + parts = TM_arg.split(":") + pattern = parts[0] + arguments = parts[1:] + + if not arguments: + arguments = ["all"] + + matches = fnmatch.filter(ns_keys, pattern) + + if not matches: + print(f"(warning) Pattern '{pattern}' matched no namespaces.", file=sys.stderr) + continue + + matched_any = True + for TM_ns in matches: + tool, raw_dir = namespaces[TM_ns] + for TM_argument in arguments: + run_build(TM_argument, TM_ns, tool, raw_dir) + + if not matched_any: + sys.exit(1) + + print("build done.") + +if __name__ == "__main__": + CLI() diff --git a/developer/tool/build_component/copy b/developer/tool/build_component/copy new file mode 100755 index 0000000..f4bbd5a --- /dev/null +++ b/developer/tool/build_component/copy @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# developer/tool/copy + +set -euo pipefail +CMD="${1:-all}" + +if [ "$CMD" = "clean" ]; then + rm -rf "scratchpad/made/$NAMESPACE" + echo "copy: Cleaned scratchpad/made/$NAMESPACE" +elif [ "$CMD" = "all" ]; then + mkdir -p "scratchpad/made" + cp -au "authored/$NAMESPACE_DIR" "scratchpad/made/$NAMESPACE" + echo "copy: Staged $NAMESPACE_DIR -> scratchpad/made/$NAMESPACE" +else + echo "copy: Unrecognized command '$CMD'" + exit 1 +fi diff --git a/developer/tool/build_component/make b/developer/tool/build_component/make new file mode 100755 index 0000000..30fb82d --- /dev/null +++ b/developer/tool/build_component/make @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# developer/tool/build_component/make + +set -euo pipefail +CMD="${1:-all}" + +# The GNU Make orchestrator expects C_SOURCE_DIR to point to the raw directory +export C_SOURCE_DIR="authored/$NAMESPACE_DIR" +export KMOD_SOURCE_DIR="authored/$NAMESPACE_DIR" + +# Isolate build products into their specific namespace directory +export LIBRARY_DIR="scratchpad/made/$NAMESPACE" +export MACHINE_DIR="scratchpad/made/$NAMESPACE" + +/bin/make -f tool/build_component/makefile "$CMD" diff --git a/developer/tool/makefile b/developer/tool/build_component/makefile similarity index 89% rename from developer/tool/makefile rename to developer/tool/build_component/makefile index 070c6ca..7914c0b 100644 --- a/developer/tool/makefile +++ b/developer/tool/build_component/makefile @@ -1,15 +1,9 @@ -# developer/tool/makefile - Orchestrator (Hybrid) +# developer/tool/build_component/makefile .SUFFIXES: .EXPORT_ALL_VARIABLES: RT_MAKEFILE_DP := $(REPO_HOME)/shared/tool/makefile -# If a namespace is provided, update the source directory -ifneq ($(NAMESPACE),) - C_SOURCE_DIR := authored/$(NAMESPACE) - export C_SOURCE_DIR -endif - .PHONY: usage usage: @printf "Usage: make [usage|version|information|all|lib|CLI|kmod|clean]\n" diff --git a/developer/tool/do-all b/developer/tool/do-all deleted file mode 100755 index 2350fd8..0000000 --- a/developer/tool/do-all +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash -script_afp=$(realpath "${BASH_SOURCE[0]}") - -# input guards - - setup_must_be="developer/tool/setup" - if [ "$SETUP" != "$setup_must_be" ]; then - echo "$(script_fp):: error: must be run in the $setup_must_be environment" - exit 1 - fi - -set -e -set -x - - cd "$REPO_HOME"/developer || exit 1 - # /bin/make -f tool/makefile $@ - - scratchpad clear - make - release clean - release write - -set +x -echo "$(script_fn) done." diff --git a/developer/tool/do_all b/developer/tool/do_all deleted file mode 100755 index 2350fd8..0000000 --- a/developer/tool/do_all +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash -script_afp=$(realpath "${BASH_SOURCE[0]}") - -# input guards - - setup_must_be="developer/tool/setup" - if [ "$SETUP" != "$setup_must_be" ]; then - echo "$(script_fp):: error: must be run in the $setup_must_be environment" - exit 1 - fi - -set -e -set -x - - cd "$REPO_HOME"/developer || exit 1 - # /bin/make -f tool/makefile $@ - - scratchpad clear - make - release clean - release write - -set +x -echo "$(script_fn) done." diff --git a/developer/tool/make b/developer/tool/make deleted file mode 100755 index b7e181b..0000000 --- a/developer/tool/make +++ /dev/null @@ -1,114 +0,0 @@ -#!/usr/bin/env python3 -# -*- mode: python; coding: utf-8; python-indent-offset: 2; indent-tabs-mode: nil -*- -""" -developer/tool/make - Build Orchestrator Wrapper - -This script acts as the primary entry point for compiling the project. -It parses colon-separated arguments mapping specific namespace patterns -(including file globs) to their intended build commands. - -A program developer can modify this script to add custom pre-build checks, -custom argument parsing, or project-specific routing logic. -""" - -import sys ,os ,subprocess ,fnmatch -from typing import List - -def check_environment() -> None: - setup_must_be = "developer/tool/setup" - current_setup = os.environ.get("SETUP" ,"") - if( current_setup != setup_must_be ): - print(f"developer/tool/make:: error: must be run in the {setup_must_be} environment" ,file=sys.stderr) - sys.exit(1) - -def get_namespaces() -> List[str]: - authored_dir = os.path.join(os.environ.get("REPO_HOME" ,".") ,"developer" ,"authored") - if( not os.path.isdir(authored_dir) ): - return [] - - namespaces = [] - for TM_name in os.listdir(authored_dir): - path = os.path.join(authored_dir ,TM_name) - if( os.path.isdir(path) and not TM_name.startswith(".") ): - namespaces.append(TM_name) - namespaces.sort() - return namespaces - -def print_usage() -> None: - print("Usage: make [[:]*]*\n") - print("Commands:") - print(" all Build library, CLI, and kmod (Default)") - print(" library Build only the library archives") - print(" CLI Build only the CLI executables") - print(" kmod Build kernel modules") - print(" clean Remove build artifacts") - print(" information Display build environment variables\n") - - print("Available namespaces:") - namespaces = get_namespaces() - if( namespaces ): - for TM_ns in namespaces: - print(f" {TM_ns}") - else: - print(" (No namespaces currently found in authored/)") - - print("\nExamples:") - print(" make (Displays this usage message)") - print(" make ExampleGreet (Builds 'all' for ExampleGreet)") - print(" make Ex*:library G*:all:information (Builds 'library' for Ex*, 'all' and 'information' for G*)") - print(" make \"*:clean\" (Cleans all namespaces. Quotes prevent Bash expansion)") - -def run_make(cmd: str ,namespace: str) -> None: - env = os.environ.copy() - env["NAMESPACE"] = namespace - - make_cmd = ["/bin/make" ,"-f" ,"tool/makefile" ,cmd] - - try: - subprocess.run(make_cmd ,env=env ,check=True) - except subprocess.CalledProcessError as e: - print(f"make failed for namespace '{namespace}' with exit code {e.returncode}" ,file=sys.stderr) - sys.exit(e.returncode) - -def CLI() -> None: - check_environment() - - repo_home = os.environ.get("REPO_HOME" ,".") - dev_dir = os.path.join(repo_home ,"developer") - os.chdir(dev_dir) - - args = sys.argv[1:] - - if( not args or args[0] in ["usage" ,"help" ,"-h" ,"--help"] ): - print_usage() - sys.exit(0) - - namespaces = get_namespaces() - matched_any = False - - for TM_arg in args: - parts = TM_arg.split(":") - pattern = parts[0] - commands = parts[1:] - - if( not commands ): - commands = ["all"] - - matches = fnmatch.filter(namespaces ,pattern) - - if( not matches ): - print(f"(warning) Pattern '{pattern}' matched no namespaces." ,file=sys.stderr) - continue - - matched_any = True - for TM_ns in matches: - for TM_cmd in commands: - run_make(TM_cmd ,TM_ns) - - if( not matched_any ): - sys.exit(1) - - print("make done.") - -if __name__ == "__main__": - CLI() diff --git a/document/.gitkeep b/document/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/document/RT-semantic-HTML-tags.html b/document/RT-semantic-HTML-tags.html index defa81a..73d479a 100644 --- a/document/RT-semantic-HTML-tags.html +++ b/document/RT-semantic-HTML-tags.html @@ -3,10 +3,16 @@ RT semantic HTML tags - + diff --git a/document/install_standalone.md b/document/install_standalone.md index 26586b0..95e0ccf 100644 --- a/document/install_standalone.md +++ b/document/install_standalone.md @@ -1,12 +1,12 @@ -The `Harmony` skeletong is setup to use `RT-style-JS_public`, it only requires that the `RT-style-JS_public` be installed to the side, at the same directory level, as the `Harmony` project. +The `Harmony` skeletong is setup to use `RT-style`, it only requires that the `RT-style` be installed to the side, at the same directory level, as the `Harmony` project. -`RT-style-JS_public` can be used with a standalone html document +`RT-style` can be used with a standalone html document 1. cd to the directory with the standalone document -2. install RT-style-JS_public - 1.1 git clone https://github.com/Thomas-Walker-Lynch/RT-style-JS_public.git - 1.2 enter RT-style-JS: +2. install RT-style + 1.1 git clone https://github.com/Thomas-Walker-Lynch/RT-style.git + 1.2 enter RT-style: > bash > . setup developer > make @@ -21,15 +21,15 @@ The `Harmony` skeletong is setup to use `RT-style-JS_public`, it only requires t window.RT_REPO_ROOT = "../"; document.write(''); - document.write(''); - document.write(''); + document.write(''); + document.write(''); -------------------------------------------------------------------------------- dictionary_style-directory.js 2026-05-20T06:49:14Z window.StyleRT_namespaces = { - "RT": "RT-style-JS_public/consumer/release/RT" + "RT": "RT-style/consumer/release/RT" ,"Project": "style" }; diff --git a/document/introduction_Harmony.html b/document/introduction_Harmony.html index 7d35941..b1d89d0 100644 --- a/document/introduction_Harmony.html +++ b/document/introduction_Harmony.html @@ -3,10 +3,16 @@ Introduction to Harmony - + @@ -262,7 +268,7 @@

- Currently, our developers write documents directly in HTML using the RT semantic tags. See the RT-style-JS_public project and the documentation there. A common approach is to copy another document and the setup.js file, then to type over the top of that other document. Only one setup.js file is used per directory. Be sure to edit the relative root path found at the top of setup.js. Plain text, emacs org, and mark down have all been used in prior versions of Harmony. + Currently, our developers write documents directly in HTML using the RT semantic tags. See the RT-style project and the documentation there. A common approach is to copy another document and the setup.js file, then to type over the top of that other document. Only one setup.js file is used per directory. Be sure to edit the relative root path found at the top of setup.js. Plain text, emacs org, and mark down have all been used in prior versions of Harmony.

Untracked directories

@@ -348,7 +354,7 @@ │ ├── made │ ├── dictionary_style-directory.js │ ├── third_party - │ │ ├── RT-style-JS_public -> ../../../RT-style-JS_public/ + │ │ ├── RT-style -> ../../../RT-style/ │ │ └── upstream │ └── tool │ ├── scratchpad diff --git a/document/role-and-workflow_product-development.html b/document/role-and-workflow_product-development.html index 149624b..e3e55d6 100644 --- a/document/role-and-workflow_product-development.html +++ b/document/role-and-workflow_product-development.html @@ -3,10 +3,16 @@ Product development roles and workflow - + diff --git a/document/role-and-workflow_product-maintenance.html b/document/role-and-workflow_product-maintenance.html index 6063077..3a97e1b 100644 --- a/document/role-and-workflow_product-maintenance.html +++ b/document/role-and-workflow_product-maintenance.html @@ -3,10 +3,16 @@ Product maintenance roles and workflow - + diff --git a/document/setup.js b/document/setup.js deleted file mode 100644 index 65d8522..0000000 --- a/document/setup.js +++ /dev/null @@ -1,4 +0,0 @@ -window.RT_REPO_ROOT = "../"; -document.write(''); -document.write(''); -document.write(''); diff --git a/document/style/rt_dark_doc.css b/document/style/rt_dark_doc.css deleted file mode 100644 index bac4fbf..0000000 --- a/document/style/rt_dark_doc.css +++ /dev/null @@ -1,44 +0,0 @@ - - body { - font-family: 'Noto Sans JP', Arial, sans-serif; - background-color: hsl(0, 0%, 0%); - color: hsl(42, 100%, 80%); - padding: 2rem; - } - .page { - padding: 3rem; - margin: 1.25rem auto; - max-width: 46.875rem; - background-color: hsl(0, 0%, 0%); - box-shadow: 0 0 0.625rem hsl(42, 100%, 50%); - } - h1 { - font-size: 1.5rem; - text-align: center; - color: hsl(42, 100%, 84%); - text-transform: uppercase; - margin-top: 1.5rem; - } - h2 { - font-size: 1.25rem; - color: hsl(42, 100%, 84%); - text-align: center; - margin-top: 2rem; - } - h3 { - font-size: 1.125rem; - color: hsl(42, 100%, 75%); - margin-top: 1.5rem; - } - p, li { - color: hsl(42, 100%, 90%); - text-align: justify; - margin-bottom: 1rem; - } - code { - font-family: 'Courier New', Courier, monospace; - background-color: hsl(0, 0%, 25%); - padding: 0.125rem 0.25rem; - color: hsl(42, 100%, 90%); - } - diff --git a/setup b/setup index 7603f3e..a249e2e 100644 --- a/setup +++ b/setup @@ -44,8 +44,10 @@ fi # setup the role # export ROLE="${1}" + export ROLE_HOME="$REPO_HOME/$ROLE" + echo ROLE_HOME "$ROLE_HOME" - tool="${REPO_HOME}/${ROLE}/tool" + tool="${ROLE_HOME}/tool" if [[ ":${PATH}:" != *":${tool}:"* ]]; then export PATH="${tool}:${PATH}" fi diff --git a/shared/document/setup.js b/shared/document/setup.js deleted file mode 100644 index de1173d..0000000 --- a/shared/document/setup.js +++ /dev/null @@ -1,4 +0,0 @@ -window.RT_REPO_ROOT = "../../"; -document.write(''); -document.write(''); -document.write(''); diff --git a/shared/tool/link-RT b/shared/tool/link-RT index 0e15005..dbaccf1 100755 --- a/shared/tool/link-RT +++ b/shared/tool/link-RT @@ -13,7 +13,7 @@ def run(): repo_home = Path(repo_home_env) # Define the canonical target location - target_src = repo_home / 'shared' / 'linked-project' / 'RT-style-JS_public' / 'consumer' / 'release' / 'RT' + target_src = repo_home / 'shared' / 'linked-project' / 'RT-style' / 'consumer' / 'release' / 'RT' # Determine the destination directory if len(sys.argv) > 1: diff --git a/shared/tool/setup b/shared/tool/setup index 6cfc738..76983e7 100644 --- a/shared/tool/setup +++ b/shared/tool/setup @@ -77,41 +77,6 @@ umask 0077 export PATH -#-------------------------------------------------------------------------------- -# used by release scripts -# - install_file() { - if [ "$#" -lt 3 ]; then - echo "env::install_file usage: install_file ... " - return 1 - fi - - perms="${@: -1}" # Last argument is permissions - target_dp="${@: -2:1}" # Second-to-last argument is the target directory - sources=("${@:1:$#-2}") # All other arguments are source files - - if [ ! -d "$target_dp" ]; then - echo "env::install_file no install done: target directory '$target_dp' does not exist." - return 1 - fi - - for source_fp in "${sources[@]}"; do - if [ ! -f "$source_fp" ]; then - echo "env::install_file: source file '$source_fp' does not exist." - return 1 - fi - - target_file="$target_dp/$(basename "$source_fp")" - - if ! install -m "$perms" "$source_fp" "$target_file"; then - echo "env::install_file: Failed to install $(basename "$source_fp") to $target_dp" - return 1 - fi - done - } - - export -f install_file - # -------------------------------------------------------------------------------- # closing # diff --git a/shared/tool/version b/shared/tool/version index 91c6751..0ab04ad 100755 --- a/shared/tool/version +++ b/shared/tool/version @@ -1,4 +1,4 @@ -echo "RT-style-JS_public v3.1 2026-06-20 10:39:27 Z" +echo "RT-style v3.1 2026-06-20 10:39:27 Z" echo "Harmony v3.3 2026-06-21 13:20:18 Z" -- 2.20.1