migvel / color_trace

Traces multiple color images using potrace. This is similar to Inkscape's Trace Bitmap function.
GNU General Public License v2.0
98 stars 40 forks source link

Long path not possible until this fix is added. #13

Open targor opened 5 years ago

targor commented 5 years ago

When providing an output path without quotes, the program does not recognize the argument. When quotes are provided when the output file is saved in the wrong directory, because the quotes are interpreted as part of the path.

I am not a python expert but this way it works just fine

Add this code to the main function ( def main(args=None): ) to line 883:

output_pattern =output_pattern.strip('\"\'')
inputs_outputs = zip(*get_inputs_outputs(args.input, output_pattern))

This will let the script work with long paths quoted.

After that the script can be called with quotes without problems e.g. : python3 color_trace_multi.py -i "path1" -o "path2" -q as -c 32 -s