code wiki / (root) / nx_media_inspect.nx

nx_media_inspect.nx

buildroot/runtime/nx_media_inspect.nx

7908 B125 linesdepth 22pulls 150 transitivereach 0 importersview sourcekind tooltopic media
docsdependenciesstructsconstsfunctions

about

nx_media_inspect.nx -- DEEP sovereign media inspector CLI. Thin wrapper over nx_media_deepcrawl: crawls a page's resource graph over sovereign TLS (following CSS/JS incl. URLs the JS constructs from constants, reconstructed by nx_js_urlfold WITHOUT executing anything), harvests media from every hop, prints the list, dumps the top page's source, and writes the shared HTML media panel. Never runs page JS -> robust on the ad bundles that segfault a tree-walker. Same crawler the in-browser 'm' key uses. usage: nx_media_inspect <url> [save] -- "save" also DOWNLOADS every media file to knowledge/media/inspect/ license_tier: ORIGINAL

dependencies 6 imports · 0 importers

nx_syscalls.nx nx_x509_trust_store.nx nx_trust_store_load_from_certdata. nx_https_fetch_follow.nx nx_media_harvest.nx nx_media_deepcrawl.nx nx_media_inspect.nx

imports: nx_syscalls.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_https_fetch_follow.nxnx_media_harvest.nxnx_media_deepcrawl.nx

imported by: nobody (leaf or entry point)

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

main mi_w sys_write mi_slen sys_mmap mh_ap

structs

none

consts

14const MI_MAGIC_4096: i64 = 4096
15const MI_MAGIC_1024: i64 = 1024
16const MI_MAGIC_1280: i64 = 1280
17const MI_MAGIC_4194304: i64 = 4194304
19const MI_HTML: i64 = 12582912
20const MI_FETCH: i64 = 28
21const MI_DEPTH: i64 = 2
22const MI_DLBUF: i64 = 67108864 // 64 MB per-file download buffer (covers videos)

functions

24func mi_w(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 }
called by 2: mi_save_allmain calls 1: sys_write
25func mi_n(fd: i64, v0: i64) -> i64 { var v: i64=v0; if v<0 { sys_write(fd,"-" as *u8,1); v=0-v } let b: *u8=sys_mmap(24); var k: i64=0; if v==0{b[0]=48 as u8;k=1} while v>0{b[k]=(48+(v%10)) as u8;v=v/10;k=k+1} let o: *u8=sys_mmap(24); var j: i64=0; while j<k{o[j]=b[k-1-j];j=j+1} sys_write(fd,o,k); return 0 }
called by 1: mi_save_all calls 2: sys_writesys_mmap
26func mi_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: main
27func mi_write_file(path: *u8, buf: *u8, n: i64) -> i64
called by 1: mi_save_all calls 1: sys_write
35func mi_mkdir(path: *u8) -> i64 { return __syscall(258, 0-100, path as i64, 0x1ff, 0, 0, 0) } // mkdirat(AT_FDCWD, 0777)
called by 1: mi_save_all
36func mi_wn_str(out: *u8, o: i64, v: i64) -> i64 { var w: i64=o; if v==0 { out[w]=48 as u8; return w+1 } let b: *u8=sys_mmap(24); var m: i64=v; var k: i64=0; while m>0 { b[k]=(48+(m%10)) as u8; m=m/10; k=k+1 } var j: i64=k-1; while j>=0 { out[w]=b[j]; w=w+1; j=j-1 } return w }
called by 1: mi_savename calls 1: sys_mmap
39func mi_savename(url: *u8, ulen: i64, idx: i64, out: *u8) -> i64
called by 1: mi_save_all calls 1: mi_wn_str
62func mi_save_all(M: *MediaSet, store: *TrustStore) -> i64
91func main(argc: i64, argv: *i64) -> i64