<commit_before>#!/bin/bash

if [ $# -ne 2 ]
then
    echo "Usage: upload.sh filename collection"
    exit 1
fi

DOC=`basename $1`
URL="http://localhost:8080/exist/servlet$2/$DOC"

curl -i --upload-file $1 $URL<commit_msg>more usable<commit_after>#!/bin/bash

if [ $# -le 1 ]
then
    echo "Usage: upload.sh filename collection [curl arguments]"
    echo "Example: upload.sh test.xml /db/my_collec --user admin:admin"
    exit 1
fi

DOC=`basename $1`
URL="http://localhost:8080/exist/servlet$2/$DOC"

curl -i --upload-file $1 $URL $3 $4 $5 $6 $7 $8 $9
{'fraction_non_alphanumeric': 0.17272727272727273, 'fraction_numerical': 0.045454545454545456, 'mean_word_length': 3.5163934426229506, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, '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': '3357403', 'n_tokens_mistral': 234, 'n_tokens_neox': 208, 'n_words': 58}