<commit_before>#!/bin/bash -x

set -e

dir=$(mktemp -d)

cd $dir

coleslaw setup

cat .coleslawrc

post=$(coleslaw new post "my first blog")

echo "my firrrrrrst text!!!!" >> "$post"

cat "$post"

coleslaw generate

coleslaw preview &
pid=$!

trap "kill $pid; rm -rf $dir" EXIT

sleep 3

wget -4 -O- 127.0.0.1:5000

! wget -4 -O- 127.0.0.1:5000/nosuchurl

# (
#     wget 127.0.0.1:5000/nosuchurl -O-
#     echo $?
#     true
# )


<commit_msg>[travis] trying curl to test the preview feature<commit_after>#!/bin/bash -x

set -e

dir=$(mktemp -d)

cd $dir

coleslaw setup

cat .coleslawrc

post=$(coleslaw new post "my first blog")

echo "my firrrrrrst text!!!!" >> "$post"

cat "$post"

coleslaw generate

coleslaw preview &
pid=$!

trap "kill $pid; rm -rf $dir" EXIT

sleep 3

curl --fail 127.0.0.1:5000

! curl --fail 127.0.0.1:5000/nosuchurl

# (
#     wget 127.0.0.1:5000/nosuchurl -O-
#     echo $?
#     true
# )



{'fraction_non_alphanumeric': 0.16938110749185667, 'fraction_numerical': 0.06948968512486428, 'mean_word_length': 2.841666666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, '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': '2925477', 'n_tokens_mistral': 458, 'n_tokens_neox': 407, 'n_words': 109}