From d34e3b37280dfd9fe31ed841505a29939984c165 Mon Sep 17 00:00:00 2001 From: Thomas Walker Lynch Date: Tue, 23 Jun 2026 10:53:58 +0000 Subject: [PATCH] docs working --- .../{RT-style.js => RT-Style_locator.js} | 13 ++++- administrator/document/how-to_release.html | 2 +- .../tool/deploy_internal_locators.py | 50 +++++++++++++++++ .../Document/RT-Style_locator.js | 29 ++++++++++ .../Document/style_manual.html | 2 +- .../Manuscript.copy/Locator/URL-only.js | 16 ++++++ .../Manuscript.copy/Locator/direct.js} | 13 ++++- .../Manuscript.copy/Locator/immediate.js | 29 ++++++++++ .../Manuscript.copy/Locator/indirect.js | 54 +++++++++++++++++++ .../document/RT-Style_locator.js | 13 ++++- developer/document/RT-code-format-Lisp.html | 2 +- developer/document/RT-code-format.html | 2 +- .../document/naming_file-and-directory.html | 2 +- .../single-file_C-module-and-namespace.html | 2 +- .../RT-Style_locator.js | 13 ++++- document/RT-style-HTML.html | 2 +- document/introduction_Harmony.html | 2 +- ...role-and-workflow_product-development.html | 2 +- ...role-and-workflow_product-maintenance.html | 2 +- shared/document/RT-Style_locator.js | 37 +++++++++++++ temp.sh | 29 ++++++++++ 21 files changed, 298 insertions(+), 18 deletions(-) rename administrator/document/{RT-style.js => RT-Style_locator.js} (73%) create mode 100644 administrator/tool/deploy_internal_locators.py create mode 100644 developer/authored/Manuscript.copy/Document/RT-Style_locator.js create mode 100644 developer/authored/Manuscript.copy/Locator/URL-only.js rename developer/{document/RT-style.js => authored/Manuscript.copy/Locator/direct.js} (73%) create mode 100644 developer/authored/Manuscript.copy/Locator/immediate.js create mode 100644 developer/authored/Manuscript.copy/Locator/indirect.js rename document/RT-style.js => developer/document/RT-Style_locator.js (73%) rename shared/document/RT-style.js => document/RT-Style_locator.js (73%) create mode 100644 shared/document/RT-Style_locator.js create mode 100755 temp.sh diff --git a/administrator/document/RT-style.js b/administrator/document/RT-Style_locator.js similarity index 73% rename from administrator/document/RT-style.js rename to administrator/document/RT-Style_locator.js index 34cfb22..4ded0e8 100644 --- a/administrator/document/RT-style.js +++ b/administrator/document/RT-Style_locator.js @@ -1,8 +1,17 @@ -// RT-style.js (Internal RT-style project router) +/* + We have four scenarios + + immediate - used in the RT-style distribution itself (authored, consummer, staged) + direct - used in the RT-style project itself, but not in the distribution + indirect - the version all Harmony projects use + URL_only - always pulls style through a URL, a webserver must be present + +*/ + window.RT = window.RT || {}; (function() { - const project_name = "RT-style"; + const project_name = "RT-Style"; const path = window.location.pathname; const project_root_index = path.indexOf('/' + project_name + '/'); diff --git a/administrator/document/how-to_release.html b/administrator/document/how-to_release.html index 3c70557..80da3cc 100644 --- a/administrator/document/how-to_release.html +++ b/administrator/document/how-to_release.html @@ -3,7 +3,7 @@ Release howto - + diff --git a/administrator/tool/deploy_internal_locators.py b/administrator/tool/deploy_internal_locators.py new file mode 100644 index 0000000..90311a7 --- /dev/null +++ b/administrator/tool/deploy_internal_locators.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python3 +import sys +import os +import stat +import shutil +from pathlib import Path + +def deploy_internal_locators(locator_dir_path): + locator_dir = Path(locator_dir_path) + if not locator_dir.is_dir(): + print(f"Error: Locator directory not found at {locator_dir_path}") + sys.exit(1) + + immediate_js = locator_dir / "immediate.js" + direct_js = locator_dir / "direct.js" + + if not immediate_js.exists() or not direct_js.exists(): + print("Error: Source locator files missing in the specified directory.") + sys.exit(1) + + repo_home = Path(os.environ.get("REPO_HOME", ".")) + IGNORED_DIRS = {".git", "scratchpad", "consumer"} + + for root, dirs, files in os.walk(repo_home): + # Prune ignored directories in place to prevent descending into them + dirs[:] = [d for d in dirs if d not in IGNORED_DIRS] + + current_path = Path(root) + if current_path.name.lower() == "document": + target_file = current_path / "RT-Style_locator.js" + + # Evaluate the path to determine the correct structural locator + if "developer/authored/Manuscript" in current_path.as_posix(): + source_file = immediate_js + else: + source_file = direct_js + + # Eliminate permission denial on read-only consumer artifacts + if target_file.exists(): + target_file.chmod(target_file.stat().st_mode | stat.S_IWUSR) + + shutil.copyfile(source_file, target_file) + print(f"Copied {source_file.name} -> {target_file}") + +if __name__ == "__main__": + if len(sys.argv) != 2: + print("Usage: python3 deploy_internal_locators.py ") + sys.exit(1) + + deploy_internal_locators(sys.argv[1]) diff --git a/developer/authored/Manuscript.copy/Document/RT-Style_locator.js b/developer/authored/Manuscript.copy/Document/RT-Style_locator.js new file mode 100644 index 0000000..07d9fb6 --- /dev/null +++ b/developer/authored/Manuscript.copy/Document/RT-Style_locator.js @@ -0,0 +1,29 @@ +/* + We have four scenarios + + immediate - used in the RT-style distribution itself (authored, consummer, staged) + direct - used in the RT-style project itself, but not in the distribution + indirect - the version all Harmony projects use + URL_only - always pulls style through a URL, a webserver must be present + +*/ + +window.RT = window.RT || {}; + +(function() { + // We are the style library, so ... + window.RT.dirpr_library = ".."; + + // 1. Inject the loader script + document.write(' + diff --git a/developer/authored/Manuscript.copy/Locator/URL-only.js b/developer/authored/Manuscript.copy/Locator/URL-only.js new file mode 100644 index 0000000..66e47d7 --- /dev/null +++ b/developer/authored/Manuscript.copy/Locator/URL-only.js @@ -0,0 +1,16 @@ +// RT-style_url_only.js +window.RT = window.RT || {}; + +(function() { + window.RT.dirpr_library = "https://style.ReasoningTechnology.com/Manuscript"; // Production URL + + document.write(' + diff --git a/developer/document/RT-code-format.html b/developer/document/RT-code-format.html index a162364..55eecb2 100644 --- a/developer/document/RT-code-format.html +++ b/developer/document/RT-code-format.html @@ -3,7 +3,7 @@ RT code format conventions - + diff --git a/developer/document/naming_file-and-directory.html b/developer/document/naming_file-and-directory.html index a8fad1e..07e8d67 100644 --- a/developer/document/naming_file-and-directory.html +++ b/developer/document/naming_file-and-directory.html @@ -3,7 +3,7 @@ File and directory naming conventions - + diff --git a/developer/document/single-file_C-module-and-namespace.html b/developer/document/single-file_C-module-and-namespace.html index db0e657..61acebe 100644 --- a/developer/document/single-file_C-module-and-namespace.html +++ b/developer/document/single-file_C-module-and-namespace.html @@ -3,7 +3,7 @@ C modules, namespaces, and the build lifecycle - + diff --git a/shared/document/RT-style.js b/document/RT-Style_locator.js similarity index 73% rename from shared/document/RT-style.js rename to document/RT-Style_locator.js index 34cfb22..4ded0e8 100644 --- a/shared/document/RT-style.js +++ b/document/RT-Style_locator.js @@ -1,8 +1,17 @@ -// RT-style.js (Internal RT-style project router) +/* + We have four scenarios + + immediate - used in the RT-style distribution itself (authored, consummer, staged) + direct - used in the RT-style project itself, but not in the distribution + indirect - the version all Harmony projects use + URL_only - always pulls style through a URL, a webserver must be present + +*/ + window.RT = window.RT || {}; (function() { - const project_name = "RT-style"; + const project_name = "RT-Style"; const path = window.location.pathname; const project_root_index = path.indexOf('/' + project_name + '/'); diff --git a/document/RT-style-HTML.html b/document/RT-style-HTML.html index 1ed8fed..8bbf7e8 100644 --- a/document/RT-style-HTML.html +++ b/document/RT-style-HTML.html @@ -3,7 +3,7 @@ RT semantic HTML tags - + diff --git a/document/introduction_Harmony.html b/document/introduction_Harmony.html index 40a73dd..db3fca3 100644 --- a/document/introduction_Harmony.html +++ b/document/introduction_Harmony.html @@ -3,7 +3,7 @@ Introduction to Harmony - + diff --git a/document/role-and-workflow_product-development.html b/document/role-and-workflow_product-development.html index 47c5b2a..2a4f655 100644 --- a/document/role-and-workflow_product-development.html +++ b/document/role-and-workflow_product-development.html @@ -3,7 +3,7 @@ Product development roles and workflow - + diff --git a/document/role-and-workflow_product-maintenance.html b/document/role-and-workflow_product-maintenance.html index e2c59db..1f76dd0 100644 --- a/document/role-and-workflow_product-maintenance.html +++ b/document/role-and-workflow_product-maintenance.html @@ -3,7 +3,7 @@ Product maintenance roles and workflow - + diff --git a/shared/document/RT-Style_locator.js b/shared/document/RT-Style_locator.js new file mode 100644 index 0000000..4ded0e8 --- /dev/null +++ b/shared/document/RT-Style_locator.js @@ -0,0 +1,37 @@ +/* + We have four scenarios + + immediate - used in the RT-style distribution itself (authored, consummer, staged) + direct - used in the RT-style project itself, but not in the distribution + indirect - the version all Harmony projects use + URL_only - always pulls style through a URL, a webserver must be present + +*/ + +window.RT = window.RT || {}; + +(function() { + const project_name = "RT-Style"; + const path = window.location.pathname; + const project_root_index = path.indexOf('/' + project_name + '/'); + + if (project_root_index !== -1) { + // substring(0, x) excludes the trailing slash. We must prepend it to the payload. + const absolute_project_root = path.substring(0, project_root_index + project_name.length + 1); + window.RT.dirpr_library = absolute_project_root + "/consumer/made/Manuscript"; + } else { + // Fallback for when served via local Python HTTP daemon from the project root + window.RT.dirpr_library = "../consumer/made/Manuscript"; + } + + document.write('