<commit_before>#!/bin/bash
if [ $1 = "movies" ]; then
        sourceDirectory="/media/popcorn/Transfer/ubuserver/Movies/"
        targetDirectory="/media/Media/Movies2/"
elif [ $1 = "kids" ]; then
        sourceDirectory="/media/popcorn/Transfer/ubuserver/Kids/"
        targetDirectory="/media/Media/Kids2/"
fi

#First go into our source directory
cd $sourceDirectory

#Move all files from subfolders into root folder
find . -type f -mindepth 2 -exec mv -i -f -- {} . \;

#Remove stuff we don't care about 
#Based on extensions txt|nfo|png|jpg|url|sfv|srt
find . -type f -name "*.txt" -exec rm -f {} \;
find . -type f -name "*.nfo" -exec rm -f {} \;
find . -type f -name "*.png" -exec rm -f {} \;
find . -type f -name "*.jpg" -exec rm -f {} \;
find . -type f -name "*.url" -exec rm -f {} \;
find . -type f -name "*.sfv" -exec rm -f {} \;
find . -type f -name "*.srt" -exec rm -f {} \;

#Based on names sample|trailer|extras|
find . -type f -name "*sample*" -exec rm -f {} \;
find . -type f -name "*trailer*" -exec rm -f {} \;
find . -type f -name "*extras*" -exec rm -f {} \;<commit_msg>Exit with error if script missing arguments, remove .nfo file<commit_after>#!/bin/bash
if [ $1 = "movies" ]; then
        sourceDirectory="/media/popcorn/Transfer/ubuserver/Movies/"
        targetDirectory="/media/Media/Movies2/"
elif [ $1 = "kids" ]; then
        sourceDirectory="/media/popcorn/Transfer/ubuserver/Kids/"
        targetDirectory="/media/Media/Kids2/"
else
	exit 1
fi

#First go into our source directory
cd $sourceDirectory

#Move all files from subfolders into root folder
find . -type f -mindepth 2 -exec mv -i -f -- {} . \;

#Remove stuff we don't care about 
#Based on extensions txt|nfo|png|jpg|url|sfv|srt
find . -type f -name "*.txt" -exec rm -f {} \;
find . -type f -name "*.nfo" -exec rm -f {} \;
find . -type f -name "*.png" -exec rm -f {} \;
find . -type f -name "*.jpg" -exec rm -f {} \;
find . -type f -name "*.url" -exec rm -f {} \;
find . -type f -name "*.sfv" -exec rm -f {} \;
find . -type f -name "*.srt" -exec rm -f {} \;
find . -type f -name "*.nfo" -exec rm -f {} \;

#Based on names sample|trailer|extras|
find . -type f -name "*sample*" -exec rm -f {} \;
find . -type f -name "*trailer*" -exec rm -f {} \;
find . -type f -name "*extras*" -exec rm -f {} \;
{'fraction_non_alphanumeric': 0.19220665499124343, 'fraction_numerical': 0.004816112084063047, 'mean_word_length': 2.509984639016897, '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': '466794', 'n_tokens_mistral': 840, 'n_tokens_neox': 818, 'n_words': 286}