Skip to content

Commit

Permalink
sort arguments, use true/false instead of 1/0
Browse files Browse the repository at this point in the history
  • Loading branch information
Shreeshrii committed Mar 23, 2019
1 parent c2db272 commit bcb7cf9
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/training/tesstrain_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ else
FONTS_DIR="/usr/share/fonts/"
fi

X_SIZE=3600
DISTORT_IMAGE=false
EXTRACT_FONT_PROPERTIES=false
LINEDATA=true
MAX_PAGES=0
SAVE_BOX_TIFF=0
MY_BOXTIFF_DIR=""
DISTORT_IMAGE=0
OUTPUT_DIR="/tmp/tesstrain/tessdata"
OVERWRITE=0
LINEDATA=0
RUN_SHAPE_CLUSTERING=0
EXTRACT_FONT_PROPERTIES=1
OVERWRITE=false
RUN_SHAPE_CLUSTERING=false
SAVE_BOX_TIFF=false
WORKSPACE_DIR=$(mktemp -d)
X_SIZE=3600

# set TESSDATA_PREFIX as empty, if not defined in environment to avoid an unbound variable
TESSDATA_PREFIX=${TESSDATA_PREFIX:-}
Expand Down Expand Up @@ -166,20 +166,20 @@ parse_flags() {
parse_value "MY_BOXTIFF_DIR" ${ARGV[$j]:-}
i=$j ;;
--distort_image)
DISTORT_IMAGE=1 ;;
DISTORT_IMAGE=true ;;
--output_dir)
parse_value "OUTPUT_DIR" ${ARGV[$j]:-}
i=$j ;;
--overwrite)
OVERWRITE=1 ;;
OVERWRITE=true ;;
--save_box_tiff)
SAVE_BOX_TIFF=1 ;;
SAVE_BOX_TIFF=true ;;
--linedata_only)
LINEDATA=1 ;;
LINEDATA=true ;;
--extract_font_properties)
EXTRACT_FONT_PROPERTIES=1 ;;
EXTRACT_FONT_PROPERTIES=true ;;
--noextract_font_properties)
EXTRACT_FONT_PROPERTIES=0 ;;
EXTRACT_FONT_PROPERTIES=false ;;
--tessdata_dir)
parse_value "TESSDATA_DIR" ${ARGV[$j]:-}
i=$j ;;
Expand Down

1 comment on commit bcb7cf9

@Shreeshrii
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zdenop Please revert this commit.

Please sign in to comment.