code wiki / (root) / nx_ingest_cli.nx

nx_ingest_cli.nx

buildroot/runtime/nx_ingest_cli.nx

11359 B298 linesdepth 8pulls 17 transitivereach 0 importersview sourcekind tooltopic ingest
docsdependenciesstructsconstsfunctions

about

nx_ingest_cli.nx -- CLI driver for the paste-HTML -> POV-caption pipeline. Reads raw HTML from stdin (up to 256 KiB), runs the full Tier 0-5 ingestion stack, and writes the POV-shifted Literotica caption to stdout. Exit code 0 on success. Usage (under qemu-riscv64-static): cat chapter.html | qemu-riscv64-static _offc/nx_ingest_cli.elf Or via the bench wrapper: bench/nx_ingest_cli.sh path/to/chapter.html Workflow today (TLS-blocked): 1. Browser -> open the source page (literotica chapter, nhentai gallery, fanfiction.net chapter, anywhere) 2. Ctrl+U to view source, save as .html OR copy-paste into a file 3. Pipe that file into this CLI 4. POV-shifted first-person caption arrives on stdout Workflow once TLS unblocks (SHA-256 fix): 1. The same CLI accepts a URL arg 2. Internally calls nx_media_fetch URL transport 3. Same pipeline Per cardinal feedback-user-owns-every-bit: this is a one-shot process, no background daemon, no auto-cataloging without caller opt-in. Output goes to stdout; the user redirects. nx_safety_envelope: intended_use: "CLI adapter that runs paste-HTML through the full ingestion + caption pipeline, emitting POV-shifted output to stdout." sil_target: SIL2 asil_target: QM dal_target: DAL C iec_62304_class: NONE evidence: [no_floating_point,

dependencies 14 imports · 0 importers

nx_syscalls.nx nx_media_pool.nx nx_storybeat.nx nx_storydb.nx nx_html_extract.nx nx_text_ingest.nx nx_term_registry.nx nx_term_extract.nx nx_term_cooccur.nx nx_arc_anchor.nx nx_ingest_cli.nx

diagram shows first 10 each side; +4 more imports, +0 more importers in the complete lists below.

imports: nx_syscalls.nxnx_media_pool.nxnx_storybeat.nxnx_storydb.nxnx_html_extract.nxnx_text_ingest.nxnx_term_registry.nxnx_term_extract.nxnx_term_cooccur.nxnx_arc_anchor.nxnx_scene_index.nxnx_pov_shift.nxnx_caption_emit.nxnx_content_guard.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap nx_ingest_read_stdin sys_read nx_ingest_log sys_write nx_html_extract sys_mmap ↻ nx_he_load_u8 nx_he_match_ci nx_he_to_lower nx_he_load_u8 ↻ nx_he_decode_entity nx_he_store_u8 nx_he_load_u8 ↻ nx_he_match_ci ↻ nx_he_store_u8 ↻ nx_he_is_block_tag_name nx_he_match_ci ↻ nx_content_guard_scan_byte nx_cg_scan_ntr nx_cg_ntr_cue_at nx_cg_ntr_cue_len nx_phrase_find_ci nx_pm_load_u8 nx_pm_is_alnum nx_pm_to_lower nx_cg_scan_male_active nx_cg_male_verb_pair_at nx_cg_male_verb_pair_len nx_phrase_find_ci ↻ nx_cg_scan_observer_passiv nx_cg_obs_passive_cue_at nx_cg_obs_passive_cue_len nx_phrase_find_ci ↻ nx_content_guard_verdict nx_content_guard_emit_expl nx_content_guard_verdict ↻ sys_write ↻ nx_storydb_alloc

structs

none

consts

65const NX_MAGIC_4096: i64 = 4096
67const NX_INGEST_INPUT_CAP: i64 = 262144 // 256 KiB
68const NX_INGEST_OUTPUT_CAP: i64 = 524288 // 512 KiB
71const NX_INGEST_DEFAULT_GENDER: i64 = 1 // NX_POV_GENDER_HE
74const NX_INGEST_DEFAULT_FORMAT: i64 = 2 // NX_CAP_FORMAT_LITEROTICA

functions

76func nx_ingest_read_stdin(buf: *u8, cap: i64) -> i64
called by 1: main calls 1: sys_read
99func nx_ingest_write_stdout(buf: *u8, n: i64) -> i64
called by 1: main calls 1: sys_write
119func nx_ingest_log(s: *u8, n: i64) -> i64
called by 1: main calls 1: sys_write
123func main() -> i64