X-Git-Url: https://git.wikimedia.ca/?a=blobdiff_plain;ds=sidebyside;f=eccc_to_commons.sh;h=5d7b01071c177c6f81abaf4dfe7d4c5a85195f31;hb=0673c779d48ec15e66ab666ffc573daf56e8e714;hp=c580fbbc6518c99ba474e034e8887a7b9b7c1386;hpb=92220f7a023e551afaa720de2381ba1ebf4f8679;p=eccc_to_commons.git diff --git a/eccc_to_commons.sh b/eccc_to_commons.sh index c580fbb..5d7b010 100755 --- a/eccc_to_commons.sh +++ b/eccc_to_commons.sh @@ -92,8 +92,7 @@ do elif [ ${STATIONDATA_COUNT} -eq 0 ]&& \ [ ${AL_MONTH_COUNT} -gt 0 ] then - echo "${REPLY}: Almanac data not compatible yet. Ignoring." >&2 - continue + STYLESHEET_PATH='almanac_to_commons.xslt' DESTINATION_PATH="${DESTINATION}/weather.gc.ca/Almanac/${STATION_ID}.tab" else echo "${REPLY}: Cannot detect file type. Exiting." @@ -102,5 +101,5 @@ do echo "Processing ${REPLY} to ${DESTINATION_PATH}…" >&2 mkdir -p "$(dirname "${DESTINATION_PATH}")" - xmlstarlet tr "${STYLESHEET_PATH}" "${REPLY}" > "${DESTINATION_PATH}" + xmlstarlet tr "${STYLESHEET_PATH}" "${REPLY}" | jq > "${DESTINATION_PATH}" done 9< <( find "${SOURCE}" -type f -name '*.xml' -print0 )