#!/bin/bash # Encoding: UTF-8 # :set syntax=sh # #=========================================================================== # Copyright ©MMXX - JSG™ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 3 of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Any knowledge gained by viewing and/or using this software may NOT be used # to file for any 'submarine' patents on applicable algorithmns and/or ideas # or any other method that would undermine the free use and/or distribution # thereof. By viewing and/or using this software you agree to these terms. # If you cannot agree to this then do NOT view and/or use this software. # Shoe Size Selector # Tuned for best display in RedHat 6. # zenity-2.32.0-1.fc14.src.rpm compiled on CentOS 6. # # Display help. if [ "$1" = --help ] then echo echo "^[[1m Shoe Size Selector^[[0m" echo " Usage: shoe-size-selectlor-gui [-e text editor] [ output filename ]" echo exit 1 fi # Width & Girth calculations are tuned to data obtained from DOROTHY Mass Foot Measurement Campaign of Europe in 2010. # Ⅰ Ⅱ Ⅲ Ⅳ Ⅴ Ⅵ Ⅶ Ⅷ Ⅸ Ⅹ Ⅺ <-[Alt.] # A B C D E F G H I ┊ j k <-[UK Width] # AAA AA A B C D E EE EEE 4E 5E <-[US Width] A="33 " ; B="34 " ; C="35 " ; D="36 " ; E="37 " ; F="38⅛" ; G="39¼" ; H="40⅜" ; I="41½" ; J="42¾" ; K="44 " # Width Spacing Factor: ×1.029186=¹⁰√1⅓ wA=3300 ; wB=3396 ; wC=3495 ; wD=3597 ; wE=3702 ; wF=3811 ; wG=3922 ; wH=4036 ; wI=4154 ; wJ=4275 ; wK=4400 # # Ⅲ Ⅴ Ⅶ # N M W # Narrow Meduim Wide N="35 " ; M="37 " ; W="39¼" wN=3495 ; wM=3702 ; wW=3922 # Under the Brannock width system the narrowest width in this range corresponds # to a womens 11B and the widest to a mens 12EEE. While this does not cover the # narrowest of womens widths in the Brannock system it does cover the vast majority # of the narrow widths contained in the Dorothy data. The AAA width percentage for # women in the Brannock system can vary from ~26% for a size 3 to ~29% for a size # 12. This 3% variance for the AAA width is unexceptable but is the inherent # shortcomings of the Brannock width system and there are few if any data points # in the Dorothy data below 33½%. To a lesser extent this is also true for the # mens EEE width with a 2% variation for sizes 4 to 15. The Brannock width system # with its consistent 37½% for the D width across the whole size range is an # improvement over the original system which produced even more radical curves # where 1/12" increment is used to increment the width per ½ size and also widths # between the same size; hence going up by ½ size will also increase the width by # 1 increment. In the Brannock system width is incremented by 1/16" per ½ size # (⅙") and there is a 3/16" spacing betheen widths. So 6/16 = 37½% and this is # what makes the D width percentage consistent across the whole size range. Going # up or down by ½ size will increment the width by ±⅓ or going up/down in width # with a ∓½ size increment respectivey will increment the width by ⅔. In practice # for the most part the Brannock width system works pretty well and widths C & E, # and to a lesser extent B, on either side of D have minor curve deviations but # still produce favorable results. For those widths further away from D the curves # are more radical and the results are less desireable. In this system presented # here width spacing is a consistent fractional increment of the percentages and # efficiently contains almost all Dorothy data points within its boundries. These # width percentages used here may not correspond to the conventional labeling # associated with them so an alternative could be to use Roman numerals. if ! which zenity > /dev/null 2>&1 then printf "\nInstall zenity.\n\n" exit 1 fi # Prompt for output filemane. while : do fname=`zenity --width="400" --entry --title="Shoe Size Selector" --text="Enter output filename." --entry-text="$1"` [ $? -ne 0 ] && exit 1 [ -n "$fname" ] && OutFile="$fname" || OutFile="$1" [ -n "$OutFile" ] && break done # Open file handle for temporary file. TMP=/tmp/shoe-size-selector_$$ if exec 3> $TMP then printf "\n$TMP temporary file created.\n\n" else zenity --error --title="Quitting!" --text="Temp file Can NOT be created.\n$TMP" sleep 1 exit 1 fi # Display message. cat <&3 for value in $VALUES do let cnt++ label=${COLUMNS[$cnt]} [ -z "$label" ] && break printf "% 15b" "${label/_/ }" >&3 case "$label" in 'IT|EU:') case "$System" in Barleycorn) value="$value = 1¼ × [ ${length}mm ÷ 8 + ¾ ] (Foot Length)" ;; 'MondoPoint 5mm') value="$value = 0.16 × ${length}mm (Foot Length)" ;; *) value="$value = 4 × $in\" (Foot Length)" ;; esac ;; CM:) value="$value = 2⅔ × $in\" (Foot Length)" ;; of_Length:) value="${value}%" ;; esac echo " $value" >&3 done } # Save file. saveFile() { SAVE=`zenity --title="File Save Location" --save \ --file-selection --confirm-overwrite --filename="$1"` } # Edit Text File. editFile() { while : do Ed=`zenity --list --title="Edit Text File" --text="Select Editor" \ --width="100" --height="440" --column="Option" $EDITORS` [ $? -ne 0 ] && break which $Ed > /dev/null 2>&1 && break EDITORS=${EDITORS/$Ed/} printf "\n Text editor '$Ed' is not available on this system.\n" sleep 1 done $Ed "$1" } # Create Output and Exit Clean. eXit() { echo >&3 exec 3<&- [ "$1" != save ] && { rm $TMP ; exit 1 ; } Format=`zenity --list --text="Select Output Type" --title="Output File" \ --width="200" --height="225" --column="Format" PDF Text None` case $Format in PDF) saveFile "${OutFile}.pdf" iconv -f utf-8 -t ISO_8859-1//TRANSLIT $TMP | \ enscript -t "$Title" -b "" -f DejaVuSansMono@11 --margins=32:32:0:0 -p - 2> /dev/null | \ ps2pdf - "$SAVE" >&2 if [ $? -eq 0 ] then printf "PDF $SAVE created.\n\n" rm $TMP > /dev/null 2>&1 zenity --title="View" --question --text="Open in Acrobat Reader?" && acroread "$SAVE" zenity --title="Print" --question --text="Print PDF to Default Printer?" && \ lpr "$SAVE" && echo "Sent to Print Queue." else printf "PDF Not Created!\n\n" >&2 sleep 1 exit 1 fi ;; Text) saveFile "${OutFile}.txt" if mv $TMP "$SAVE" > /dev/null 2>&1 then printf "Text ${OutFile}.txt created.\n\n" zenity --question --title="Make Changes ?" --text="Edit ${OutFile}.txt ?" [ $? -eq 0 ] && editFile "$SAVE" zenity --title=Print --question --text="Print Text to Default Printer?" && \ lpr "$SAVE" && echo "Sent to Print Queue." else echo "1;5;31mFailed to Create Text File." >&2 sleep 1 exit 1 fi ;; *|None) rm $TMP > /dev/null 2>&1 ;; esac sleep 1 exit } # Add Title Title=`zenity --entry --title="Shoe Size Selector" --text="Specify document title." --entry-text="${OutFile//_/ }" --width=400` [ $? -ne 0 ] && eXit printf "\n${Title}\n" >&3 ; l=${#Title} ; l=$(($l+1)) ; tildeline=`printf "% ${l}b" "\n"` ; echo ${tildeline// /\~} >&3 # The girth:width aspect ratio between the genders may be somewhat different. # The narrower width 'B (Womens)' may have a less of a decrease in girth # compared to a 'D (Mens)' width. That is a 'B' width may have a thicker # profile whereas a 'D' width may be more spread out. Along with gender # labels with an associated girth factor numerical options are also # provided. The gender:girth ratio probably needs some fine tuning. GGF=`zenity --list --title="Gender | Girth:Width Ratio" --text="Select Option" \ --width="280" --height="555" --column="Option" Male Female Unisex \ 2.40 2.41 2.42 2.43 2.44 2.45 2.46 2.47 2.48 2.49 2.50` [ $? -ne 0 ] && eXit # Gender / Girth:Width Ratio Set case $GGF in Male) gf=2.45 ;; Unisex) gf=2.46 ;; Female) gf=2.47 ;; *) gf=$GGF ;; esac printf " Gender: ${GGF}, $gf Girth:Width Ratio.\n" >&3 # System Selection System=`zenity --list --text="Select Sizing System" --title="Sizing Systems" \ --width="200" --height="255" --column="Systems" Barleycorn "Paris Point" "MondoPoint 5mm" "½cm Last Inc."` [ $? -ne 0 ] && eXit ; printf "\n Sizing System: ${System}\n" >&3 ################## # Size Selection # ################## if [ "$System" = "Paris Point" ] then # Paris Point printf "\n Size, 5%% Toe Room" >&3 COLUMNS=(BR: IT\|EU: FR: Mx: UK: usM: usW: in. mm:) VALUES=`zenity --list --title="Paris Pont Sizes, +5% Toe Room" --width="770" --height="750" \ --text=\ " Select IT|EU Shoe Size Foot Length" \ --column=\ " BR IT|EU FR Mx UK usM usW in. mm" \ " 31 33 34 0⅖ 0.9 1.9 3⅖ 8¼ 209.6" \ " 31½ 33½ 34½ 0⅘ 1.3 2.3 3⅘ 8⅜ 212.7" \ " 32 34 35 1⅕ 1.7 2.7 4⅕ 8½ 215.9" \ " 32½ 34½ 35½ 1⅗ 2.1 3.1 4⅗ 8⅝ 219.1" \ " 33 35 36 2 2½ 3½ 5 8¾ 222.3" \ " 33½ 35½ 36½ 2⅖ 2.9 3.9 5⅖ 8⅞ 225.4" \ " 34 36 37 2⅘ 3.3 4.3 5⅘ 9 228.6" \ " 34½ 36½ 37½ 3⅕ 3.7 4.7 6⅕ 9⅛ 231.8" \ " 35 37 38 3⅗ 4.1 5.1 6⅗ 9¼ 235.0" \ " 35½ 37½ 38½ 4 4½ 5½ 7 9⅜ 238.1" \ " 36 38 39 4⅖ 4.9 5.9 7⅖ 9½ 241.3" \ " 36½ 38½ 39½ 4⅘ 5.3 6.3 7⅘ 9⅝ 244.5" \ " 37 39 40 5⅕ 5.7 6.7 8⅕ 9¾ 247.7" \ " 37½ 39½ 40½ 5⅗ 6.1 7.1 8⅗ 9⅞ 250.8" \ " 38 40 41 6 6½ 7½ 9 10 254.0" \ " 38½ 40½ 41½ 6⅖ 6.9 7.9 9⅖ 10⅛ 257.2" \ " 39 41 42 6⅘ 7.3 8.3 9⅘ 10¼ 260.4" \ " 39½ 41½ 42½ 7⅕ 7.7 8.7 10⅕ 10⅜ 263.5" \ " 40 42 43 7⅗ 8.1 9.1 10⅗ 10½ 266.7" \ " 40½ 42½ 43½ 8 8½ 9½ 11 10⅝ 269.9" \ " 41 43 44 8⅖ 8.9 9.9 11⅖ 10¾ 273.1" \ " 41½ 43½ 44½ 8⅘ 9.3 10.3 11⅘ 10⅞ 276.2" \ " 42 44 45 9⅕ 9.7 10.7 12⅕ 11 279.4" \ " 42½ 44½ 45½ 9⅗ 10.1 11.1 12⅗ 11⅛ 282.6" \ " 43 45 46 10 10½ 11½ 13 11¼ 285.8" \ " 43½ 45½ 46½ 10⅖ 10.9 11.9 13⅖ 11⅜ 288.9" \ " 44 46 47 10⅘ 11.3 12.3 13⅘ 11½ 292.1" \ " 44½ 46½ 47½ 11⅕ 11.7 12.7 14⅕ 11⅝ 295.3" \ " 45 47 48 11⅗ 12.1 13.1 14⅗ 11¾ 298.5" \ " 45½ 47½ 48½ 12 12½ 13½ 15 11⅞ 301.6" \ " 46 48 49 12⅖ 12.9 13.9 15⅖ 12 304.8" \ " 46½ 48½ 49½ 12⅘ 13.3 14.3 15⅘ 12⅛ 308.0" \ " 47 49 50 13⅕ 13.7 14.7 16⅕ 12¼ 311.2" \ " 47½ 49½ 50½ 13⅗ 14.1 15.1 16⅗ 12⅜ 314.3" \ " 48 50 51 14 14½ 15½ 17 12½ 317.5"` [ $? -ne 0 -o -z "$VALUES" ] && eXit Parse elif [ "$System" = Barleycorn ] then # Barleycorn printf "\n Size, 6⅔%% Toe Room" >&3 COLUMNS=(Mx: UK: usM: usW: BR: IT\|EU: FR: mm: in. Last.mm:) VALUES=`zenity --list --title="Barleycorn Sizes, +6⅔% Toe Room" --width="910" --height="750" \ --text=\ "Select Mx, UK, usM or usW Size Foot Length" \ --column=\ " Mx UK usM usW BR IT|EU FR mm in. Last.mm" \ " ─½ 0 1 2½ 29⅞ 31⅞ 32⅞ 198 7.80 211.2" \ " 0 ½ 1½ 3 30½ 32½ 33½ 202 7.95 215.5" \ " ½ 1 2 3½ 31⅛ 33⅛ 34⅛ 206 8.11 219.7" \ " 1 1½ 2½ 4 31¾ 33¾ 34¾ 210 8.27 224 " \ " 1½ 2 3 4½ 32⅜ 34⅜ 35⅜ 214 8.43 228.3" \ " 2 2½ 3½ 5 33 35 36 218 8.58 232.5" \ " 2½ 3 4 5½ 33⅝ 35⅝ 36⅝ 222 8.74 236.8" \ " 3 3½ 4½ 6 34¼ 36¼ 37¼ 226 8.90 241.1" \ " 3½ 4 5 6½ 34⅞ 36⅞ 37⅞ 230 9.06 245⅓ " \ " 4 4½ 5½ 7 35½ 37½ 38½ 234 9.21 249.6" \ " 4½ 5 6 7½ 36⅛ 38⅛ 39⅛ 238 9.37 253.9" \ " 5 5½ 6½ 8 36¾ 38¾ 39¾ 242 9.53 258.1" \ " 5½ 6 7 8½ 37⅜ 39⅜ 40⅜ 246 9.69 262.4" \ " 6 6½ 7½ 9 38 40 41 250 9.84 266⅔ " \ " 6½ 7 8 9½ 38⅝ 40⅝ 41⅝ 254 10.00 270.9" \ " 7 7½ 8½ 10 39¼ 41¼ 42¼ 258 10.16 275.2" \ " 7½ 8 9 10½ 39⅞ 41⅞ 42⅞ 262 10.31 279.5" \ " 8 8½ 9½ 11 40½ 42½ 43½ 266 10.47 283.7" \ " 8½ 9 10 11½ 41⅛ 43⅛ 44⅛ 270 10.63 288 " \ " 9 9½ 10½ 12 41¾ 43¾ 44¾ 274 10.79 292.3" \ " 9½ 10 11 12½ 42⅜ 44⅜ 45⅜ 278 10.94 296.5" \ " 10 10½ 11½ 13 43 45 46 282 11.10 300.8" \ " 10½ 11 12 13½ 43⅝ 45⅝ 46⅝ 286 11.26 305.1" \ " 11 11½ 12½ 14 44¼ 46¼ 47¼ 290 11.42 309⅓ " \ " 11½ 12 13 14½ 44⅞ 46⅞ 47⅞ 294 11.57 313.6" \ " 12 12½ 13½ 15 45½ 47½ 48½ 298 11.73 317.9" \ " 12½ 13 14 15½ 46⅛ 48⅛ 49⅛ 302 11.89 322.1" \ " 13 13½ 14½ 16 46¾ 48¾ 49¾ 306 12.05 326.4" \ " 13½ 14 15 16½ 47⅜ 49⅜ 50⅜ 310 12.20 330.7" \ " 14 14½ 15½ 17 48 50 51 314 12.36 334.9" \ " 14½ 15 16 17½ 48⅝ 50⅝ 51⅝ 318 12.52 339.2"` [ $? -ne 0 -o -z "$VALUES" ] && eXit Parse elif [ "$System" = "MondoPoint 5mm" ] then # Mondopoint 5mm printf "\n Size, 6⅔%% Toe Room" >&3 COLUMNS=(mm: BR: IT\|EU: FR: Mx: UK: usM: usW: in. Last.mm:) VALUES=`zenity --list --title="MondoPoint Sizes, +6⅔% Toe Room" --width="940" --height="750" \ --text=\ "Select MondoPoint Size Foot Length" \ --column=\ " mm BR IT|EU FR Mx UK usM usW in. Last.mm" \ " 205 30.8 32.8 33.8 0.2 0.7 1.7 3.2 8.07 218⅔" \ " 210 31.6 33.6 34.6 0.9 1.4 2.4 3.9 8.27 224 " \ " 215 32.4 34.4 35.4 1.5 2.0 3.0 4.5 8.46 229⅓" \ " 220 33.2 35.2 36.2 2.2 2.7 3.7 5.2 8.66 234⅔" \ " 225 34.0 36.0 37.0 2.8 3.3 4.3 5.8 8.86 240 " \ " 230 34.8 36.8 37.8 3.4 3.9 4.9 6.4 9.06 245⅓" \ " 235 35.6 37.6 38.6 4.1 4.6 5.6 7.1 9.25 250⅔" \ " 240 36.4 38.4 39.4 4.7 5.2 6.2 7.7 9.45 256 " \ " 245 37.2 39.2 40.2 5.4 5.9 6.9 8.4 9.65 261⅓" \ " 250 38.0 40.0 41.0 6.0 6.5 7.5 9.0 9.84 266⅔" \ " 255 38.8 40.8 41.8 6.6 7.1 8.1 9.6 10.04 272 " \ " 260 39.6 41.6 42.6 7.3 7.8 8.8 10.3 10.24 277⅓" \ " 265 40.4 42.4 43.4 7.9 8.4 9.4 10.9 10.43 282⅔" \ " 270 41.2 43.2 44.2 8.6 9.1 10.1 11.6 10.63 288 " \ " 275 42.0 44.0 45.0 9.2 9.7 10.7 12.2 10.83 293⅓" \ " 280 42.8 44.8 45.8 9.8 10.3 11.3 12.8 11.02 298⅔" \ " 285 43.6 45.6 46.6 10.5 11.0 12.0 13.5 11.22 304 " \ " 290 44.4 46.4 47.4 11.1 11.6 12.6 14.1 11.42 309⅓" \ " 295 45.2 47.2 48.2 11.8 12.3 13.3 14.8 11.61 314⅔" \ " 300 46.0 48.0 49.0 12.4 12.9 13.9 15.4 11.81 320 " \ " 305 46.8 48.8 49.8 13.0 13.5 14.5 16.0 12.01 325⅓" \ " 310 47.6 49.6 50.6 13.7 14.2 15.2 16.7 12.20 330⅔" \ " 315 48.4 50.4 51.4 14.3 14.8 15.8 17.3 12.40 336 " \ " 320 49.2 51.2 52.2 15.0 15.5 16.5 18.0 12.60 341⅓"` [ $? -ne 0 -o -z "$VALUES" ] && eXit Parse elif [ "$System" = "½cm Last Inc." ] then # ½ Centimeter Increment printf "\n Size, 5%% Toe Room" >&3 COLUMNS=(CM: BR: IT\|EU: FR: Mx: UK: usM: usW: in. mm:) VALUES=`zenity --list --title="½ Centimeter Sizes, +5% Toe Room" --width="920" --height="750" \ --text=\ "Select ½ CM Size Foot Length" \ --column=\ " CM BR IT|EU FR Mx UK usM usW in. mm" \ " 22 31 33 34 0.4 0.9 1.9 3.4 8¼ 210.5" \ " 22½ 31¾ 33¾ 34¾ 1.0 1.5 2.5 4.0 8.4375 214.3" \ " 23 32½ 34½ 35½ 1.6 2.1 3.1 4.6 8⅝ 219.1" \ " 23½ 33¼ 35¼ 36¼ 2.2 2.7 3.7 5.2 8.8125 223.8" \ " 24 34 36 37 2.8 3.3 4.3 5.8 9 228.6" \ " 24½ 34¾ 36¾ 37¾ 3.4 3.9 4.9 6.4 9.1875 233.4" \ " 25 35½ 37½ 38½ 4.0 4.5 5.5 7.0 9⅜ 238.1" \ " 25½ 36¼ 38¼ 39¼ 4.6 5.1 6.1 7.6 9.5625 242.9" \ " 26 37 39 40 5.2 5.7 6.7 8.2 9¾ 247.7" \ " 26½ 37¾ 39¾ 40¾ 5.8 6.3 7.3 8.8 9.9375 252.4" \ " 27 38½ 40½ 41½ 6.4 6.9 7.9 9.4 10⅛ 257.2" \ " 27½ 39¼ 41¼ 42¼ 7.0 7.5 8.5 10.0 10.3125 261.9" \ " 28 40 42 43 7.6 8.1 9.1 10.6 10½ 266.7" \ " 28½ 40¾ 42¾ 43¾ 8.2 8.7 9.7 11.2 10.6875 271.5" \ " 29 41½ 43½ 44½ 8.8 9.3 10.3 11.8 10⅞ 276.2" \ " 29½ 42¼ 44¼ 45¼ 9.4 9.9 10.9 12.4 11.0625 281.0" \ " 30 43 45 46 10.0 10.5 11.5 13.0 11¼ 285.8" \ " 30½ 43¾ 45¾ 46¾ 10.6 11.1 12.1 13.6 11.4375 290.5" \ " 31 44½ 46½ 47½ 11.2 11.7 12.7 14.2 11⅝ 295.3" \ " 31½ 45¼ 47¼ 48¼ 11.8 12.3 13.3 14.8 11.8125 300.0" \ " 32 46 48 49 12.4 12.9 13.9 15.4 12 304.8" \ " 32½ 46¾ 48¾ 49¾ 13.0 13.5 14.5 16.0 12.1875 309.6" \ " 33 47½ 49½ 50½ 13.6 14.1 15.1 16.6 12⅜ 314.3" \ " 33½ 48¼ 50¼ 51¼ 14.2 14.7 15.7 17.2 12.5625 319.1"` [ $? -ne 0 -o -z "$VALUES" ] && eXit Parse else eXit fi ########## # Widths # ########## # Width Selection COLUMNS=(of_Length: US: UK: Label: Alt.) VALUES=`zenity --list --title="Shoe Widths" --text="Select Width (Percent of Foot Length)" \ --width="525" --height="560" --column="Percent US UK Label Alt." \ " $A AAA A X_Slim I" \ " $B AA B Slim II" \ " $C A C Narrow III" \ " $D B D MedNar IV" \ " $E C E Medium V" \ " $F D F MedWid VI" \ " $G E G Wide VII" \ " $H EE H X_Wide VIII" \ " $I EEE I 2X_Wide IX" \ " $J 4E j 3X_Wide X" \ " $K 5E k 4X_Wide XI" \ " $N Nar N Narrow III" \ " $M Med M Medium V" \ " $W Wid W Wide VII"` [ $? -ne 0 -o -z "$VALUES" ] && eXit save printf "\n Width" >&3 Parse # Width factor selection case $width in A) width=$wA ;; B) width=$wB ;; C) width=$wC ;; D) width=$wD ;; E) width=$wE ;; F) width=$wF ;; G) width=$wG ;; H) width=$wH ;; I) width=$wI ;; j) width=$wJ ;; k) width=$wK ;; N) width=$wN ;; M) width=$wM ;; W) width=$wW ;; esac # Calculate and Print MondoPoint Length, Width, and Girth Values. [ ${#length} -gt 3 ] && l=${length/./} || l="${length}0" w=$(( ($width * $l / 1000 + 5) / 10 )) ; c=$(( ${#w} - 1 )) gf=${gf/./} ; g=$(( ($l * $width * $gf / 100000 + 5) / 10 )) b=$(( (4 * $l * $width * $gf / 387409 + 5) / 10 )) printf "\n MondoPoint\n" >&3 echo " Length: ${l:0:3}.${l:3:1} mm" >&3 printf " Width: " >&3 ; printf "% 9b" "${w:0:$c}.${w:$c:1} mm\n" >&3 echo " Girth: ${g:0:3}.${g:3:1} mm" >&3 echo "Weight Bearing: ${b:0:3}.${b:3:1} mm, ~+3¼%" >&3 # Shoe/Boot Style Style=`zenity --list --title="Shoe Style" --text="Select Style" \ --width="250" --height="750" --column="Styles" $STYLES` [ $? -ne 0 ] && eXit save Style=${Style//_/ } ; printf "\n Style: $Style\n" >&3 case "$Style" in 'Ski Boots') ;; *Boots|Ropers|Lacers) Shaft=`zenity --list --title="Shaft Heights" --text="Select Shaft Height" \ --width="200" --height="750" --column="Inches" $IN` [ $? -ne 0 ] && eXit save ; echo " Shaft Height: ${Shaft} in." >&3 # Shaft Info case "$Style" in Cow*Boots) shaft_mat=`zenity --list --title="Shaft Material" --text="Select Material" \ --width="250" --height="750" --column="Colors" $MATERIAL` [ $? -ne 0 ] && eXit save ; echo " Shaft Material: ${shaft_mat//_/ }" >&3 shaft_color=`zenity --list --title="Shaft Colors" --text="Select Color" \ --width="225" --height="750" --column="Colors" $COLORS` [ $? -ne 0 ] && eXit save ; echo " Shaft Color: ${shaft_color//_/ }" >&3 ;; *) ;; esac ;; *) ;; esac # Heel Style heel_style=`zenity --list --title="Heel Style" --text="Select Heel Style" \ --width="220" --height="660" --column="Style" $HEELS` [ $? -ne 0 ] && eXit save ; echo " Heel Style: ${heel_style//_/ }" >&3 # Heel Height [ "$System" = "Paris Point" -a "$GGF" = Female ] && CM="$St $CM" value=`zenity --list --title="Heel Heights" --text="Select Heel Height" \ --width="150" --height="750" --column="CM" $CM` [ $? -ne 0 ] && eXit save ; printf " Heel Height: " >&3 l=${#value} if [ $l -gt 3 ] then c=$(($l-5)) value=${value:5:$c} echo "${value} mm = 3 × IT|EU , ~71% of Metatarsal Length." >&3 echo " (The Differential of the Ball of Foot Contact to Rear of Heel Plateau)" >&3 echo " Geometry: Heel Plateau ~33°, Arch ~33°, Pitch ~66°" >&3 else echo "${value} cm" >&3 fi # Toe Box Shape toe_shape=`zenity --list --title="Toe Box Shapes" --text="Select Toe Box Shape" \ --width="220" --height="525" --column="Shapes" $TOEBOX` [ $? -ne 0 ] && eXit save ; echo " Toe Box Shape: ${toe_shape//_/ }" >&3 # Upper Material upper_mat=`zenity --list --title="Shoe Upper Material" --text="Select Upper Material" \ --width="200" --height="750" --column="Upper Material" $MATERIAL` [ $? -ne 0 ] && eXit save ; echo " Upper Material: ${upper_mat//_/ }" >&3 # Shoe Color shoe_color=`zenity --list --title="Shoe Colors" --text="Select Color" \ --width="225" --height="750" --column="Colors" $COLORS` [ $? -ne 0 ] && eXit save ; echo " Color: ${shoe_color//_/ }" >&3 # Sole Type sole_type=`zenity --list --title="Sole Types" --text="Select Sole Type" \ --width="200" --height="575" --column="Types" $SOLES` [ $? -ne 0 ] && eXit save ; echo " Sole Type: ${sole_type//_/ }" >&3 # Sole/Heel Color printf "Sole and/or Heel Color: " >&3 # Select a Pre-Defined Color while : do COLOR=`zenity --list --title="Sole and/or Heel Color" --text="Select Color" \ --width="350" --height="700" --column="Colors" Custom \ "#000000 Black" \ "#603000 Dark Brown" \ "#904800 Brown" \ "#C06000 Tan Brown" \ "#F4DA92 Light Tan" \ "#50C878 Emerald Green" \ "#269A26 Light Forest Green" \ "#208040 Med. Forest Green" \ "#1A664C Dark Forest Green" \ "#A0E6C4 Light Blue Green" \ "#00CCCC Light Turquoise" \ "#009B97 Turquoise" \ "#5FCDB7 Mint" \ "#D4E6F8 Arctic Blue" \ "#3DA1D2 Ice Blue" \ "#80D4FE Sky Blue" \ "#7FAAFF Light Sky Blue" \ "#00C0FF Deep Sky Blue" \ "#5CB8E6 SM Blue" \ "#005DAB Azure Blue" \ "#1930AB Brilliant Blue" \ "#3F00FF Ultramarine Blue" \ "#2D2D5A Navy Blue" \ "#3C3B6E US Flag Blue" \ "#B22234 US Flag Red" \ "#B0000D Red" \ "#CC1424 Fire Engine Red" \ "#900E16 Dark Red" \ "#C0142E Walk On Red" \ "#FFAC5A Light Orange" \ "#FFC080 Peach" \ "#FFDAC0 Flesh" \ "#E6C83A Gold" \ "#CCCCCC Silver (80% Gray)" \ "#6F000E Burgundy" \ "#FF28C8 Hot Pink" \ "#ED84B6 Soft Pink" \ "#FEB4D8 Bubble Bum" \ "#FFD4FF Pastel Pink" \ "#B893BC Lilac" \ "#8000C0 Purple" \ "#C894FE Light Violet" \ "#8614C2 Med. Violet" \ "#5D2C68 Dark Violet" \ "#540080 Ultra Violet" \ "#4A0080 Indigo" \ "#FFFFFF 100% White" \ "#FF0000 100% Red" \ "#FF8000 100% Orange" \ "#FFFF00 100% Yellow" \ "#80FF00 100% Yellow Green" \ "#00FF00 100% Green" \ "#00FF80 100% Cyan Green" \ "#00FFFF 100% Cyan" \ "#0080FF 100% Cyan Blue" \ "#0000FF 100% Blue" \ "#8000FF 100% Lavender Violet" \ "#FF00FF 100% Magenta" \ "#FF0080 100% Fuchsia"` [ $? -ne 0 ] && break [ "$COLOR" = Custom ] && break if zenity --title=View --question --text="Display Color?" then ppmmake rgb:${COLOR:1:2}/${COLOR:3:2}/${COLOR:5:2} 300 300 | display -title "$COLOR" zenity --title=Confirm --question --text="Color OK?" && break else break fi done # Select Custom Color if [ ${#COLOR} -lt 6 ] then echo "Not Set." >&3 elif [ "$COLOR" = Custom ] then COLOR=`zenity --color-selection --color "#800000" --title="Select Custom Color"` if [ $? -eq 0 ] then # Added, output is 48-Bit Triplet. COLOR=${COLOR:0:3}${COLOR:5:2}${COLOR:9:2} ; echo ${COLOR^^} >&3 else echo "Not Set." >&3 fi else echo $COLOR >&3 fi # Additional Features features=`zenity --list --multiple --title="Features" --text="Ctrl-Click for Multiple Selections." \ --width="200" --height="750" --column="Options" --separator=" " $FEATURES` [ $? -ne 0 ] && eXit save line="" ; flst="" for item in $features do ll=${#line} ; il=${#item} if [ $(($ll + 2 + $il)) -lt 80 ] then [ -n "$line" ] && sp=", " || sp="" line="${line}${sp}${item//_/ }" else [ -n "$flst" ] && r=",\n" || r="" flst="${flst}${r}${line}" line="${item//_/ }" fi done [ -n "$line" ] && { r=",\n" ; line="${line}." ; } || r="." printf "\nFeatures:\n${flst}${r}${line}\n" >&3 # Add Notes. if zenity --title=Notes --question --text="Add any Notes?" then printf "\nNOTE: End text with a new line.\n" printf "\nNotes:\n" >&3 zenity --text-info --editable --title="Notes" --height="480" --width="768" >&3 fi eXit save exit 1