VitaliyRodnenko/geeknote — pull request #120 by cwoac (2013-06-04 14:57:00+00:00)
Title: Handle non markdown files properly in gnsync

First commit removes unprintable characters from files before gnsync uploads them - before characters like unix control codes (not uncommon in log files) would cause a silent[^1] failure.

Second commit means that if you call gnsync with format = plain, it won't try and parse each note as markdown and simply uses xml.sax to handle html escaping. This *dramatically* speeds up processing on larger log files (a 256K log file took an unknown[^2] number of minutes before on my server, but now is uploaded in ~10s)

[^1]: Admittedly it does get logged in the logfile, but there is no indication of failure on the cli.
[^2]: I.e. I gave up waiting and killed it.