项目作者: rounakdatta

项目描述 :
ERP for Shipping & Logistics
高级语言: HTML
项目地址: git://github.com/rounakdatta/jlg.git
创建时间: 2018-08-27T18:05:51Z
项目社区:https://github.com/rounakdatta/jlg

开源协议:

下载


Let me help you upload your old bulk data to Firebase

  1. Export the Excel file as CSV

  2. Use this tool to convert this CSV to JSON

  3. Use a text editor Find-and-Replace to change { to "x": {. Also remove the [] in the beginning and ending.

  4. Use this Linux command to change each of the x to incemental numbers

awk 'BEGIN { cntr = 0 } /"x":/ { cntr++ ; print "\""cntr"\":" } !/header/ { print $0 }' codebeautify.json > output.json

(Remember this code doesn’t do the exact thing for us, so one more step)

  1. "x": is not removed, so to remove it use text editor Find-and-Replace to change "x": to blank.

  2. Last step, but important - convert the encoding of the file to strictly UTF-8, nothing else is accepted.

Done! Goto Firebase Database Console and upload the output.json using Import JSON.

Recommended to use Visual Studio Code for the purpose (especially Step 6).