OpenDroneMap / ODM

A command line toolkit to generate maps, point clouds, 3D models and DEMs from drone, balloon or kite images. 📷
https://opendronemap.org
GNU Affero General Public License v3.0
4.92k stars 1.11k forks source link

AnsiEsc codes in logs #1668

Closed sbonaime closed 1 year ago

sbonaime commented 1 year ago

Hi, As I am using ODM with SLURM on a clsuter, my logs go to text file and I read them with vim. But AnsiEsc are quite annoying because there are not supported by default. I would be interested by having a --no-ansiesc flag.

And I think I can do it ! Any chance that this futur PR will be merge ? Thanks

pierotofy commented 1 year ago

Mm, I think log cleaning should be done by client apps (perhaps via a filter). A simple regex would do the trick. See https://github.com/OpenDroneMap/NodeODM/blob/26d10d990ccd9b04f3a591fd3cb2ac515e928d45/libs/Task.js#L601

pierotofy commented 1 year ago

I should mention, it could be OK to have an environment variable toggle ansiesc codes. (Just not a command line flag).

See also https://github.com/powerman/vim-plugin-AnsiEsc