From 5aaa57acbd5535e03ea4a1429041bd62283cc8b5 Mon Sep 17 00:00:00 2001 From: Thomas Walker Lynch Date: Tue, 23 Jun 2026 12:48:32 +0000 Subject: [PATCH] simplifying external tool install --- administrator/document/RT-Style_locator.js | 10 +-- ...s.py => deploy_RT-Style_indirect_locators} | 0 developer/document/RT-Style_locator.js | 10 +-- document/RT-Style_locator.js | 10 +-- next-generation-name.py | 65 ------------------- shared/document/RT-Style_locator.js | 10 +-- shared/linked-project/.gitignore | 6 -- shared/linked-project/Python-3.12.3 | 1 + shared/linked-project/RT-Style | 1 + shared/linked-project/project | 1 + shared/upstream/.gitignore | 2 - 11 files changed, 23 insertions(+), 93 deletions(-) rename administrator/tool/{deploy_RT-Style_indirect_locators.py => deploy_RT-Style_indirect_locators} (100%) mode change 100644 => 100755 delete mode 100755 next-generation-name.py delete mode 100644 shared/linked-project/.gitignore create mode 120000 shared/linked-project/Python-3.12.3 create mode 120000 shared/linked-project/RT-Style create mode 120000 shared/linked-project/project delete mode 100644 shared/upstream/.gitignore diff --git a/administrator/document/RT-Style_locator.js b/administrator/document/RT-Style_locator.js index f338031..39b2706 100644 --- a/administrator/document/RT-Style_locator.js +++ b/administrator/document/RT-Style_locator.js @@ -1,10 +1,10 @@ /* We have four scenarios - immediate - used in the RT-Style distribution itself (authored, consummer, staged) + immediate - used in the RT-Style distribution itself (authored, consumer, 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 + URL-only - always pulls style through a URL, a webserver must be present */ @@ -15,7 +15,7 @@ window.RT = window.RT || {}; window.RT.project_name = "Harmony"; // Fallback URL when served over a network where the project root is not in the URI. -window.RT.server_url = "http://localhost:8000/shared/linked-project/RT-Style/made/Manuscript"; +window.RT.server_url = "http://localhost:8000/shared/linked-project/RT-Style/Manuscript"; (function() { let style_path = window.RT.server_url; @@ -30,8 +30,8 @@ window.RT.server_url = "http://localhost:8000/shared/linked-project/RT-Style/mad const absolute_project_root = path.substring(0, project_root_index + window.RT.project_name.length + 1); // The symlink 'RT-Style' already drops us inside the 'consumer/' directory, - // so we proceed directly to 'made/Manuscript'. - style_path = absolute_project_root + "/shared/linked-project/RT-Style/made/Manuscript"; + // so we proceed directly to 'Manuscript'. + style_path = absolute_project_root + "/shared/linked-project/RT-Style/Manuscript"; } else { console.warn("RT-Style: Cannot locate project root '/" + window.RT.project_name + "/' in URI. Falling back to server_url."); } diff --git a/administrator/tool/deploy_RT-Style_indirect_locators.py b/administrator/tool/deploy_RT-Style_indirect_locators old mode 100644 new mode 100755 similarity index 100% rename from administrator/tool/deploy_RT-Style_indirect_locators.py rename to administrator/tool/deploy_RT-Style_indirect_locators diff --git a/developer/document/RT-Style_locator.js b/developer/document/RT-Style_locator.js index f338031..39b2706 100644 --- a/developer/document/RT-Style_locator.js +++ b/developer/document/RT-Style_locator.js @@ -1,10 +1,10 @@ /* We have four scenarios - immediate - used in the RT-Style distribution itself (authored, consummer, staged) + immediate - used in the RT-Style distribution itself (authored, consumer, 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 + URL-only - always pulls style through a URL, a webserver must be present */ @@ -15,7 +15,7 @@ window.RT = window.RT || {}; window.RT.project_name = "Harmony"; // Fallback URL when served over a network where the project root is not in the URI. -window.RT.server_url = "http://localhost:8000/shared/linked-project/RT-Style/made/Manuscript"; +window.RT.server_url = "http://localhost:8000/shared/linked-project/RT-Style/Manuscript"; (function() { let style_path = window.RT.server_url; @@ -30,8 +30,8 @@ window.RT.server_url = "http://localhost:8000/shared/linked-project/RT-Style/mad const absolute_project_root = path.substring(0, project_root_index + window.RT.project_name.length + 1); // The symlink 'RT-Style' already drops us inside the 'consumer/' directory, - // so we proceed directly to 'made/Manuscript'. - style_path = absolute_project_root + "/shared/linked-project/RT-Style/made/Manuscript"; + // so we proceed directly to 'Manuscript'. + style_path = absolute_project_root + "/shared/linked-project/RT-Style/Manuscript"; } else { console.warn("RT-Style: Cannot locate project root '/" + window.RT.project_name + "/' in URI. Falling back to server_url."); } diff --git a/document/RT-Style_locator.js b/document/RT-Style_locator.js index f338031..39b2706 100644 --- a/document/RT-Style_locator.js +++ b/document/RT-Style_locator.js @@ -1,10 +1,10 @@ /* We have four scenarios - immediate - used in the RT-Style distribution itself (authored, consummer, staged) + immediate - used in the RT-Style distribution itself (authored, consumer, 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 + URL-only - always pulls style through a URL, a webserver must be present */ @@ -15,7 +15,7 @@ window.RT = window.RT || {}; window.RT.project_name = "Harmony"; // Fallback URL when served over a network where the project root is not in the URI. -window.RT.server_url = "http://localhost:8000/shared/linked-project/RT-Style/made/Manuscript"; +window.RT.server_url = "http://localhost:8000/shared/linked-project/RT-Style/Manuscript"; (function() { let style_path = window.RT.server_url; @@ -30,8 +30,8 @@ window.RT.server_url = "http://localhost:8000/shared/linked-project/RT-Style/mad const absolute_project_root = path.substring(0, project_root_index + window.RT.project_name.length + 1); // The symlink 'RT-Style' already drops us inside the 'consumer/' directory, - // so we proceed directly to 'made/Manuscript'. - style_path = absolute_project_root + "/shared/linked-project/RT-Style/made/Manuscript"; + // so we proceed directly to 'Manuscript'. + style_path = absolute_project_root + "/shared/linked-project/RT-Style/Manuscript"; } else { console.warn("RT-Style: Cannot locate project root '/" + window.RT.project_name + "/' in URI. Falling back to server_url."); } diff --git a/next-generation-name.py b/next-generation-name.py deleted file mode 100755 index 4962355..0000000 --- a/next-generation-name.py +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env -S python3 -B -# -*- mode: python; coding: utf-8; python-indent-offset: 2; indent-tabs-mode: nil -*- - -import os ,sys - -def CLI(argv=None) -> int: - # Ordered list of renames: files first, then directories to preserve paths - substitutions = [ - # Administrator - ("administrator/document/how-to_release.html" ,"administrator/document/how-to_release.html") - - # Developer - ,("developer/document/naming_file-and-directory.html" ,"developer/document/naming_file-and-directory.html") - ,("developer/document/format_RT-code.html" ,"developer/document/format_RT-code.html") - ,("developer/document/single-file_C-module-and-namespace.html" ,"developer/document/single-file_C-module-and-namespace.html") - ,("developer/tool/do-all" ,"developer/tool/do-all") - - # Top-level documents - ,("document/introduction_Harmony.html" ,"document/introduction_Harmony.html") - ,("document/role-and-workflow_product-development.html" ,"document/role-and-workflow_product-development.html") - ,("document/role-and-workflow_product-maintenance.html" ,"document/role-and-workflow_product-maintenance.html") - - # Shared tools and documents - ,("shared/document/installation_Python.org" ,"shared/document/installation_Python.org") - ,("shared/document/installation_generic.org" ,"shared/document/installation_generic.org") - ,("shared/dictionary_style-directory.js" ,"shared/dictionary_style-directory.js") - ,("shared/tool/RTfmt" ,"shared/tool/RT-formatter") - ,("shared/tool/RT-formatter.el" ,"shared/tool/RT-formatter.el") - ,("shared/tool/makefile/target_kernel-module.mk" ,"shared/tool/makefile/target_kernel-module.mk") - - # Tester files (referenced by the old directory name before it is renamed) - ,("tester/RT-formatter/RT-formatter.el" ,"tester/RT-formatter/RT-formatter.el") - ,("tester/RT-formatter/RT-formatter.el" ,"tester/RT-formatter/RT-formatter_alt.el") - ,("tester/RT-formatter/RTfmt" ,"tester/RT-formatter/RT-formatter") - ,("tester/RT-formatter/RT-formatter.el" ,"tester/RT-formatter/RT-formatter_script.el") - ,("tester/RT-formatter/RTfmt_with_compare" ,"tester/RT-formatter/RT-formatter_with-compare") - ,("tester/RT-formatter/RTfmt_with_compare.el" ,"tester/RT-formatter/RT-formatter_with-compare.el") - ,("tester/RT-formatter/data_test-0.c" ,"tester/RT-formatter/data_test-0.c") - ,("tester/RT-formatter/data_test-1.py" ,"tester/RT-formatter/data_test-1.py") - - # Directories - ,("shared/linked-project" ,"shared/linked-project") - ,("tester/RT-formatter" ,"tester/RT-formatter") - ] - - for src ,dst in substitutions: - if not os.path.exists(src): - print(f"Skipping (not found): {src}") - continue - - if os.path.exists(dst): - print(f"Warning: Destination {dst} already exists. Skipping rename for {src}.") - continue - - try: - os.rename(src ,dst) - print(f"Renamed: {src} -> {dst}") - except Exception as e: - print(f"Error renaming {src} to {dst}: {e}") - - return 0 - -if __name__ == "__main__": - sys.exit(CLI()) - diff --git a/shared/document/RT-Style_locator.js b/shared/document/RT-Style_locator.js index f338031..39b2706 100644 --- a/shared/document/RT-Style_locator.js +++ b/shared/document/RT-Style_locator.js @@ -1,10 +1,10 @@ /* We have four scenarios - immediate - used in the RT-Style distribution itself (authored, consummer, staged) + immediate - used in the RT-Style distribution itself (authored, consumer, 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 + URL-only - always pulls style through a URL, a webserver must be present */ @@ -15,7 +15,7 @@ window.RT = window.RT || {}; window.RT.project_name = "Harmony"; // Fallback URL when served over a network where the project root is not in the URI. -window.RT.server_url = "http://localhost:8000/shared/linked-project/RT-Style/made/Manuscript"; +window.RT.server_url = "http://localhost:8000/shared/linked-project/RT-Style/Manuscript"; (function() { let style_path = window.RT.server_url; @@ -30,8 +30,8 @@ window.RT.server_url = "http://localhost:8000/shared/linked-project/RT-Style/mad const absolute_project_root = path.substring(0, project_root_index + window.RT.project_name.length + 1); // The symlink 'RT-Style' already drops us inside the 'consumer/' directory, - // so we proceed directly to 'made/Manuscript'. - style_path = absolute_project_root + "/shared/linked-project/RT-Style/made/Manuscript"; + // so we proceed directly to 'Manuscript'. + style_path = absolute_project_root + "/shared/linked-project/RT-Style/Manuscript"; } else { console.warn("RT-Style: Cannot locate project root '/" + window.RT.project_name + "/' in URI. Falling back to server_url."); } diff --git a/shared/linked-project/.gitignore b/shared/linked-project/.gitignore deleted file mode 100644 index 2762afa..0000000 --- a/shared/linked-project/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -# Ignore all files -* - -# But don't ignore the .gitignore file itself -!/.gitignore - diff --git a/shared/linked-project/Python-3.12.3 b/shared/linked-project/Python-3.12.3 new file mode 120000 index 0000000..c2895cf --- /dev/null +++ b/shared/linked-project/Python-3.12.3 @@ -0,0 +1 @@ +project/Python-3.12.3 \ No newline at end of file diff --git a/shared/linked-project/RT-Style b/shared/linked-project/RT-Style new file mode 120000 index 0000000..654d0cc --- /dev/null +++ b/shared/linked-project/RT-Style @@ -0,0 +1 @@ +project/RT-Style/consumer \ No newline at end of file diff --git a/shared/linked-project/project b/shared/linked-project/project new file mode 120000 index 0000000..1b20c9f --- /dev/null +++ b/shared/linked-project/project @@ -0,0 +1 @@ +../../../ \ No newline at end of file diff --git a/shared/upstream/.gitignore b/shared/upstream/.gitignore deleted file mode 100644 index aa0e8eb..0000000 --- a/shared/upstream/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!/.gitignore \ No newline at end of file -- 2.20.1