code wiki / _hdl_build / nx_vizsla_import.nx

nx_vizsla_import.nx

buildroot/runtime/_hdl_build/nx_vizsla_import.nx

21143 B530 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic vizsla
docsdependenciesstructsconstsfunctions

about

nx_vizsla_import.nx -- NISHI VIZSLA: import your existing relationships into a tenant. Operator 2026-06-22: "i want to import my linkedin my email my phone etc i may be forgetting things." These all export in OPEN standard formats that we parse SOVEREIGNLY (no API, no cloud, your data never leaves the machine -- the whole Vizsla differentiator): vcard <base> <tid> <file.vcf> phone / email / iCloud / Google / Outlook contacts (RFC 6350 vCard) linkedin <base> <tid> <conn.csv> LinkedIn "Connections.csv" (Settings->Data Privacy->Get a copy of your data) Each parsed person -> a CONTACT line in the tenant's contacts.txt (default tier "network" -- you promote the close ones); LinkedIn's "Connected On" date -> a TOUCH so imported pros aren't all flagged NEW. DEDUP vs the tenant's EXISTING contact ids (read first) => re-importing is idempotent/safe. Name -> a stable handle ([A-Za-z0-9-] lowercased). If the tenant has no contacts file yet, a default CONF+TIERs header is written. Composes per-tenant like nx_vizsla_tenant; forks the blessed engine only to re-load LinkedIn touches. license_tier: ORIGINAL expect_exit: 1 (no args)

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_vizsla_import.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main vi_p sys_write vi_slen vi_eq vi_cmd_vcard vi_p ↻ sys_mmap vi_tpath vi_cat vi_ensure_contacts vi_exists sys_openat_rd sys_close vi_writefile sys_openat_wr sys_write ↻ vi_slen ↻ sys_close ↻ vi_count_lines sys_mmap ↻ vi_readall sys_openat_rd ↻ sys_lseek sys_mmap ↻ sys_read sys_close ↻ vi_existing_ids sys_mmap ↻ vi_readall ↻ vi_field_is vi_slen ↻ vi_find vi_eq ↻ vi_dup vi_slen ↻ sys_mmap ↻ vi_readall ↻ vi_field_is ↻ vi_value

structs

none

consts

14const K_MAGIC_65536: i64 = 65536
15const K_MAGIC_1024: i64 = 1024

functions

17func vi_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
18func vi_p(s: *u8) -> i64 { sys_write(1, s, vi_slen(s)); return 0 }
20func vi_eq(a: *u8, b: *u8) -> i64
31func vi_cat(dst: *u8, off: i64, s: *u8) -> i64
37func vi_catn(dst: *u8, off: i64, v: i64) -> i64
50func vi_dup(s: *u8) -> *u8
58func vi_atoi(s: *u8) -> i64
called by 1: vi_cmd_linkedin
66func vi_word(s: *u8, off: i64, out: *u8, cap: i64) -> i64
called by 1: vi_cmd_linkedin
79func vi_find(list: *i64, n: i64, s: *u8) -> i64
85func vi_readall(path: *u8, szp: *i64) -> *u8
101func vi_count_lines(path: *u8) -> i64
112func vi_exists(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 }
114func vi_writefile(path: *u8, content: *u8) -> i64
122func vi_append(path: *u8, buf: *u8, n: i64) -> i64
130func vi_tpath(out: *u8, base: *u8, tid: *u8, suffix: *u8) -> i64
called by 2: vi_cmd_vcardvi_cmd_linkedin calls 1: vi_cat
138func vi_sanitize(src: *u8, disp: *u8, id: *u8) -> i64
167func vi_mon3(s: *u8) -> i64
called by 1: vi_cmd_linkedin calls 1: vi_eq
184func vi_bday_mmdd(src: *u8, out: *u8) -> i64
called by 1: vi_cmd_vcard calls 2: sys_mmapvi_catn
218func vi_field_is(line: *u8, llen: i64, field: *u8) -> i64
called by 2: vi_existing_idsvi_cmd_vcard calls 1: vi_slen
230func vi_value(line: *u8, llen: i64, out: *u8, cap: i64) -> i64
called by 1: vi_cmd_vcard
242func vi_csv_field(line: *u8, llen: i64, k: i64, out: *u8, cap: i64) -> i64
called by 1: vi_cmd_linkedin
265func vi_existing_ids(cpath: *u8, seen: *i64, ns0: i64, cap: i64) -> i64
298func vi_ensure_contacts(cpath: *u8, lpath: *u8) -> i64
304func vi_emit_contact(cpath: *u8, id: *u8, disp: *u8, bday: *u8) -> i64
313func vi_emit_touch(lpath: *u8, date: *u8, id: *u8) -> i64
322func vi_reload(logp: *u8, prefix: *u8) -> i64
342func vi_cmd_vcard(argc: i64, argv: *i64) -> i64
416func vi_cmd_linkedin(argc: i64, argv: *i64) -> i64
523func main(argc: i64, argv: *i64) -> i64