We’ll choose “Universe-HTT barcode reference” — The largest and most accurate open reference book of bar codes on the Internet! Imagine you have ubuntu-based instance from DigitalOcean or any other cloud provider. And you already have MongoDB instance on the same machine or inside docker-container. How import data from release files to database? Make a folder for our actions: mkdir Import
cd Import
Get the last release of barcodes: wget https://github.com/papyrussolution/UhttBarcodeReference/releases/download/20181106/uhtt_barcode_ref_all.7z
Install archiver (If it necessary): apt-get install p7zip
Unpack the archive in the same directory: 7zr x uhtt_barcode_ref_all.7z
Delete everything excludes the main data-file: find . ! -name 'uhtt_barcode_ref_all.csv' -type f -exec rm -f {} +
Convert the main csv-file for properly import: tr "," ";" < uhtt_barcode_ref_all.csv > uhtt_barcode_ref_all_1.csv
tr "\"" "'" < uhtt_barcode_ref_all_1.csv > uhtt_barcode_ref_all_2.csv
tr "\t" "," < uh