nx_learnmine.nx
buildroot/runtime/nx_learnmine.nx
about
nx_learnmine.nx -- THE LEARNING-MINING COMMAND (operator 2026-09-06: farm creators and archives for videos, transcripts and
how-to text as supporting guides for the /compare rungs). Rung 1: digest an archive.org advancedsearch listing (output=json,
mirrored by nx_research_fetch) into item rows and a census, so a seat reads two hundred rows instead of a quarter-megabyte.
usage: nx_learnmine items <listing.json> [max] one ITEM row per item (idx, identifier, mediatype, date, downloads, title,
subjects) and a DESC row per described item (full length announced, head shown)
nx_learnmine subjects <listing.json> [top] the subject frequency table, count descending (a FLOOR when the table filled)
nx_learnmine census <listing.json> the summary line only
rows are pipe-separated and every field is sanitised (a pipe in the source becomes a slash, a newline a space), so a row is
one line and the summary is LAST. exits: 0 digested (GREEN) - 2 usage - 3 refused by name (UNREADABLE, NO-DOCS, MALFORMED,
CAPACITY). Nothing here fetches: the bytes come from the provenance-journalled mirror.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_learnmine_lib.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 15 | const LN_EXIT_OK: i64 = 0 |
| 16 | const LN_EXIT_USAGE: i64 = 2 |
| 17 | const LN_EXIT_REFUSED: i64 = 3 |
| 18 | const LN_MAX_ITEMS: i64 = 4096 |
| 19 | const LN_DEFAULT_TOP: i64 = 40 |
| 20 | const LN_VERB_ITEMS: *u8 = "items" |
| 21 | const LN_VERB_SUBJECTS: *u8 = "subjects" |
| 22 | const LN_VERB_CENSUS: *u8 = "census" |
functions
| 24 | func ln_puts(s: *u8) -> i64 { sys_write(1, s, lm_len(s)); return 0 } |
| 25 | func ln_putn(v: i64) -> i64 { let t: *u8 = sys_mmap(32); let e: i64 = lm_putd(t, 0, v); sys_write(1, t, e); return 0 } |
| 26 | func ln_kv(k: *u8, v: *u8) -> i64 { ln_puts(" " as *u8); ln_puts(k); ln_puts("=" as *u8); ln_puts(v); return 0 } |
| 27 | func ln_kvn(k: *u8, v: i64) -> i64 { ln_puts(" " as *u8); ln_puts(k); ln_puts("=" as *u8); ln_putn(v); return 0 } |
| 28 | func ln_sep() -> i64 { ln_puts("|" as *u8); return 0 } |
| 29 | func ln_usage() -> i64 |
| 33 | func ln_summary(lst: *i64) -> i64 |
| 44 | func main(argc: i64, argv: *i64) -> i64 |