diff --git a/Scripts/Functions/Render/render.sh b/Scripts/Functions/Render/render.sh index 900625b..8006d89 100644 --- a/Scripts/Functions/Render/render.sh +++ b/Scripts/Functions/Render/render.sh @@ -96,16 +96,14 @@ function render { elif [[ $ACTIONVAL =~ "^$(cli_getRepoTLDir)/Identity/Images" ]];then ACTIONNAM="${FUNCNAME}_doBaseActions" else - cli_printMessage "`gettext "The path provided doesn't support rendition."`" 'AsErrorLine' - cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' + cli_printMessage "`gettext "The path provided do not support rendition."`" --as-error-line fi # Execute action name. if [[ $ACTIONNAM =~ "^${FUNCNAM}_[A-Za-z]+$" ]];then eval $ACTIONNAM else - cli_printMessage "`gettext "A valid action is required."`" 'AsErrorLine' - cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' + cli_printMessage "`gettext "A valid action is required."`" --as-error-line fi # Commit changes from working copy to central repository only. diff --git a/Scripts/Functions/Render/render_checkSvgAbsref.sh b/Scripts/Functions/Render/render_checkSvgAbsref.sh index 0cd53b7..31e84bb 100755 --- a/Scripts/Functions/Render/render_checkSvgAbsref.sh +++ b/Scripts/Functions/Render/render_checkSvgAbsref.sh @@ -50,16 +50,16 @@ function render_checkSvgAbsref { # Retrive absolute paths from file. BG_DST_FILES=$(egrep "(sodipodi:absref|xlink:href)=\"${HOME}.+" $FILE \ - | sed -r "s,.+=\"(${HOME}.+\.png)\".*,\1,") + | sed -r "s,.+=\"(${HOME}.+\.png)\".*,\1," | sort | uniq) # Verify absolute paths retrived from file. for BG_DST_FILE in $BG_DST_FILES;do - if [[ ! -a $BG_DST_FILE ]];then - - # Warn about required background omission. - cli_printMessage "`eval_gettext "The path \\\"\\\$BG_DST_FILE\\\" doesn't exist."`" 'AsErrorLine' + # Print action + cli_printMessage "$BG_DST_FILE" --as-checking-line + if [[ ! -a $BG_DST_FILE ]];then + # Define the source background file, the image file will # crop when no specific background informatio be available # for using. Generally, this is the most reusable @@ -92,7 +92,7 @@ function render_checkSvgAbsref { | sed -r 's!.+/[[:digit:]]+x([[:digit:]]+)-final\.png!\1!') # Print action message. - cli_printMessage "${BG_SRC_FILE} ($BG_SRC_FILE_COLOR)" 'AsCreatingLine' + cli_printMessage "${BG_SRC_FILE} ($BG_SRC_FILE_COLOR)" --as-creating-line # Create the source background file. ppmmake -quiet ${BG_SRC_FILE_COLOR} \ @@ -102,7 +102,7 @@ function render_checkSvgAbsref { fi # Print action message. - cli_printMessage "$BG_SRC_FILE" 'AsCroppingFromLine' + cli_printMessage "$BG_SRC_FILE" --as-cropping-line # Define the width of the required background information. BG_DST_FILE_WIDTH=$(echo $BG_DST_FILE \ diff --git a/Scripts/Functions/Render/render_convertDocbookToXhtml.sh b/Scripts/Functions/Render/render_convertDocbookToXhtml.sh index e67d905..587c107 100755 --- a/Scripts/Functions/Render/render_convertDocbookToXhtml.sh +++ b/Scripts/Functions/Render/render_convertDocbookToXhtml.sh @@ -28,9 +28,9 @@ function render_convertDocbookToXhtml { # Print action message. if [[ -f ${FILE}.xhtml ]];then - cli_printMessage "${FILE}.xhtml" 'AsUpdatingLine' + cli_printMessage "${FILE}.xhtml" --as-updating-line else - cli_printMessage "${FILE}.xhtml" 'AsCreatingLine' + cli_printMessage "${FILE}.xhtml" --as-creating-line fi # Define list of XSL stylesheets. diff --git a/Scripts/Functions/Render/render_convertGplToHex.sh b/Scripts/Functions/Render/render_convertGplToHex.sh index 261a45b..bae8a47 100755 --- a/Scripts/Functions/Render/render_convertGplToHex.sh +++ b/Scripts/Functions/Render/render_convertGplToHex.sh @@ -47,8 +47,7 @@ function render_convertGplToHex { # convenction, we are producing images in 14 and 16 colors only to # cover Grub and Syslinux images need respectively. if [[ ! $COLOR_NUMBER =~ '^(14|16)$' ]];then - cli_printMessage "`eval_gettext "Reducing image to \\\`\\\$COLOR_NUMBER' colors is not supported."`" 'AsErrorLine' - cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' + cli_printMessage "`eval_gettext "Reducing image to \\\"\\\$COLOR_NUMBER\\\" colors is not supported."`" --as-error-line fi # Define list of colors from GPL palette. @@ -56,15 +55,13 @@ function render_convertGplToHex { # Verify number of colors returned in the list. if [[ ! $(echo "$COLORS" | wc -l) =~ $COLOR_NUMBER ]];then - cli_printMessage "`gettext "The palette doesn't have the correct number of colors."`" 'AsErrorLine' - cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' + cli_printMessage "`gettext "The palette do not have the correct number of colors."`" --as-error-line fi # Verify format of colors inside the list. for COLOR in $COLORS;do if [[ ! $COLOR =~ '^[0-9a-f]{6}$' ]];then - cli_printMessage "`eval_gettext "The \\\`\\\$COLOR' string isn't a valid color code."`" 'AsErrorLine' - cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' + cli_printMessage "`eval_gettext "The \\\"\\\$COLOR\\\" string is not a valid color code."`" --as-error-line fi done diff --git a/Scripts/Functions/Render/render_convertGplToPpm.sh b/Scripts/Functions/Render/render_convertGplToPpm.sh index f7797c8..9ecee7e 100755 --- a/Scripts/Functions/Render/render_convertGplToPpm.sh +++ b/Scripts/Functions/Render/render_convertGplToPpm.sh @@ -45,8 +45,7 @@ function render_convertGplToPpm { # convenction, we are producing images in 14 and 16 colors only to # cover Grub and Syslinux images need respectively. if [[ ! $COLOR_NUMBER =~ '^(14|16)$' ]];then - cli_printMessage "`eval_gettext "Reducing image to \\\`\\\$COLOR_NUMBER' colors is not supported."`" 'AsErrorLine' - cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' + cli_printMessage "`eval_gettext "Reducing image to \\\"\\\$COLOR_NUMBER\\\" colors is not supported."`" --as-error-line fi # Define list of colors from GPL palette. @@ -54,15 +53,13 @@ function render_convertGplToPpm { # Verify number of colors returned in the list. if [[ ! $(echo "$COLORS" | wc -l) =~ $COLOR_NUMBER ]];then - cli_printMessage "`gettext "The palette doesn't have the correct number of colors."`" 'AsErrorLine' - cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' + cli_printMessage "`gettext "The palette do not have the correct number of colors."`" --as-error-line fi # Verify format of colors inside the list. for COLOR in $COLORS;do if [[ ! $COLOR =~ '^[0-9a-f]{6}$' ]];then - cli_printMessage "`eval_gettext "The \\\`\\\$COLOR' string isn't a valid color code."`" 'AsErrorLine' - cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' + cli_printMessage "`eval_gettext "The \\\"\\\$COLOR\\\" string is not a valid color code."`" --as-error-line fi done diff --git a/Scripts/Functions/Render/render_convertHtmlToText.sh b/Scripts/Functions/Render/render_convertHtmlToText.sh index 5d58d7e..59ea475 100755 --- a/Scripts/Functions/Render/render_convertHtmlToText.sh +++ b/Scripts/Functions/Render/render_convertHtmlToText.sh @@ -50,17 +50,16 @@ function render_convertHtml2Text { # Print action message. if [[ -f ${FILE}.txt ]];then - cli_printMessage "${FILE}.txt" 'AsUpdatingLine' + cli_printMessage "${FILE}.txt" --as-updating-line else - cli_printMessage "${FILE}.txt" 'AsCreatingLine' + cli_printMessage "${FILE}.txt" --as-creating-line fi # Convert from HTML to plain-text without markup. ${COMMAND} ${OPTIONS} ${FILE}.xhtml > ${FILE}.txt else - cli_printMessage "`gettext "No way to convert from HTML to plain-text found."`" 'AsErrorLine' - cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' + cli_printMessage "`gettext "No way to convert from HTML to plain-text found."`" --as-error-line fi } diff --git a/Scripts/Functions/Render/render_convertPngTo.sh b/Scripts/Functions/Render/render_convertPngTo.sh index 4af1865..5b5890b 100644 --- a/Scripts/Functions/Render/render_convertPngTo.sh +++ b/Scripts/Functions/Render/render_convertPngTo.sh @@ -30,7 +30,7 @@ function render_convertPngTo { # Execute ImageMagick convertion. for FORMAT in $FORMATS;do - cli_printMessage "${FILE}.${FORMAT}" "AsSavedAsLine" + cli_printMessage "${FILE}.${FORMAT}" --as-savedas-line convert -quality 85 ${FILE}.png ${FILE}.${FORMAT} done diff --git a/Scripts/Functions/Render/render_convertPngToThumbnail.sh b/Scripts/Functions/Render/render_convertPngToThumbnail.sh index d86d10d..061a58c 100755 --- a/Scripts/Functions/Render/render_convertPngToThumbnail.sh +++ b/Scripts/Functions/Render/render_convertPngToThumbnail.sh @@ -42,11 +42,11 @@ function render_convertPngToThumbnail { # Create thumbnails. for SIZE in $SIZES;do - cli_printMessage "${FILE}-thumb-${SIZE}.png" "AsSavedAsLine" + cli_printMessage "${FILE}-thumb-${SIZE}.png" --as-savedas-line convert -resize ${SIZE} ${FILE}.png ${FILE}-thumb-${SIZE}.png - cli_printMessage "${FILE}-thumb-${SIZE}.jpg" "AsSavedAsLine" + cli_printMessage "${FILE}-thumb-${SIZE}.jpg" --as-savedas-line convert -resize ${SIZE} ${FILE}-thumb-${SIZE}.png ${FILE}-thumb-${SIZE}.jpg - cli_printMessage "${FILE}-thumb-${SIZE}.pdf" "AsSavedAsLine" + cli_printMessage "${FILE}-thumb-${SIZE}.pdf" --as-savedas-line convert -resize ${SIZE} ${FILE}-thumb-${SIZE}.png ${FILE}-thumb-${SIZE}.pdf done diff --git a/Scripts/Functions/Render/render_doBaseActions.sh b/Scripts/Functions/Render/render_doBaseActions.sh index 9a35c82..7b4bc68 100755 --- a/Scripts/Functions/Render/render_doBaseActions.sh +++ b/Scripts/Functions/Render/render_doBaseActions.sh @@ -99,7 +99,7 @@ function render_doBaseActions { fi # Print separator line. - cli_printMessage '-' 'AsSeparatorLine' + cli_printMessage '-' --as-separator-line # Define final location of translation file. TRANSLATION=$(dirname $FILE \ @@ -107,9 +107,9 @@ function render_doBaseActions { # Print final location of translation file. if [[ ! -f "$TRANSLATION" ]];then - cli_printMessage "`gettext "None"`" "AsTranslationLine" + cli_printMessage "`gettext "None"`" --as-translation-line else - cli_printMessage "$TRANSLATION" 'AsTranslationLine' + cli_printMessage "$TRANSLATION" --as-translation-line fi # Define final location of template file. @@ -117,9 +117,9 @@ function render_doBaseActions { # Print final location of template file. if [[ ! -f "$TEMPLATE" ]];then - cli_printMessage "`gettext "None"`" "AsDesignLine" + cli_printMessage "`gettext "None"`" --as-design-line else - cli_printMessage "$TEMPLATE" 'AsDesignLine' + cli_printMessage "$TEMPLATE" --as-design-line fi # Define final location of output directory. @@ -219,8 +219,7 @@ function render_doBaseActions { #render_doXhtmlLastActions else - cli_printMessage "`gettext "The template file you try to render is not supported yet."`" 'AsErrorLine' - cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' + cli_printMessage "`gettext "The template file you try to render is not supported yet."`" --as-error-line fi # Remove template instance. diff --git a/Scripts/Functions/Render/render_doBrands.sh b/Scripts/Functions/Render/render_doBrands.sh index 712ce48..a6b76e6 100644 --- a/Scripts/Functions/Render/render_doBrands.sh +++ b/Scripts/Functions/Render/render_doBrands.sh @@ -61,7 +61,7 @@ function render_doBrands { for FORMAT in ${FORMATS};do # Output action information. - cli_printMessage "${NEWFILE}.${FORMAT}" "AsCreatingLine" + cli_printMessage "${NEWFILE}.${FORMAT}" --as-creating-line # Convert and resize to create new file. convert -resize x${SIZE} ${FILE}.png ${NEWFILE}.${FORMAT} @@ -69,15 +69,15 @@ function render_doBrands { done # Create logo copy in 2 colors. - cli_printMessage "${NEWFILE}.xbm (`gettext "2 colors grayscale"`)" "AsCreatingLine" + cli_printMessage "${NEWFILE}.xbm (`gettext "2 colors grayscale"`)" --as-creating-line convert -resize x${SIZE} -colorspace gray -colors 2 ${FILE}.png ${NEWFILE}.xbm # Create logo copy in emboss effect. - cli_printMessage "${NEWFILE}-emboss.png" "AsCreatingLine" + cli_printMessage "${NEWFILE}-emboss.png" --as-creating-line convert -resize x${SIZE} -emboss 1 ${FILE}.png ${NEWFILE}-emboss.png done # Output division line. - cli_printMessage '-' 'AsSeparatorLine' + cli_printMessage '-' --as-separator-line } diff --git a/Scripts/Functions/Render/render_doDm.sh b/Scripts/Functions/Render/render_doDm.sh index c425178..4a5ead9 100755 --- a/Scripts/Functions/Render/render_doDm.sh +++ b/Scripts/Functions/Render/render_doDm.sh @@ -56,7 +56,7 @@ function render_doDm { local RESOLUTIONS='' # Print separator line. - cli_printMessage '-' 'AsSeparatorLine' + cli_printMessage '-' --as-separator-line # Get display manager passed from render.conf.sh pre-rendition # configuration script. @@ -76,8 +76,7 @@ function render_doDm { # Check screen resolutions passed from render.conf.sh # pre-rendition configuration script. if [[ "$RESOLUTIONS" == '' ]];then - cli_printMessage "`gettext "There is no resolution information to process."`" 'AsErrorLine' - cli_printMessage "${FUNCDIRNAM}" "AsToKnowMoreLine" + cli_printMessage "`gettext "There is no resolution information to process."`" --as-error-line fi # Define source files using absolute paths. @@ -167,7 +166,11 @@ function render_doDm { COUNT=0 # Print action message. - cli_printMessage "${OUTPUT}/${RESOLUTION}.tar.gz" "AsCreatingLine" + if [[ ${RESOLUTION}.tar.gz ]];then + cli_printMessage "${OUTPUT}/${RESOLUTION}.tar.gz" --as-updating-line + else + cli_printMessage "${OUTPUT}/${RESOLUTION}.tar.gz" --as-creating-line + fi # Create tar.gz file. tar -czf "${RESOLUTION}.tar.gz" $TGZ @@ -179,9 +182,9 @@ function render_doDm { rm -r $TGZ # Remove release-specific images. - cli_printMessage "${SRC[1]}" "AsDeletingLine" + cli_printMessage "${SRC[1]}" --as-deleting-line rm ${SRC[1]} - cli_printMessage "${SRC[2]}" "AsDeletingLine" + cli_printMessage "${SRC[2]}" --as-deleting-line rm ${SRC[2]} # Return to where we were initially. diff --git a/Scripts/Functions/Render/render_doGrub.sh b/Scripts/Functions/Render/render_doGrub.sh index d0defa7..bf0b3f1 100644 --- a/Scripts/Functions/Render/render_doGrub.sh +++ b/Scripts/Functions/Render/render_doGrub.sh @@ -41,8 +41,7 @@ function render_doGrub { # Remove anything after equal sign inside option. OPTION=$(echo -n $OPTION | cut -d'=' -f1) if [[ "$OPTION" =~ "-(mapfile|verbose)" ]];then - cli_printMessage "`eval_gettext "The \\\$OPTION option is already used."`" - cli_printMessage "${FUNCDIRNAM}" "AsToKnowMoreLine" + cli_printMessage "`eval_gettext "The \\\"\\\$OPTION\\\" option is already used."`" --as-error-line fi done @@ -77,12 +76,12 @@ function render_doGrub { # created from the PNG image rendered previously as centos-art # base-rendition output. The PNM image is an intermediate format # used to manipulate images through Netpbm tools. - cli_printMessage "${FILE}.pnm" "AsSavedAsLine" + cli_printMessage "${FILE}.pnm" --as-savedas-line pngtopnm -verbose \ < ${FILE}.png 2>${FILE}.log > ${FILE}.pnm # Print the path to GPL palette. - cli_printMessage "$PALETTE_GPL" 'AsPaletteLine' + cli_printMessage "$PALETTE_GPL" --as-palette-line # Create PPM palette using GPL palette. render_convertGplToPpm "$PALETTE_GPL" "$PALETTE_PPM" "$COLOR_NUMBER" @@ -90,7 +89,7 @@ function render_doGrub { # Reduce colors as specified in PPM palette. Here we use the PPM # palette to enforce the color position in the image index and the # Floyd-Steinberg dithering in order to improve color reduction. - cli_printMessage "${FILE}${PREFIX}.ppm" "AsSavedAsLine" + cli_printMessage "${FILE}${PREFIX}.ppm" --as-savedas-line pnmremap -verbose -mapfile=$PALETTE_PPM $OPTIONS \ < ${FILE}.pnm 2>>${FILE}.log > ${FILE}${PREFIX}.ppm @@ -100,7 +99,7 @@ function render_doGrub { fi # Create the 14 colors xpm.gz file. - cli_printMessage "${FILE}${PREFIX}.xpm.gz" "AsSavedAsLine" + cli_printMessage "${FILE}${PREFIX}.xpm.gz" --as-savedas-line ppmtoxpm \ < ${FILE}${PREFIX}.ppm 2>>${FILE}.log > ${FILE}.xpm \ && gzip --force ${FILE}.xpm \ diff --git a/Scripts/Functions/Render/render_doKsplash.sh b/Scripts/Functions/Render/render_doKsplash.sh index 2e28252..5b6273c 100755 --- a/Scripts/Functions/Render/render_doKsplash.sh +++ b/Scripts/Functions/Render/render_doKsplash.sh @@ -56,7 +56,7 @@ function render_doKsplash { DST[4]="${OUTPUT}/Theme.rc" # Print action message. - cli_printMessage "${OUTPUT}/Preview.png" 'AsCreatingLine' + cli_printMessage "${OUTPUT}/Preview.png" --as-creating-line # Create `Preview.png' image. convert -append ${SRC[0]} ${SRC[1]} ${SRC[3]} ${OUTPUT}/Preview.png diff --git a/Scripts/Functions/Render/render_doSvg.sh b/Scripts/Functions/Render/render_doSvg.sh index dc7f543..cd7124e 100644 --- a/Scripts/Functions/Render/render_doSvg.sh +++ b/Scripts/Functions/Render/render_doSvg.sh @@ -32,8 +32,7 @@ function render_doSvg { # Check export id inside design templates. grep "id=\"$EXPORTID\"" $INSTANCE > /dev/null if [[ $? -gt 0 ]];then - cli_printMessage "`eval_gettext "There is no export id (\\\$EXPORTID) inside \\\$TEMPLATE."`" "AsErrorLine" - cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' + cli_printMessage "`eval_gettext "There is not export id (\\\$EXPORTID) inside \\\"\\\$TEMPLATE\\\"."`" --as-error-line fi # Check existence of external files. Inside design templates and @@ -44,13 +43,17 @@ function render_doSvg { # be avoided. render_checkSvgAbsref "$INSTANCE" - # Render template instance using inkscape. Modify the inkscape - # output to reduce the amount of characters used in description - # column at final output. - cli_printMessage "$(inkscape $INSTANCE \ - --export-id=$EXPORTID --export-png=${FILE}.png | sed -r \ - -e "s!Area !`gettext "Area"`: !" \ - -e "s!Background RRGGBBAA:!`gettext "Background"`: RRGGBBAA!" \ - -e "s!Bitmap saved as:!`gettext "Saved as"`:!")" 'AsRegularLine' + # Render template instance using inkscape and save the output. + local INKSCAPE_OUTPUT="$(\ + inkscape $INSTANCE --export-id=$EXPORTID --export-png=${FILE}.png)" + + # Modify output from inkscape to fit the centos-art.sh script + # output visual style. + cli_printMessage "$(echo "$INKSCAPE_OUTPUT" | egrep '^Area' \ + | sed -r 's!:! !g' | sed -r "s!^Area!`gettext "Area"`: !")" + cli_printMessage "$(echo "$INKSCAPE_OUTPUT" | egrep '^Background' \ + | sed -r 's!:! !g' | sed -r "s!^Background!`gettext "Background"`: !")" + cli_printMessage "$(echo "$INKSCAPE_OUTPUT" | egrep '^Bitmap saved as' \ + | sed -r 's!:! !g' | sed -r "s!^Bitmap saved as!`gettext "Saved as"`: !")" } diff --git a/Scripts/Functions/Render/render_doSvgPostActions.sh b/Scripts/Functions/Render/render_doSvgPostActions.sh index 135fe79..c256aad 100644 --- a/Scripts/Functions/Render/render_doSvgPostActions.sh +++ b/Scripts/Functions/Render/render_doSvgPostActions.sh @@ -53,7 +53,7 @@ function render_doSvgPostActions { POSTACTIONS[((++${#POSTACTIONS[*]}))]='doGrub' POSTACTIONS[((++${#POSTACTIONS[*]}))]='doGrub:-floyd' elif [[ $TEMPLATE =~ "Distro/$(cli_getPathComponent '--release-pattern')/Ksplash/.+\.svg$" ]];then - POSTACTIONS[((++${#POSTACTIONS[*]}))]='renderKsplash' + POSTACTIONS[((++${#POSTACTIONS[*]}))]='doKsplash' fi # Define SVG post-rendition actions that create new files from diff --git a/Scripts/Functions/Render/render_doSyslinux.sh b/Scripts/Functions/Render/render_doSyslinux.sh index 2137a71..7cc85ff 100755 --- a/Scripts/Functions/Render/render_doSyslinux.sh +++ b/Scripts/Functions/Render/render_doSyslinux.sh @@ -88,8 +88,7 @@ function render_doSyslinux { # Remove anything after equal sign inside option. OPTION=$(echo $OPTION | cut -d'=' -f1) if [[ "$OPTION" =~ "-(mapfile|verbose)" ]];then - cli_printMessage "`eval_gettext "The \\\$OPTION option is already used."`" - cli_printMessage "${FUNCDIRNAM}" "AsToKnowMoreLine" + cli_printMessage "`eval_gettext "The \\\"\\\$OPTION\\\" option is already used."`" --as-error-line fi done @@ -138,12 +137,12 @@ function render_doSyslinux { # created from the PNG image rendered previously as centos-art # base-rendition output. The PNM image is an intermediate format # used to manipulate images through Netpbm tools. - cli_printMessage "${FILE}.pnm" "AsSavedAsLine" + cli_printMessage "${FILE}.pnm" --as-savedas-line pngtopnm -verbose \ < ${FILE}.png 2>${FILE}.log > ${FILE}.pnm # Print the path to GPL palette. - cli_printMessage "$PALETTE_GPL" 'AsPaletteLine' + cli_printMessage "$PALETTE_GPL" --as-palette-line # Create PPM palette using GPL palette. render_convertGplToPpm "$PALETTE_GPL" "$PALETTE_PPM" "$COLOR_NUMBER" @@ -154,12 +153,12 @@ function render_doSyslinux { # Reduce colors as specified in PPM palette. Here we use the PPM # palette to enforce the color position in the image index and the # Floyd-Steinberg dithering in order to improve color reduction. - cli_printMessage "${FILE}${PREFIX}.pnm" "AsSavedAsLine" + cli_printMessage "${FILE}${PREFIX}.pnm" --as-savedas-line pnmremap -verbose -mapfile=$PALETTE_PPM $OPTIONS \ < ${FILE}.pnm 2>> ${FILE}.log > ${FILE}${PREFIX}.pnm # Create LSS16 image. - cli_printMessage "${FILE}${PREFIX}.lss" "AsSavedAsLine" + cli_printMessage "${FILE}${PREFIX}.lss" --as-savedas-line ppmtolss16 $(cat $PALETTE_HEX) \ < ${FILE}${PREFIX}.pnm 2>>${FILE}.log > ${FILE}${PREFIX}.lss @@ -171,12 +170,12 @@ function render_doSyslinux { # Create the PPM image indexed to 16 colors. Also the colormap # used in the LSS16 image is saved on ${FILE}.log; this is useful to # verify the correct order of colors in the image index. - cli_printMessage "${FILE}${PREFIX}.ppm" "AsSavedAsLine" + cli_printMessage "${FILE}${PREFIX}.ppm" --as-savedas-line lss16toppm -map \ < ${FILE}${PREFIX}.lss 2>>${FILE}.log > ${FILE}${PREFIX}.ppm # Create the 16 colors PNG image. - cli_printMessage "${FILE}${PREFIX}.png" "AsSavedAsLine" + cli_printMessage "${FILE}${PREFIX}.png" --as-savedas-line pnmtopng -verbose -palette=$PALETTE_PPM \ < ${FILE}${PREFIX}.pnm 2>>${FILE}.log > ${FILE}${PREFIX}.png diff --git a/Scripts/Functions/Render/render_doXhtml.sh b/Scripts/Functions/Render/render_doXhtml.sh index c0bb2ff..f6a8886 100755 --- a/Scripts/Functions/Render/render_doXhtml.sh +++ b/Scripts/Functions/Render/render_doXhtml.sh @@ -27,9 +27,9 @@ function render_doXhtml { # Print action message. if [[ -f ${FILE}.xhtml ]];then - cli_printMessage "${FILE}.xhtml" 'AsUpdatingLine' + cli_printMessage "${FILE}.xhtml" --as-updating-line else - cli_printMessage "${FILE}.xhtml" 'AsCreatingLine' + cli_doPrint "${FILE}.xhtml" --as-creating-line fi # Create xhtml file from instance. diff --git a/Scripts/Functions/Render/render_getConfigOption.sh b/Scripts/Functions/Render/render_getConfigOption.sh index 3df0b5f..72657bd 100755 --- a/Scripts/Functions/Render/render_getConfigOption.sh +++ b/Scripts/Functions/Render/render_getConfigOption.sh @@ -50,15 +50,13 @@ function render_getConfigOption { # for this function to work. It provides the string needed to # retrive options from. if [[ "$ACTION" == '' ]];then - cli_printMessage "`gettext "There is no action to work with."`" - cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' + cli_printMessage "`gettext "There is no action to work with."`" --as-error-line fi # Check field value. The field's value must match the cut's # command specification of its -f option. if [[ ! "$FIELD" =~ '^([0-9]+|[0-9]+-|-[0-9]+|[0-9]+-[0-9]+)$' ]];then - cli_printMessage "`gettext "The field specified is not valid."`" - cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' + cli_printMessage "`gettext "The field specified is not valid."`" --as-error-line fi # Get option from pre-rendition configuration action definition. diff --git a/Scripts/Functions/Render/render_getOptions.sh b/Scripts/Functions/Render/render_getOptions.sh index c5da8cf..638783a 100644 --- a/Scripts/Functions/Render/render_getOptions.sh +++ b/Scripts/Functions/Render/render_getOptions.sh @@ -29,7 +29,7 @@ function render_getOptions { local ARGSS="" # Define long options we want to support. - local ARGSL="filter:,quiet,answer-yes,dont-commit-changes,releasever:,basearch:,convert:,comment:,sharpen::,group-by:,theme-model:" + local ARGSL="filter:,quiet,answer-yes,dont-commit-changes,releasever:,basearch:,convert:,comment:,sharpen:,group-by:,theme-model:" # Redefine ARGUMENTS variable using getopt output. cli_doParseArguments @@ -66,8 +66,7 @@ function render_getOptions { --releasever ) FLAG_RELEASEVER="$2" if [[ ! $FLAG_RELEASEVER =~ $(cli_getPathComponent '--release-pattern') ]];then - cli_printMessage "`gettext "The release version provided is not supported."`" 'AsErrorLine' - cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' + cli_printMessage "`gettext "The release version provided is not supported."`" --as-error-line fi shift 2 ;; @@ -90,8 +89,7 @@ function render_getOptions { --basearch ) FLAG_BASEARCH="$2" if [[ ! $FLAG_BASEARCH =~ $(cli_getPathComponent '--architecture-pattern') ]];then - cli_printMessage "`gettext "The architecture provided is not supported."`" 'AsErrorLine' - cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' + cli_printMessage "`gettext "The architecture provided is not supported."`" --as-error-line fi shift 2 ;; diff --git a/Scripts/Functions/Render/render_groupSimilarFiles.sh b/Scripts/Functions/Render/render_groupSimilarFiles.sh index 2f03725..5fac3d5 100755 --- a/Scripts/Functions/Render/render_groupSimilarFiles.sh +++ b/Scripts/Functions/Render/render_groupSimilarFiles.sh @@ -61,7 +61,7 @@ function render_groupSimilarFiles { TARGET=${TARGET}/$(cli_getRepoName "$FILE" 'f').${FORMAT} # Move file into its final location. - cli_printMessage "$TARGET" 'AsMovedToLine' + cli_printMessage "$TARGET" --as-movedto-line mv ${SOURCE} ${TARGET} done