<commit_before>#!/bin/sh
# generate encrypted strings with:
# echo TO_ENCRYPT | openssl enc -aes-128-cbc -a -salt -pass pass:<PASSWORD>

HOST='U2FsdGVkX1+wIZvS7BWx88K0GudG3pghJJoYXw+78fUPeV6u4+DFp6s2PDjNq1fb'
USER='<KEY>
TARGETFOLDER='/'
SOURCEFOLDER='/home/hubi/maximilian-huber/_site-diff'
if [ $# -eq 1 ]; then
  if [ $1 -eq "full" ]; then
    SOURCEFOLDER='/home/hubi/maximilian-huber/_site'
  fi
fi
PASS="<PASSWORD>LC9c<PASSWORD>Qj6OnPeUdTZ<PASSWORD>WoqZ8c3HlyJLI"

echo "pass: "
read -s tPASS
HOST=`echo $HOST | openssl enc -aes-128-cbc -a -d -salt -pass pass:${tPASS}`
USER=`echo $USER | openssl enc -aes-128-cbc -a -d -salt -pass pass:${tPASS}`
PASS=`echo $PASS | openssl enc -aes-128-cbc -a -d -salt -pass pass:${tPASS}`

# fix permissions
for dir in "$SOURCEFOLDER"; do
  find "$dir" -type d -exec chmod 755 {} \;
  find "$dir" -type f -exec chmod 644 {} \;
done

lftp -f "
set ftp:ssl-allow no
open $HOST
user $USER $PASS
lcd $SOURCEFOLDER
mirror --reverse --verbose $SOURCEFOLDER $TARGETFOLDER
bye
"
<commit_msg>update ftp script<commit_after>#!/bin/sh
#
# generate encrypted strings with:
# echo TO_ENCRYPT | openssl enc -aes-128-cbc -a -salt -pass pass:PASSWD

HOST='U2FsdGVkX1+wIZvS7BWx88K0GudG3pghJJoYXw+78fUPeV6u4+DFp6s2PDjNq1fb'
USER='<KEY>
TARGETFOLDER='/'
SOURCEFOLDER='/home/hubi/maximilian-huber/_site-diff'
if [ $# -eq 1 ]; then
  if [ $1 -eq "full" ]; then
    SOURCEFOLDER='/home/hubi/maximilian-huber/_site'
  fi
fi
PASS="U<KEY>"

###############################################################################

echo "pass: "
read -s tPASS
HOST=`echo $HOST | openssl enc -aes-128-cbc -a -d -salt -pass pass:${tPASS}`
USER=`echo $USER | openssl enc -aes-128-cbc -a -d -salt -pass pass:${tPASS}`
PASS=`echo $PASS | openssl enc -aes-128-cbc -a -d -salt -pass pass:${tPASS}`

###############################################################################

# fix permissions
for dir in "$SOURCEFOLDER"; do
  find "$dir" -type d -exec chmod 755 {} \;
  find "$dir" -type f -exec chmod 644 {} \;
done

# upload
lftp -f "
set ftp:ssl-allow no
open $HOST
user $USER $PASS
lcd $SOURCEFOLDER
mirror --reverse --verbose $SOURCEFOLDER $TARGETFOLDER
bye
"

{'fraction_non_alphanumeric': 0.22130013831258644, 'fraction_numerical': 0.03319502074688797, 'mean_word_length': 4.371287128712871, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, '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': '7087073', 'n_tokens_mistral': 951, 'n_tokens_neox': 883, 'n_words': 215}