code wiki / _hdl_build / nx_tpl_fetch.nx
nx_tpl_fetch.nx
buildroot/runtime/_hdl_build/nx_tpl_fetch.nx
about
nx_tpl_fetch.nx -- hybrid STEP 2 of the SITE FACTORY: fetch OPEN FREE web templates over SOVEREIGN TLS
(nx_https_fetch_follow_best: TLS-1.3 -> chrome-JA3 -> TLS-1.2 fallback, Mozilla CA trust) and save each page's
RAW HTML into a dir, so nx_tpl_ingest (R4) can extract its STRUCTURE into the pattern corpus. We keep bytes only
to extract abstract STRUCTURE/FLOW (uncopyrightable) -- never to redistribute the templates' files. BOUNDED +
POLITE by construction: fetches ONLY the explicit URLs passed (no unbounded crawl), each once, byte-capped.
usage: nx_tpl_fetch <outdir> <url1> [url2 ...]
license_tier: ORIGINAL
dependencies 4 imports · 0 importers
imports: nx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_https_fetch_follow.nxnx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 12 | const TF_MAGIC_4194304: i64 = 4194304 |
| 13 | const TF_MAGIC_1024: i64 = 1024 |
| 15 | const TF_OUTCAP: i64 = 4194304 // 4 MiB max per page |
functions
| 17 | func tf_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 18 | func tf_catn(d: *u8, o: i64, v: i64) -> i64 |
| 27 | func tf_num(v: i64) -> i64 { let b: *u8=sys_mmap(28); let e: i64=tf_catn(b,0,v); sys_write(1,b,e); return 0 } |
| 28 | func tf_cat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){d[o+i]=s[i]; i=i+1} return o+i } called by 1: main |
| 30 | func main(argc: i64, argv: *i64) -> i64 |