<commit_before>#!/bin/bash

# put game html5 into a zip file
#zip -r ~/game.zip ~/Desktop/Game/BreakIt/Export/html5/bin/*

# upload zip to server
curl 'http://jetnet.indiegamegarden.com/jetnet-upload.php' \
  -A "Mozilla/5.0 (Windows NT 6.1)" \
  -F "fileToUpload=@game.zip"<commit_msg>added random id to script; zip to avoid deep paths; URL display<commit_after>#!/bin/bash

cd ~
echo "Jet-Net Bouw Je Eigen Game - game uploader."

# get/generate the student's id for game
date=$(date +%Y%m%d)
if [ -f studentid ]
then
  studentid=$(cat studentid)
else
  studentid=$(cat /dev/urandom | tr -cd [:alnum:] | head -c 4)
  echo "$studentid" > studentid
fi
ID="$date$studentid"
fn="$ID.zip"

# put game html5 into a zip file
rm -f $fn
pushd ~/Desktop/Game/BreakIt/Export/html5/bin
zip -r ~/$fn *
popd

# upload zip to server
echo "Uploading file to web server... just a moment"
curl 'http://jetnet.indiegamegarden.com/jetnet-upload.php' \
  -A "Mozilla/5.0 (Windows NT 6.1)" \
  -F "fileToUpload=@$fn"

echo " "
echo "------------------------------------------------"
echo "Game is online on:"
echo "http://jetnet.indiegamegarden.com/game-store/$ID"
echo "------------------------------------------------"
read -p "Press [ENTER] to exit."
{'fraction_non_alphanumeric': 0.22627737226277372, 'fraction_numerical': 0.010543390105433901, 'mean_word_length': 2.6294117647058823, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '2609551', 'n_tokens_mistral': 454, 'n_tokens_neox': 438, 'n_words': 128}