Commit 2d0450fd authored by PENGUEN Julien's avatar PENGUEN Julien

amélioration visuelle de l'affichage de l'HELP

parent 469b83df
......@@ -7,6 +7,8 @@
INPUT_FILE_SURVEYS=./template_inputs/surveys.dat
INPUT_FILE_AREAS=./template_inputs/areas.csv
VOLUME_MOUNT="NONE"
SCRIPT_VERSION=0.1
##########
......@@ -32,12 +34,12 @@ RESOLUTION_BY_COL=500
# DIVERS #
##########
VOLUME_MOUNT="NONE"
##########
# COLORS #
##########
RED='\033[0;31m' #Red
GREEN='\033[0;32m' # Green
COLOR_OFF='\033[0m' # Text Reset
UNDERLINE_BEGIN='\e[4m'
UNDERLINE_END='\e[24m'
BOLD_BEGIN='\e[1m'
BOLD_END='\e[22m'
ITALIC_BEGIN='\e[3m'
ITALIC_END='\e[23m'
......@@ -121,7 +121,7 @@ To see all options available for a good use of `photos_montage_aladin.sh` (or `p
```
./photos_montage_aladin.sh -h OR --help
```
2. Get photos_montage_aladin image version available on Aladin server and on localhost:
2. Get photos_montage_aladin image version available on Aladin server and on localhost and Options by default define on .env file:
```
./photos_montage_aladin.sh -i OR --infos
```
......
......@@ -151,38 +151,61 @@ function_message()
echo ""
echo "------------------------------------"
echo ""
echo "use : ./photos_montage_aladin.sh [options] [others]"
echo ""
echo ""
echo "OPTIONS:"
echo ""
echo "-i, --infos give informations about versions available on aladin server"
echo " and about photos_montage_aladin image present on localhost"
echo "-b version, --build VERSION build photos_montage_aladin image with selected version"
echo "--select VERSION run photos_montage_aladin with selected version number"
echo "--force-all re-run all areas in input csv"
echo "--force AREA re-run for the area, the area must be in input csv"
echo "-u, --update update photos_montage_aladin image version"
echo "-rm version, --remove VERSION remove photos_montage_aladin image with selected version"
echo "-h, --help show this help message and exit"
echo "-v, --version give photos_montage_aladin.sh current version number"
echo ""
echo ""
echo "OTHERS: (available only with no option OR with --select option)"
echo ""
echo "--survey FILE run photos_montage_aladin with this surveys file instead of "
echo "the default file define on .env file. the survey file must be on format '.dat'"
echo "--area FILE run photos_montage_aladin with this areas file instead of "
echo "the default file define on .env file. the area file must be on format '.csv'"
echo ""
echo "--angular NUMBER run photos_montage_aladin with this angular dimension value instead of "
echo "the default angular value define on .env file. the angular value must be on second of arc"
echo "--resolution_col NUMBER run photos_montage_aladin with this number of pixel by columns for the Image Magick montages"
echo "--resolution_line NUMBER run photos_montage_aladin with this number of pixel by lines for the Image Magick montages"
echo "--nb_tile_col NUMBER run photos_montage_aladin with this number of tiles by columns for the Image Magick montages"
echo "--nb_tile_line NUMBER run photos_montage_aladin with this number of tiles by lines for the Image Magick montages"
echo "--mount PATH run photos_montage_aladin with a volume mounted on docker container repository /mnt"
echo ""
echo -e "use : ${BOLD_BEGIN}./photos_montage_aladin.sh${BOLD_END} [${ITALIC_BEGIN}OPTIONS${ITALIC_END}] [${ITALIC_BEGIN}OTHERS${ITALIC_END}]"
echo -e ""
echo -e ""
echo -e "[${ITALIC_BEGIN}OPTIONS${ITALIC_END}]:"
echo -e ""
echo -e "${BOLD_BEGIN}-i${BOLD_END}, ${BOLD_BEGIN}--infos${BOLD_END} give informations about versions available on aladin server, "
echo -e " about photos_montage_aladin image present on localhost and about "
echo -e " Options by default define on .env file"
echo -e ""
echo -e "${BOLD_BEGIN}-b${BOLD_END} ${ITALIC_BEGIN}VERSION${ITALIC_END}, ${BOLD_BEGIN}--build${BOLD_END} ${ITALIC_BEGIN}VERSION${ITALIC_END} build photos_montage_aladin image with selected ${ITALIC_BEGIN}VERSION${ITALIC_END}"
echo -e ""
echo -e "${BOLD_BEGIN}--select${BOLD_END} ${ITALIC_BEGIN}VERSION${ITALIC_END} run photos_montage_aladin with selected ${ITALIC_BEGIN}VERSION${ITALIC_END}"
echo -e ""
echo -e "${BOLD_BEGIN}--force-all ${BOLD_END} re-run all areas in input csv"
echo -e ""
echo -e "${BOLD_BEGIN}--force${BOLD_END} ${ITALIC_BEGIN}AREA${ITALIC_END} re-run for the ${ITALIC_BEGIN}AREA${ITALIC_END}, the ${ITALIC_BEGIN}AREA${ITALIC_END} must be in input csv"
echo -e ""
echo -e "${BOLD_BEGIN}-u${BOLD_END}, ${BOLD_BEGIN}--update ${BOLD_END} update photos_montage_aladin image version"
echo -e ""
echo -e "${BOLD_BEGIN}-rm${BOLD_END} ${ITALIC_BEGIN}VERSION${ITALIC_END}, ${BOLD_BEGIN}--remove${BOLD_END} ${ITALIC_BEGIN}VERSION${ITALIC_END} remove photos_montage_aladin image with selected ${ITALIC_BEGIN}VERSION${ITALIC_END}"
echo -e ""
echo -e "${BOLD_BEGIN}-h, ${BOLD_BEGIN}--help${BOLD_END} show this help message and exit"
echo -e ""
echo -e "${BOLD_BEGIN}-v, ${BOLD_BEGIN}--version${BOLD_END} give photos_montage_aladin.sh current version number"
echo -e ""
echo -e ""
echo -e "[${ITALIC_BEGIN}OTHERS${ITALIC_END}]: (available only with ${BOLD_BEGIN}no option${BOLD_END} OR with ${BOLD_BEGIN}--select option${BOLD_END})"
echo -e ""
echo -e "${BOLD_BEGIN}--survey${BOLD_END} ${ITALIC_BEGIN}FILE${ITALIC_END} run photos_montage_aladin with this surveys ${ITALIC_BEGIN}FILE${ITALIC_END} instead of "
echo -e " the default file define on .env file. The survey ${ITALIC_BEGIN}FILE${ITALIC_END}"
echo -e " must be on format '.dat'"
echo -e ""
echo -e "${BOLD_BEGIN}--area${BOLD_END} ${ITALIC_BEGIN}FILE${ITALIC_END} run photos_montage_aladin with this areas ${ITALIC_BEGIN}FILE${ITALIC_END} instead of "
echo -e " the default file define on .env file. the area ${ITALIC_BEGIN}FILE${ITALIC_END}"
echo -e " must be on format '.csv'"
echo -e ""
echo -e "${BOLD_BEGIN}--angular${BOLD_END} ${ITALIC_BEGIN}NUMBER${ITALIC_END} run photos_montage_aladin with this angular dimension value (${ITALIC_BEGIN}NUMBER${ITALIC_END}) "
echo -e " instead of the default angular value define on .env file."
echo -e " the angular value (${ITALIC_BEGIN}NUMBER${ITALIC_END}) must be on second of arc"
echo -e ""
echo -e "${BOLD_BEGIN}--resolution_col${BOLD_END} ${ITALIC_BEGIN}NUMBER${ITALIC_END} run photos_montage_aladin with this ${ITALIC_BEGIN}NUMBER${ITALIC_END} of pixel by columns "
echo -e " for the Image Magick montages"
echo -e ""
echo -e "${BOLD_BEGIN}--resolution_line${BOLD_END} ${ITALIC_BEGIN}NUMBER${ITALIC_END} run photos_montage_aladin with this ${ITALIC_BEGIN}NUMBER${ITALIC_END} of pixel by lines "
echo -e " for the Image Magick montages"
echo -e ""
echo -e "${BOLD_BEGIN}--nb_tile_col${BOLD_END} ${ITALIC_BEGIN}NUMBER${ITALIC_END} run photos_montage_aladin with this ${ITALIC_BEGIN}NUMBER${ITALIC_END} of tiles by columns "
echo -e " for the Image Magick montages"
echo -e ""
echo -e "${BOLD_BEGIN}--nb_tile_line${BOLD_END} ${ITALIC_BEGIN}NUMBER${ITALIC_END} run photos_montage_aladin with this ${ITALIC_BEGIN}NUMBER${ITALIC_END} of tiles by lines "
echo -e " for the Image Magick montages"
echo -e ""
echo -e "${BOLD_BEGIN}--mount${BOLD_END} ${ITALIC_BEGIN}PATH${ITALIC_END} run photos_montage_aladin with a volume mounted (${ITALIC_BEGIN}PATH${ITALIC_END}) "
echo -e " on docker container repository /mnt "
echo -e ""
fi
}
......@@ -1494,7 +1517,7 @@ case ${sort_arg_keys[0]} in
echo ""
echo "-------------------------------------------------------------------"
echo " aladin stable versions available on :"
echo -e " ${UNDERLINE_BEGIN}aladin stable versions available on :${UNDERLINE_END}"
echo ""
echo -e "${RED}- Aladin server : ${ALADIN_URL}${RED}"
echo -e "${GREEN}- Localhost${COLOR_OFF}"
......@@ -1519,8 +1542,7 @@ case ${sort_arg_keys[0]} in
echo ""
echo "-------------------------------------------------------------------"
echo ""
echo " Options by default define on .env file:"
echo -e " ${UNDERLINE_BEGIN}Options by default define on .env file:${UNDERLINE_END}"
echo ""
echo "- INPUT_FILE_SURVEYS: ${INPUT_FILE_SURVEYS}"
echo "- INPUT_FILE_AREAS: ${INPUT_FILE_AREAS}"
......@@ -1529,13 +1551,11 @@ case ${sort_arg_keys[0]} in
echo "- NB_TILE_BY_COL: ${NB_TILE_BY_COL}"
echo "- RESOLUTION_BY_LINE: ${RESOLUTION_BY_LINE}"
echo "- RESOLUTION_BY_COL: ${RESOLUTION_BY_COL}"
echo "- VOLUME_MOUNT: ${VOLUME_MOUNT}"
echo ""
echo "-------------------------------------------------------------------"
echo ""
;;
"-v"|"--version")
......
......@@ -148,42 +148,64 @@ function_message()
fi
if [[ "$type_message" == "TYPE_VAL_ERROR" || "$type_message" == "TYPE_HELP" || "$type_message" == "TYPE_UNKNOWN" ]]; then
echo ""
echo "------------------------------------"
echo ""
echo "use : ./photos_montage_aladin_osx.sh [options] [others]"
echo ""
echo ""
echo "OPTIONS:"
echo ""
echo "-i, --infos give informations about versions available on aladin server"
echo " and about photos_montage_aladin image present on localhost"
echo "-b version, --build VERSION build photos_montage_aladin image with selected version"
echo "--select VERSION run photos_montage_aladin with selected version number"
echo "--force-all re-run all areas in input csv"
echo "--force AREA re-run for the area, the area must be in input csv"
echo "-u, --update update photos_montage_aladin image version"
echo "-rm version, --remove VERSION remove photos_montage_aladin image with selected version"
echo "-h, --help show this help message and exit"
echo "-v, --version give photos_montage_aladin.sh current version number"
echo ""
echo ""
echo "OTHERS: (available only with no option OR with --select option)"
echo ""
echo "--survey FILE run photos_montage_aladin with this surveys file instead of "
echo "the default file define on .env file. the survey file must be on format '.dat'"
echo "--area FILE run photos_montage_aladin with this areas file instead of "
echo "the default file define on .env file. the area file must be on format '.csv'"
echo ""
echo "--angular NUMBER run photos_montage_aladin with this angular dimension value instead of "
echo "the default angular value define on .env file. the angular value must be on second of arc"
echo "--resolution_col NUMBER run photos_montage_aladin with this number of pixel by columns for the Image Magick montages"
echo "--resolution_line NUMBER run photos_montage_aladin with this number of pixel by lines for the Image Magick montages"
echo "--nb_tile_col NUMBER run photos_montage_aladin with this number of tiles by columns for the Image Magick montages"
echo "--nb_tile_line NUMBER run photos_montage_aladin with this number of tiles by lines for the Image Magick montages"
echo "--mount PATH run photos_montage_aladin with a volume mounted on docker container repository /mnt"
echo ""
echo -e "use : ${BOLD_BEGIN}./photos_montage_aladin.sh${BOLD_END} [${ITALIC_BEGIN}OPTIONS${ITALIC_END}] [${ITALIC_BEGIN}OTHERS${ITALIC_END}]"
echo -e ""
echo -e ""
echo -e "[${ITALIC_BEGIN}OPTIONS${ITALIC_END}]:"
echo -e ""
echo -e "${BOLD_BEGIN}-i${BOLD_END}, ${BOLD_BEGIN}--infos${BOLD_END} give informations about versions available on aladin server, "
echo -e " about photos_montage_aladin image present on localhost and about "
echo -e " Options by default define on .env file"
echo -e ""
echo -e "${BOLD_BEGIN}-b${BOLD_END} ${ITALIC_BEGIN}VERSION${ITALIC_END}, ${BOLD_BEGIN}--build${BOLD_END} ${ITALIC_BEGIN}VERSION${ITALIC_END} build photos_montage_aladin image with selected ${ITALIC_BEGIN}VERSION${ITALIC_END}"
echo -e ""
echo -e "${BOLD_BEGIN}--select${BOLD_END} ${ITALIC_BEGIN}VERSION${ITALIC_END} run photos_montage_aladin with selected ${ITALIC_BEGIN}VERSION${ITALIC_END}"
echo -e ""
echo -e "${BOLD_BEGIN}--force-all ${BOLD_END} re-run all areas in input csv"
echo -e ""
echo -e "${BOLD_BEGIN}--force${BOLD_END} ${ITALIC_BEGIN}AREA${ITALIC_END} re-run for the ${ITALIC_BEGIN}AREA${ITALIC_END}, the ${ITALIC_BEGIN}AREA${ITALIC_END} must be in input csv"
echo -e ""
echo -e "${BOLD_BEGIN}-u${BOLD_END}, ${BOLD_BEGIN}--update ${BOLD_END} update photos_montage_aladin image version"
echo -e ""
echo -e "${BOLD_BEGIN}-rm${BOLD_END} ${ITALIC_BEGIN}VERSION${ITALIC_END}, ${BOLD_BEGIN}--remove${BOLD_END} ${ITALIC_BEGIN}VERSION${ITALIC_END} remove photos_montage_aladin image with selected ${ITALIC_BEGIN}VERSION${ITALIC_END}"
echo -e ""
echo -e "${BOLD_BEGIN}-h, ${BOLD_BEGIN}--help${BOLD_END} show this help message and exit"
echo -e ""
echo -e "${BOLD_BEGIN}-v, ${BOLD_BEGIN}--version${BOLD_END} give photos_montage_aladin.sh current version number"
echo -e ""
echo -e ""
echo -e "[${ITALIC_BEGIN}OTHERS${ITALIC_END}]: (available only with ${BOLD_BEGIN}no option${BOLD_END} OR with ${BOLD_BEGIN}--select option${BOLD_END})"
echo -e ""
echo -e "${BOLD_BEGIN}--survey${BOLD_END} ${ITALIC_BEGIN}FILE${ITALIC_END} run photos_montage_aladin with this surveys ${ITALIC_BEGIN}FILE${ITALIC_END} instead of "
echo -e " the default file define on .env file. The survey ${ITALIC_BEGIN}FILE${ITALIC_END}"
echo -e " must be on format '.dat'"
echo -e ""
echo -e "${BOLD_BEGIN}--area${BOLD_END} ${ITALIC_BEGIN}FILE${ITALIC_END} run photos_montage_aladin with this areas ${ITALIC_BEGIN}FILE${ITALIC_END} instead of "
echo -e " the default file define on .env file. the area ${ITALIC_BEGIN}FILE${ITALIC_END}"
echo -e " must be on format '.csv'"
echo -e ""
echo -e "${BOLD_BEGIN}--angular${BOLD_END} ${ITALIC_BEGIN}NUMBER${ITALIC_END} run photos_montage_aladin with this angular dimension value (${ITALIC_BEGIN}NUMBER${ITALIC_END}) "
echo -e " instead of the default angular value define on .env file."
echo -e " the angular value (${ITALIC_BEGIN}NUMBER${ITALIC_END}) must be on second of arc"
echo -e ""
echo -e "${BOLD_BEGIN}--resolution_col${BOLD_END} ${ITALIC_BEGIN}NUMBER${ITALIC_END} run photos_montage_aladin with this ${ITALIC_BEGIN}NUMBER${ITALIC_END} of pixel by columns "
echo -e " for the Image Magick montages"
echo -e ""
echo -e "${BOLD_BEGIN}--resolution_line${BOLD_END} ${ITALIC_BEGIN}NUMBER${ITALIC_END} run photos_montage_aladin with this ${ITALIC_BEGIN}NUMBER${ITALIC_END} of pixel by lines "
echo -e " for the Image Magick montages"
echo -e ""
echo -e "${BOLD_BEGIN}--nb_tile_col${BOLD_END} ${ITALIC_BEGIN}NUMBER${ITALIC_END} run photos_montage_aladin with this ${ITALIC_BEGIN}NUMBER${ITALIC_END} of tiles by columns "
echo -e " for the Image Magick montages"
echo -e ""
echo -e "${BOLD_BEGIN}--nb_tile_line${BOLD_END} ${ITALIC_BEGIN}NUMBER${ITALIC_END} run photos_montage_aladin with this ${ITALIC_BEGIN}NUMBER${ITALIC_END} of tiles by lines "
echo -e " for the Image Magick montages"
echo -e ""
echo -e "${BOLD_BEGIN}--mount${BOLD_END} ${ITALIC_BEGIN}PATH${ITALIC_END} run photos_montage_aladin with a volume mounted (${ITALIC_BEGIN}PATH${ITALIC_END}) "
echo -e " on docker container repository /mnt "
echo -e ""
fi
}
......@@ -1521,7 +1543,7 @@ case ${sort_arg_keys[0]} in
echo ""
echo "-------------------------------------------------------------------"
echo " aladin stable versions available on :"
echo -e " ${UNDERLINE_BEGIN}aladin stable versions available on :${UNDERLINE_END}"
echo ""
echo -e "${RED}- Aladin server : ${ALADIN_URL}${RED}"
echo -e "${GREEN}- Localhost${COLOR_OFF}"
......@@ -1545,8 +1567,7 @@ case ${sort_arg_keys[0]} in
echo ""
echo "-------------------------------------------------------------------"
echo ""
echo " Options by default define on .env file:"
echo -e " ${UNDERLINE_BEGIN}Options by default define on .env file:${UNDERLINE_END}"
echo ""
echo "- INPUT_FILE_SURVEYS: ${INPUT_FILE_SURVEYS}"
echo "- INPUT_FILE_AREAS: ${INPUT_FILE_AREAS}"
......@@ -1555,8 +1576,9 @@ case ${sort_arg_keys[0]} in
echo "- NB_TILE_BY_COL: ${NB_TILE_BY_COL}"
echo "- RESOLUTION_BY_LINE: ${RESOLUTION_BY_LINE}"
echo "- RESOLUTION_BY_COL: ${RESOLUTION_BY_COL}"
echo "- VOLUME_MOUNT: ${VOLUME_MOUNT}"
echo ""
echo -e '\e[4munderline\e[24m'
echo "-------------------------------------------------------------------"
echo ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment