code wiki / _hdl_build / nx_hub_template.nx

nx_hub_template.nx

buildroot/runtime/_hdl_build/nx_hub_template.nx

11550 B230 linesdepth 2pulls 2 transitivereach 5 importersview sourcekind tooltopic hub
docsdependenciesstructsconstsfunctions

about

nx_hub_template.nx -- the S-CLASS PERSONAL-HUB template emitter (blog / organizer / hub) for the autonomous builder. Operator 2026-06-29: migrate bradrwest.com into a blog/organizer/hub; publish videos from phone; coordinate via shared calendars with coach + friends (jensendwest.com too); video chat. Grounded in knowledge/library/hub_* (blog/portal/CMS/calendaring/iCalendar/video-hosting/web-conferencing). PURE transform ht_emit_hub(cfg,n,out) -> out_n: a data-driven `.hub` blueprint -> a MOBILE-FIRST hub page with sections: header/profile · Blog · Videos (+ "publish from your phone") · Calendar (events with coach/friends) · Friends (link + video-chat). HTML-ESCAPES all text values (defensive at the boundary -- migrated/user content is untrusted). `.hub` line format (pipe-delimited): name|<n> · tagline|<t> · post|<title>|<date>|<body> · video|<title>|<url> · event|<date>|<title>|<with> · friend|<name>|<url> · footer|<text>. license_tier: ORIGINAL

dependencies 1 imports · 3 importers

nx_syscalls.nx nx_hub_template.nx nx_domain_forge.nx nx_hub_provision.nx nx_hub_template_gate.nx

imports: nx_syscalls.nx

imported by: nx_domain_forge.nxnx_hub_provision.nxnx_hub_template_gate.nx

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_write sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ht_emit_hub ht_put ht_emit_first sys_mmap ↻ ht_eol ht_line_field ht_tageq ht_slen ht_esc ht_put ↻ ht_render_posts sys_mmap ↻ ht_eol ↻ ht_line_field ↻ ht_tageq ↻ ht_put ↻ ht_esc ↻ ht_render_videos sys_mmap ↻ ht_eol ↻ ht_line_field ↻ ht_tageq ↻ ht_put ↻ ht_esc ↻ ht_render_events sys_mmap ↻ ht_eol ↻ ht_line_field ↻ ht_tageq ↻ ht_put ↻ ht_esc ↻

structs

none

consts

11const K_MAGIC_1048576: i64 = 1048576

functions

13func ht_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
14func ht_put(out: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { out[o] = s[i]; o = o + 1; i = i + 1 } return o }
17func ht_esc(out: *u8, o: i64, cfg: *u8, off: i64, len: i64) -> i64
31func ht_eol(cfg: *u8, n: i64, start: i64) -> i64
39func ht_line_field(cfg: *u8, ls: i64, le: i64, idx: i64, offb: *i64, lenb: *i64) -> i64
58func ht_tageq(cfg: *u8, off: i64, len: i64, tag: *u8) -> i64
67func ht_emit_first(cfg: *u8, n: i64, tag: *u8, idx: i64, out: *u8, o0: i64) -> i64
88func ht_render_posts(cfg: *u8, n: i64, out: *u8, o0: i64) -> i64
111func ht_render_videos(cfg: *u8, n: i64, out: *u8, o0: i64) -> i64
132func ht_render_events(cfg: *u8, n: i64, out: *u8, o0: i64) -> i64
155func ht_render_friends(cfg: *u8, n: i64, out: *u8, o0: i64) -> i64
178func ht_emit_hub(cfg: *u8, n: i64, out: *u8) -> i64
212func main(argc: i64, argv: *i64) -> i64