Appeal; Name; Fatherland; Surname; Suffix; Organization; Department; Position; Ulitsarabadres; Street 2 address; Street address; Citybadres; DomainAdmin; Indexrabadres; Stranarabadres; Ulitsadomadres; Street2domain; Street 3 address; City Maiden; Areadomain; Sweat code; Stranadomares; Street address; Street 2 another address; Street 3 another address; City other address; Area another address; Index to another address; Other address; Telephone assistant; Raboiifax; Work phone; Telephone2; Callback; Telephone in the machine; Main telephone organization; Homefax; Home phone; Telefonom2; ISDN; Telephone portable; Anotherfax; Other phone; Pager; Main phone; Radiotelephone; Teletype telephones; Telex; Importance; Webpage; Anniversary; Birthday; Children; Assistant's name; Initials; Categories; Clue terms; Code organization; Linecode; Postponed; Floor; User1; User2; User3; User4; Mark; Potovyashikdomadres; Store another address; Sweat crabs; Profession; Location; Location rooms; Distance; Head; Information available to the Internet; Server Directory; Spouse; Set; Seth; Hobby; private; Adresselpot; Tipalpots; Short Names; Address 2 slots; Type 2 elpots; Short2mealpots; Address3elpots; Tip3 Elpot; Short3mealpots; Language [CRLF]
; Credit ;; Bee Line Account ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 067404 ;;; 067404 ;;;;;; ;;; Plain ;;;;;; K.BLS; Service ;;;;; Not determined;;;;; Plain ;;;;;;;;;;;;;;;; LYING;;;;;;;;;; [CRLF]
Other records
BEGIN: VCARD
VERSION: 3.0
CATEGORIES: Utility
N: Bee Line Account; Credit
TEL; TYPE = cell: 067404
TEL; TYPE = home: 067404
END: VCARD
BEGIN { FS = ";" KEYS[""] = "N.1"; KEYS[""] = "N.2"; KEYS[""] = "N.3"; KEYS[""] = "N.4"; KEYS[""] = "N.5"; KEYS[""] = "ORG.1"; KEYS[""] = "ORG.2"; KEYS[""] = "TITLE"; KEYS[""] = "ADR;TYPE=work.2"; KEYS["2"] = "ADR;TYPE=work.2"; KEYS["3"] = "ADR;TYPE=work.2"; KEYS[""] = "ADR;TYPE=work.3"; KEYS[""] = "ADR;TYPE=work.4"; KEYS[""] = "ADR;TYPE=work.5"; KEYS[""] = "ADR;TYPE=work.6"; KEYS[""] = "ADR;TYPE=home.1"; KEYS[""] = "ADR;TYPE=home.2"; KEYS["2"] = "ADR;TYPE=home.2"; KEYS["3"] = "ADR;TYPE=home.2"; KEYS[""] = "ADR;TYPE=home.3"; KEYS[""] = "ADR;TYPE=home.4"; KEYS[""] = "ADR;TYPE=home.5"; KEYS[""] = "ADR;TYPE=home.6"; KEYS[""] = "ADR;TYPE=postal.2"; KEYS["2"] = "ADR;TYPE=postal.2"; KEYS["3"] = "ADR;TYPE=postal.2"; KEYS[""] = "ADR;TYPE=postal.3"; KEYS[""] = "ADR;TYPE=postal.4"; KEYS[""] = "ADR;TYPE=postal.5"; KEYS[""] = "ADR;TYPE=postal.6"; KEYS[""] = "TEL;TYPE=pager"; KEYS[""] = "TEL;TYPE=work;TYPE=fax"; KEYS[""] = "TEL;TYPE=work"; KEYS["2"] = "TEL;TYPE=work"; KEYS[""] = "TEL;TYPE=X-EVOLUTION-CALLBACK"; KEYS[""] = "TEL;TYPE=car"; KEYS[""] = "TEL;TYPE=work"; KEYS[""] = "TEL;TYPE=home;TYPE=fax"; KEYS[""] = "TEL;TYPE=home"; KEYS["2"] = "TEL;TYPE=home"; KEYS["ISDN"] = "TEL;TYPE=isdn"; KEYS[""] = "TEL;TYPE=cell"; KEYS[""] = "TEL;TYPE=fax"; KEYS[""] = "TEL"; KEYS[""] = "TEL;TYPE=pager"; KEYS[""] = "TEL"; KEYS[""] = "TEL;TYPE=pcs"; KEYS[""] = "TEL;TYPE=msg"; KEYS[""] = "TEL;TYPE=msg"; KEYS[""] = ""; KEYS[""] = "URL"; KEYS[""] = "X-ANNIVERSARY"; KEYS[""] = "BDAY"; KEYS[""] = ""; KEYS[""] = "X-ASSISTANT"; KEYS[""] = ""; KEYS[""] = "CATEGORIES"; KEYS[""] = "NOTE"; KEYS[""] = ""; KEYS[""] = ""; KEYS[""] = ""; KEYS[""] = ""; KEYS["1"] = ""; KEYS["2"] = ""; KEYS["3"] = ""; KEYS["4"] = ""; KEYS[""] = ""; KEYS[""] = ""; KEYS[""] = ""; KEYS[""] = ""; KEYS[""] = ""; KEYS[""] = ""; KEYS[""] = ""; KEYS[""] = ""; KEYS[""] = ""; KEYS[""] = ""; KEYS[""] = ""; KEYS[""] = "X-SPOUSE"; KEYS[""] = ""; KEYS[""] = ""; KEYS[""] = ""; KEYS["_"] = ""; KEYS[""] = "EMAIL;TYPE=internet"; KEYS[""] = ""; KEYS[""] = ""; KEYS["2"] = "EMAIL;TYPE=internet"; KEYS["2"] = ""; KEYS["2"] = ""; KEYS["3"] = "EMAIL;TYPE=internet"; KEYS["3"] = ""; KEYS["3"] = ""; KEYS[""] = ""; } FNR == 1 { for (i = 1; i <= NF; i++) { k = KEYS[$i]; if ("" != k) { MAPS[i] = k; } } } FNR != 1 { delete PROPS; for (i = 1; i <= NF; i++) { k = MAPS[i]; if (("" != $i) && ("" != k)) { PROPS[k] = $i; } } n = asorti(PROPS, SKEYS); if (n > 0) { l = ""; print("BEGIN:VCARD"); printf("VERSION:3.0"); for (i = 1; i <= n; i++) { k = SKEYS[i]; v = PROPS[k]; if (2 == split(k, a, ".")) { k = a[1]; x = 0 + a[2]; } else { x = 1; } if (l != k) { l = k; m = 1; printf("\r\n%s:", l); } while (m < x) { m++; printf(";"); } printf("%s", v); } print("\r\nEND:VCARD"); } } function die(str) { print "Error at " FILENAME ":" FNR " " str exit } function warn(str) { print "Warning at " FILENAME ":" FNR " " str }
gawk -f outlook2vcard.awk inputfile.csv >outputfile.vcf
Source: https://habr.com/ru/post/150816/
All Articles