Unify the direction of a normal curve
Here is a script that changes direction based on the difference  of angle between first and last spline points and the x_axis.  Run in edit mode.  You may need to change based on which direction to "unify" to.  As is it unifies all curves in the test file you posted to run right to left.  Change either the angle test or the x_axis direction to make all go left to right for instance.

import bpy
from bpy import context
from mathutils import Vector
from math import degrees, radians
curve_object = context.edit_object
x_axis = Vector((1, 0, 0))
# deselect all 
bpy.ops.curve.select_all(action='DESELECT')
for s in curve_object.data.splines:
    v = (s.points[1].co - s.points[-1].co).xyz

    angle = v.angle(x_axis)
    print(degrees(angle))
    if angle &gt; radians(90):
        for p in s.points:
            p.select = True


bpy.ops.curve.switch_direction()