FTP problems uploading gauges.min.js - exceeds line character limit in ftplib


Due to the fact that gauges.min.js contains no line wraps it will fail if you try to upload it via FTP within the quickCPM app.
I do not recall the exact error message but it mentions exceeding the amount of characters limit for a line.
This is due to a per line character limit in ftplib.
If you have an editor that allows replacement with new line you can just do a search for semi-colon and replace
them with "semi-colon\n" (\n = new line).

You can download the new line replacement script below.
If you would like to write your own python script to parse the js file, it can be done easily using the following:

# ftrim.py
import os
with open("gauge.min.js",'r') as f:
rd = f.read().replace(";",";\n")

Just replace the chdir path to the path where your file resides and change the open statement file name.
What it does is simply replace everywhere there is a semi-colon with a carriage return and then save the file.

Once the js file "new lines" are added it should allow you to ftp the js file.