diff --git a/.gitignore b/.gitignore index 66bc884..a7aef4a 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,11 @@ jetc/*.compiled.cpp jetc/*.pic.o jetc/*.jtc jetc/libCoreUtils_pic.a + +# These 3 pages' converted output bakes in a real barant.com DB password +# (via BARANT_DB_PASSWORD at conversion time - see convert.py's MYSQL_PAGES +# handling) so they never enter git history, unlike the rest of +# jetc/barant-site/jet/, which is plain static content and safe to commit. +jetc/barant-site/jet/vst.jet +jetc/barant-site/jet/modular1.jet +jetc/barant-site/jet/modular1_patches.jet diff --git a/jetc/barant-site/assets/images/download.png b/jetc/barant-site/assets/images/download.png new file mode 100644 index 0000000..4c0448d --- /dev/null +++ b/jetc/barant-site/assets/images/download.png @@ -0,0 +1,95 @@ + + Page Not Found + + + + + + + +
+
+
+
+ +
+
BARANT TECHNOLOGY GROUP
+
Page Not Found
+
+
+
+
+ +
+
+
+ +
+

Requested page is not found.

+
+
+
+
+ +
+
+ + diff --git a/jetc/barant-site/assets/images/speaker.png b/jetc/barant-site/assets/images/speaker.png new file mode 100644 index 0000000..d23c627 --- /dev/null +++ b/jetc/barant-site/assets/images/speaker.png @@ -0,0 +1,95 @@ + + Page Not Found + + + + + + + +
+
+
+
+ +
+
BARANT TECHNOLOGY GROUP
+
Page Not Found
+
+
+
+
+ +
+
+
+ +
+

Requested page is not found.

+
+
+
+
+ +
+
+ + diff --git a/jetc/barant-site/convert.py b/jetc/barant-site/convert.py index 90864ef..028442e 100644 --- a/jetc/barant-site/convert.py +++ b/jetc/barant-site/convert.py @@ -113,6 +113,34 @@ def strip_setenv(html): return re.sub(r'.*?', '', html, flags=re.IGNORECASE | re.DOTALL) +def strip_retain(html): + """ is a SESSIONCTL.tag helper that echoes a posted form + field back as a hidden input - meaningless with no
/session in this + static conversion, and (since it isn't a tag jetc's fallback interpreter + knows about) would otherwise render as literal untouched text rather + than erroring, which is worse than just dropping it.""" + return re.sub(r'', '', html, flags=re.IGNORECASE) + + +# Pages that need a live product-row lookup - (SESSIONCTL-only, +# not implemented by the new JetCore port) is replaced with the real +# tag it should have used all along. host="localhost" matches +# barant.com's own config.cfg verbatim: MySQL is only reachable from the +# server itself, so a locally-run .jtc genuinely can't connect here - by +# design, per instruction, this fails at runtime exactly as if the +# database were down, and APIServer's existing catch(coreutils::Exception) +# path (ApiSession.cpp) already turns that into a clean 500, not a crash. +# +# The real credential is deliberately NOT a literal here - it's supplied +# via the BARANT_DB_PASSWORD env var at conversion time, since the .jet +# files this produces for these pages get gitignored rather than committed +# (see .gitignore) precisely so the password never lands in git history. +MYSQL_PAGES = {"vst", "modular1", "modular1_patches"} +DB_PASSWORD = os.environ.get("BARANT_DB_PASSWORD", "") +MYSQL_OPEN = '' % DB_PASSWORD +MYSQL_CLOSE = '' + + def selfclose_set(html): """Old JET shorthand allows with no closing tag and no container - jetc's own real codegen requires this to be @@ -209,11 +237,15 @@ def convert_page(name): contents = contents_m.group(1) contents = strip_setenv(contents) + contents = strip_retain(contents) contents = selfclose_set(contents) contents = flatten_sectionframes(contents) contents = flatten_linkbuttons(contents) contents = resolve_images(contents) + if name in MYSQL_PAGES: + contents = MYSQL_OPEN + contents + MYSQL_CLOSE + if name == "jet": # jet.page dispatches on a $[ARGS] query-string sub-page selector # (?tags, ?set, etc. -> jet_.section) - that request-derived