<commit_before>#!/bin/sh

CMD=$(which $0)
if [ "${CMD}" == "" ]; then
  CWD=$(pwd)
else
  CWD=$(dirname $CMD)
  CWD=$(cd ${CWD}; pwd)
fi

PRJDIR=$(dirname ${CWD})
PUBDIR=$(dirname ${PRJDIR})

for SUBMDL in $(ls ${PRJDIR}/lib); do
  SUBPRJ=fav-type.${SUBMDL}
  cp -R ${PRJDIR}/lib/${SUBMDL} ${PUBDIR}/${SUBPRJ}
  cp ${PRJDIR}/LICENSE ${PUBDIR}/${SUBPRJ}
  pushd ${PUBDIR}
  tar zcvf ${SUBPRJ}.tar.gz ${SUBPRJ}
  popd
done<commit_msg>Modify mkpub.sh to change package name to scoped name<commit_after>#!/bin/sh

CMD=$(which $0)
if [ "${CMD}" == "" ]; then
  CWD=$(pwd)
else
  CWD=$(dirname $CMD)
  CWD=$(cd ${CWD}; pwd)
fi

PRJDIR=$(dirname ${CWD})
PUBDIR=$(dirname ${PRJDIR})

for SUBMDL in $(ls ${PRJDIR}/lib); do
  SUBPRJ=fav-type.${SUBMDL}
  cp -R ${PRJDIR}/lib/${SUBMDL} ${PUBDIR}/${SUBPRJ}
  cp ${PRJDIR}/LICENSE ${PUBDIR}/${SUBPRJ}
  pushd ${PUBDIR}
  tar zcvf ${SUBPRJ}.tar.gz ${SUBPRJ}
  popd
done


pushd ${PRJDIR} > /dev/null 2>&1

filetitle=$(basename $(pwd))
mv ${PUBDIR}/${filetitle}.tar.gz ${PUBDIR}/${filetitle}.tar.gz.org

sed 's|"name": "fav-type"|"name": "@fav/type"|' package.json > package.new
diff package.json package.new
mv package.new package.json

cd ${PUBDIR}
tar zcf ${filetitle}.tar.gz ${filetitle}

popd > /dev/null 2>&1

{'fraction_non_alphanumeric': 0.2321857485988791, 'fraction_numerical': 0.004803843074459567, 'mean_word_length': 4.555555555555555, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '293177', 'n_tokens_mistral': 559, 'n_tokens_neox': 549, 'n_words': 117}