code wiki / (root) / nx_entity_seeds.nx

nx_entity_seeds.nx

buildroot/runtime/nx_entity_seeds.nx

9825 B254 linesdepth 21pulls 135 transitivereach 0 importersview sourcekind tooltopic entity
docsdependenciesstructsconstsfunctions

about

nx_entity_seeds.nx -- SEED DISCOVERY: turn one entity page into the list of OTHER pages about that entity. Why this exists: our own index holds exactly ONE page for some entities, so search cannot supply seeds -- a measured dead end, not a guess. Seeds must come from STRUCTURE instead: an entity's page links out to the other pages about it (filmography, official site, profiles, references). This fetches a page over sovereign TLS (dechunk -> gunzip, same wire order as the gatherer), enumerates every <a href>, resolves them absolute, and keeps the ones whose URL carries a token of the entity's name. The output is a plain seed list, one URL per line, so the gatherer can be run once per seed. Cross-seed dedupe is FREE and needs no state: assets are sha256 content-addressed, so the same image reached from two different seeds writes the same filename. usage: nx_entity_seeds <page-url> <name-token> <out-file> [max]

dependencies 9 imports · 0 importers

nx_str.nx nx_syscalls.nx nx_csprng.nx nx_x509_trust_store.nx nx_pem_loader.nx nx_https_get.nx nx_html_extract_links.nx nx_inflate.nx nx_http_dechunk.nx nx_entity_seeds.nx

imports: nx_str.nxnx_syscalls.nxnx_csprng.nxnx_x509_trust_store.nxnx_pem_loader.nxnx_https_get.nxnx_html_extract_links.nxnx_inflate.nxnx_http_dechunk.nx

imported by: nobody (leaf or entry point)

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

main es_puts sys_write nx_str_len sys_exit es_atoi es_pi sys_mmap sys_write ↻ trust_store_alloc sys_mmap ↻ nx_pem_trust_load_file sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close nx_pem_trust_load nx_str_len ↻ _pem_find nx_str_len ↻ sys_mmap ↻ b64_decode b64_grab b64_dec_char x509_parse sys_mmap ↻ asn1_cursor_init asn1_expect_tag sys_mmap ↻ asn1_read_tlv_header asn1_read_tag asn1_read_length asn1_read_length ↻ x509_read_tlv sys_mmap ↻ asn1_expect_tag ↻ x509_read_alg_id

structs

none

consts

25const ES_PAGE_CAP: i64 = 4194304
26const ES_URLBUF: i64 = 2097152
27const ES_MAX_LINKS: i64 = 4096
28const ES_PATHBUF: i64 = 4096

functions

30func es_puts(s: *u8) -> i64 { sys_write(1, s, nx_str_len(s)); return 0 }
called by 1: main calls 2: sys_writenx_str_len
31func es_w(fd: i64, s: *u8) -> i64 { sys_write(fd, s, nx_str_len(s)); return 0 }
called by 1: main calls 2: sys_writenx_str_len
33func es_pi(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
47func es_atoi(s: *u8) -> i64
called by 1: main
58func es_lc(c: i64) -> i64 { if c >= 65 { if c <= 90 { return c + 32 } } return c }
called by 1: es_has_tok
60func es_body_off(resp: *u8, n: i64) -> i64
called by 1: main
69func es_inflate_if_gzip(src: *u8, n: i64, dst: *u8, cap: i64) -> i64
called by 1: main calls 1: inf_gunzip
78func es_is_http(u: *u8, n: i64) -> i64
called by 1: main
88func es_has_tok(u: *u8, n: i64, tok: *u8) -> i64
called by 1: main calls 2: nx_str_lenes_lc
104func es_hasch(u: *u8, n: i64, ch: i64) -> i64
called by 1: main
111func es_seen(keep: *u8, koff: *i64, klen: *i64, nk: i64, u: *u8, n: i64) -> i64
called by 1: main
125func main(argc: i64, argv: *i64) -> i64