nx_asset_ingest_lib.nx
buildroot/runtime/nx_asset_ingest_lib.nx
about
nx_asset_ingest_lib.nx -- shared ingest CORES for the production catalog populator (R5).
Factored out of nx_asset_ingest_real so BOTH the runnable populator (nx_asset_ingest_real, keeps
main() + the slug list) AND its gate (nx_asset_ingest_real_gate) drive the SAME real
read -> record -> dedup pipeline (DRY #15; mirrors _pdf_reflow_lib shared by the reader + its gate).
The *_at cores take an ARBITRARY catalog prefix + an ARBITRARY full path so a gate can exercise them
against fixtures + a fresh /tmp catalog (never the production store). NO main(). license_tier: ORIGINAL
dependencies 4 imports · 2 importers
imports: nx_syscalls.nxnx_asset_record.nxnx_asset_catalog.nxnx_asset_meta.nx
imported by: nx_asset_ingest_real.nxnx_asset_ingest_real_gate.nx
structs
| none |
consts
| 12 | const K_MAGIC_4194304: i64 = 4194304 |
| 13 | const K_MAGIC_8192: i64 = 8192 |
| 14 | const K_MAGIC_2097152: i64 = 2097152 |
functions
| 18 | func ai_prefix() -> *u8 { return "knowledge/store/asset-catalog-\x00" as *u8 } |
| 20 | func ai_gallery_dir() -> *u8 { return "knowledge/staging/media/gallery/\x00" as *u8 } called by 1: ai_ingest_image |
| 23 | func ai_w(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 24 | func ai_num(v: i64) -> i64 |
| 32 | func ai_cat(dst: *u8, off: i64, src: *u8) -> i64 { var i: i64 = 0; while src[i] != (0 as u8) { dst[off + i] = src[i]; i = i + 1 } dst[off + i] = 0 as u8; return off + i } |
| 33 | func E() -> *u8 { return "\x00" as *u8 } |
| 34 | func sset(a: *i64, i: i64, s: *u8) -> i64 { a[i] = s as i64; return 0 } |
| 39 | func ai_read_cap(path: *u8, cap: i64, out_len: *i64) -> *u8 |
| 59 | func ai_mk_rec(core: *i64, prov: *i64, media: *i64, org: *i64, out: *u8) -> i64 |
| 69 | func ai_ingest_doc_at(cat_prefix: *u8, path: *u8, slug: *u8, title: *u8, date: *u8, tags: *u8, builder: *u8) -> i64 |
| 100 | func ai_ingest_doc(slug: *u8, file_rel: *u8, title: *u8, date: *u8, tags: *u8, builder: *u8) -> i64 |
| 110 | func ai_ingest_image_at(cat_prefix: *u8, path: *u8, fname: *u8, title: *u8, date: *u8, tags: *u8) -> i64 called by 3: ai_ingest_imagegt_imagegt_skip calls 10: sys_mmapai_read_capam_extract_imageai_wssetE+4 |
| 149 | func ai_ingest_image(fname: *u8, title: *u8, date: *u8, tags: *u8) -> i64 |