code wiki / _hdl_build / nx_uigen_sitegen.nx

nx_uigen_sitegen.nx

buildroot/runtime/_hdl_build/nx_uigen_sitegen.nx

5565 B127 linesdepth 5pulls 12 transitivereach 0 importersview sourcekind tooltopic uigen
docsdependenciesstructsconstsfunctions

about

nx_uigen_sitegen.nx -- CLI front door for prompt-to-site: ONE brief -> a linked multi-page site ON DISK. usage: nx_uigen_sitegen <brief> <outdir> <domain> [title] [brand] Thin syscall wrapper over the pure lib nx_uigen_site.nx (which the gate proves): us_plan -> per-page us_emit_page -> outdir/<slug> + sitemap.xml + robots.txt, then ONE machine-readable JSON summary line (agentic/workflow contract; additive fields only, rule 19). Fail-LOUD: any write failure exits nonzero with the path named -- a partial site is never reported as success. Envelope declared in-band. expect_exit: 0 license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_uigen_site.nx nx_emit_guard.nx nx_uigen_sitegen.nx

imports: nx_syscalls.nxnx_uigen_site.nxnx_emit_guard.nx

imported by: nobody (leaf or entry point)

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

main cp sys_write sys_exit sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sys_mkdir eg_buf sys_mmap ↻ eg_say sys_write ↻ sys_exit ↻ us_plan l2_has l2_isalpha us_emit_page_req us_spec us_hash l3_spec_from_seed l3_rng_next l3_choice l3_rng_next ↻ l2_hue l2_has ↻ us_family l2_has ↻ us_page_index_routed us_family ↻ us_page_index_counsel sk_open_site sk_head he_puts sk_header_open he_puts ↻ us_nav

structs

none

consts

13const K_SG_PAGEBUF: i64 = 1048576
14const K_SG_PATHBUF: i64 = 1024

functions

16func cp(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
17func cn(v: i64) -> i64 { if v==0 { sys_write(1,"0" as *u8,1); return 0 } var m: i64=v; if m<0 { sys_write(1,"-" as *u8,1); m=0-m } let t: *u8=sys_mmap(28); var k: i64=0; while m>0 { t[k]=(48+(m%10)) as u8; m=m/10; k=k+1 } while k>0 { k=k-1; sys_write(1,(((t as i64)+k) as *u8),1) } return 0 }
called by 1: main calls 2: sys_writesys_mmap
19func pjoin(dst: *u8, dir: *u8, name: *u8) -> i64
called by 1: main
31func fput(path: *u8, buf: *u8, base: i64, len: i64) -> i64
40func main(argc: i64, argv: *i64) -> i64