<commit_before>#!/bin/sh

[ -z $1 ] && echo \
          && echo "Need a template or a directory of templates to convert!" \
          && echo \
          && exit

CLASSPATH=.

for jar in ../bin/*.jar
do
    CLASSPATH=${CLASSPATH}:${jar}
done

java -cp ${CLASSPATH} org.apache.velocity.convert.WebMacro $1<commit_msg>In the case where the convert.WebMacro program is run on a directory, Ant's DirectoryScanner is used to grab a list of WM files to convert. A NoClassDefFoundError was being thrown because Ant was never in the classpath supplied to the JVM (and we are building the classpath from scratch, user classpath be damned!).  We now use the Ant JAR from our build/lib/ directory.<commit_after>#!/bin/sh

[ -z $1 ] && echo \
          && echo 'Need a template or a directory of templates to convert!' \
          && echo \
          && exit

CLASSPATH=.

for jar in ../bin/*.jar ../build/lib/*.jar
do
    CLASSPATH=${CLASSPATH}:${jar}
done

java -classpath ${CLASSPATH} org.apache.velocity.convert.WebMacro $1
{'fraction_non_alphanumeric': 0.11724137931034483, 'fraction_numerical': 0.003940886699507389, 'mean_word_length': 2.8631178707224336, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4586493', 'n_tokens_mistral': 314, 'n_tokens_neox': 315, 'n_words': 122}