<commit_before>#!/bin/sh

# Copyright 2014-2016 <NAME> <https://github.com/vszakats>
# See LICENSE.md

cd "$(dirname "$0")" || exit

if [ "${APPVEYOR_REPO_BRANCH}" != 'master' ] ; then
   _SUF='-test'
   mv "${_BAS}.7z" "${_BAS}${_SUF}.7z"
else
   _SUF=
fi

(
   set +x
   curl -fsS -u "${BINTRAY_USER}:${BINTRAY_APIKEY}" \
      -X PUT "https://api.bintray.com/content/${BINTRAY_USER}/generic/${_NAM}${_SUF}/${_VER}/${_BAS}${_SUF}.7z?override=1&publish=1" \
      --data-binary "@${_BAS}${_SUF}.7z"
)

# <filename>: <size> bytes <YYYY-MM-DD> <HH:MM>
case "$(uname)" in
   *BSD|Darwin) stat -f '%N: %z bytes %Sm' -t '%Y-%m-%d %H:%M' "${_BAS}${_SUF}.7z";;
   *)           stat -c '%n: %s bytes %y' "${_BAS}${_SUF}.7z";;
esac

openssl dgst -sha256 "${_BAS}${_SUF}.7z"
openssl dgst -sha256 "${_BAS}${_SUF}.7z" >> hashes.txt

if [ "${APPVEYOR_REPO_BRANCH}" = 'master' ] ; then
   (
      set +x
      curl -fsS \
         -X POST 'https://www.virustotal.com/vtapi/v2/file/scan' \
         --form-string "apikey=${VIRUSTOTAL_APIKEY}" \
         --form "file=@${_BAS}${_SUF}.7z"
   )
fi<commit_msg>highlight virustotal URLs [ci skip]<commit_after>#!/bin/sh

# Copyright 2014-2016 <NAME> <https://github.com/vszakats>
# See LICENSE.md

cd "$(dirname "$0")" || exit

if [ "${APPVEYOR_REPO_BRANCH}" != 'master' ] ; then
   _SUF='-test'
   mv "${_BAS}.7z" "${_BAS}${_SUF}.7z"
else
   _SUF=
fi

(
   set +x
   curl -fsS -u "${BINTRAY_USER}:${BINTRAY_APIKEY}" \
      -X PUT "https://api.bintray.com/content/${BINTRAY_USER}/generic/${_NAM}${_SUF}/${_VER}/${_BAS}${_SUF}.7z?override=1&publish=1" \
      --data-binary "@${_BAS}${_SUF}.7z"
)

# <filename>: <size> bytes <YYYY-MM-DD> <HH:MM>
case "$(uname)" in
   *BSD|Darwin) stat -f '%N: %z bytes %Sm' -t '%Y-%m-%d %H:%M' "${_BAS}${_SUF}.7z";;
   *)           stat -c '%n: %s bytes %y' "${_BAS}${_SUF}.7z";;
esac

openssl dgst -sha256 "${_BAS}${_SUF}.7z"
openssl dgst -sha256 "${_BAS}${_SUF}.7z" >> hashes.txt

if [ "${APPVEYOR_REPO_BRANCH}" = 'master' ] ; then
   (
      set +x
      out="$(curl -fsS \
         -X POST 'https://www.virustotal.com/vtapi/v2/file/scan' \
         --form-string "apikey=${VIRUSTOTAL_APIKEY}" \
         --form "file=@${_BAS}${_SUF}.7z")"
      echo "${out}"
      echo "VirusTotal URL for '${_BAS}${_SUF}.7z':"
      echo "$(echo "${out}" | grep -o 'https://[a-zA-Z0-9./]*')"
   )
fi
{'fraction_non_alphanumeric': 0.2532936676583085, 'fraction_numerical': 0.024224394390140246, 'mean_word_length': 3.0726643598615917, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 19, 'https://': 7, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1123309', 'n_tokens_mistral': 1126, 'n_tokens_neox': 1063, 'n_words': 186}