# Generate a CSV file with font information
# Usage
To execute the following command in the gen-font-info directory:
npm install
node index.js <input-path> [output-path] [output-override=true]
# Explanation of the parameters
- input-path: the path of font file. It supports the following formats: - Font file URL, which returns a font file with the - content-typeset to- application/octet-stream.
- Font list URL, which returns a font list with the - content-typeset to- application/json, formatted as- ["font-a-url", "font-b-url", ...].
- Local font file path, which supports both absolute path and relative path. 
- Local font folder path, which will traverse all font files in this folder including subfolders. It supports both absolute path and relative path. 
 
- output-path: Generated CSV file path, default is - fontInfo.csvin the current directory.
- output-override: Whether to overwrite the existing CSV file, default is - true. If set to- false, new font information will be appended to the existing CSV file.
# Example
# Example of font file URL
node index.js http://localhost:8080/fonts/Bradhitc_M.ttf ./fontInfo.csv
# Example of font list URL
node index.js http://localhost:8080/fonts.json ./fontInfo.csv
# Example of local font file path
# Relative path 
node index.js ./fonts/arial.ttf ./fontInfo.csv
node index.js ./fonts ./fontInfo.csv
# Absolute path
# win
node index.js  D:\fonts\Bradhitc_M.ttf E:\fontInfo.csv
node index.js  D:\fonts E:\fontInfo.csv
# linux, mac
node index.js  /home/fonts/Bradhitc_M.ttf /home/fontInfo.csv
node index.js  /home/fonts /home/fontInfo.csv
# Example of output-override
node index.js  /home/fonts /home/fontInfo.csv false
node index.js  /home/fonts false