code wiki / (root) / nx_revimg_crawl.nx

nx_revimg_crawl.nx

buildroot/runtime/nx_revimg_crawl.nx

2308 B42 linesdepth 11pulls 52 transitivereach 1 importersview sourcekind librarytopic revimg
docsdependenciesstructsconstsfunctions

about

nx_revimg_crawl.nx -- the DISCOVERY DRIVER: turns real image files (a crawl's fetched media) into the fingerprint corpus that nx_revimg_discover reasons over. This is the glue that makes the reverse-image discovery loop run on REAL media: each candidate image is decoded through the shared nx_img_to_gray (PNG today, JPEG since the FF-D8-FF wiring -- so real web media works), perceptually hashed (nx_phash dHash), and appended to the (site, fingerprint, path-id) corpus. Undecodable/unsupported files are SKIPPED (graceful degradation, never fatal -- one bad image can't abort a crawl). The network I/O (fetch HTML, extract <img> via nx_html_extract_imgs, fetch each image to a local file) is the operator-driven half wired to nx_https_get; this driver is the pure decode->fingerprint->corpus half, so it is fully gateable against local fixtures and identical whether the bytes came from disk or the live web. Composes nx_img_to_gray + nx_phash + nx_revimg_discover -- ZERO new logic. ORIGINAL

dependencies 3 imports · 1 importers

nx_image_gray.nx nx_phash.nx nx_revimg_discover.nx nx_revimg_crawl.nx nx_revimg_crawl_gate.nx

imports: nx_image_gray.nxnx_phash.nxnx_revimg_discover.nx

imported by: nx_revimg_crawl_gate.nx

structs

none

consts

none

functions

18func nx_revimg_seed_file(path: *u8) -> i64
called by 1: main calls 2: nx_img_to_graynx_phash_dhash
29func nx_revimg_ingest_file(path: *u8, site_id: i64, path_id: i64,
called by 1: main calls 2: nx_img_to_graynx_phash_dhash