<commit_before>#!/bin/sh
# Front-end for the POV-ray raytracer.
#
# Author: <NAME> <<EMAIL>>
# Last modified: 2016-06-12 16:20:37 +0200
#
# To the extent possible under law, <NAME> has waived all copyright and
# related or neighboring rights to povmake. This work is published from the
# Netherlands. See http://creativecommons.org/publicdomain/zero/1.0/

# Check for special programs that are used in this script.
P=povray
which $P >/dev/null 2>&1
if [ $? -ne 0 ]; then
    P=povray37
    which $P >/dev/null 2>&1
    if [ $? -ne 0 ]; then
        echo "$(basename $-1): The program \"povray[37]\" cannot be found."
        exit 0
    fi
fi

if [ $# -ne 3 ]; then
    echo "Usage: povmake <size> <quality> file";
    echo "where <size> is one of: s[mall] m[edium] l[arge] x[large] h[uge]";
    echo "and <quality> is one of: l[ow] m[ed] h[igh] [e]x[tra]";
    echo "Saves files in PNG format.";
    exit 1;
fi

set -e
# get the filename without the extension
FILEBASE=`basename $3|sed -E -e 's/(.*)(\..*)/\1/g'`
#echo $FILEBASE

# get the file's extension
FILEEXT=$(echo $3|sed -E -e 's/(.*\.)([^\.+])/\2/g')
#echo $FILEEXT

if [ ! "$FILEEXT" = "pov" ]; then
    echo "$3 is not a POVray-source file!";
    exit 3;
fi

OPTIONS='+I'$3' +O'$FILEBASE'.png +FN -P'

case $1 in
    s|small)  OPTIONS=$OPTIONS' +W640 +H480 +D';;
    m|medium) OPTIONS=$OPTIONS' +W800 +H600 +D';;
    l|large) OPTIONS=$OPTIONS' +W1024 +H768 +D';;
    h|huge) OPTIONS=$OPTIONS' +W2560 +H2048 -D';;
    *) echo "Unknown option?"; exit 3;;
esac

case $2 in
    l|low) OPTIONS=$OPTIONS' +SP16 +EP8 +Q3';;
    m|medium) OPTIONS=$OPTIONS' +SP8 +EP4 +Q7';;
    h|high) OPTIONS=$OPTIONS' +SP2 +EP2 +A0.05 +R9 +Q9';;
    x|extra) OPTIONS=$OPTIONS' +SP2 +EP2 +A0.05 +R9 +Q11';;
    *) echo "Unknown option?"; exit 4;;
esac

echo "options: "$OPTIONS
echo -n "povray is running... "
$P $OPTIONS
echo "done."
<commit_msg>Higher quality settings for povmake.<commit_after>#!/bin/sh
# Front-end for the POV-ray raytracer.
#
# Author: <NAME> <<EMAIL>>
# Last modified: 2016-06-12 16:59:04 +0200
#
# To the extent possible under law, <NAME> has waived all copyright and
# related or neighboring rights to povmake. This work is published from the
# Netherlands. See http://creativecommons.org/publicdomain/zero/1.0/

# Check for special programs that are used in this script.
P=povray
which $P >/dev/null 2>&1
if [ $? -ne 0 ]; then
    P=povray37
    which $P >/dev/null 2>&1
    if [ $? -ne 0 ]; then
        echo "$(basename $-1): The program \"povray[37]\" cannot be found."
        exit 0
    fi
fi

if [ $# -ne 3 ]; then
    echo "Usage: povmake <size> <quality> file";
    echo "where <size> is one of: s[mall] m[edium] l[arge] x[large] h[uge]";
    echo "and <quality> is one of: l[ow] m[ed] h[igh] [e]x[tra]";
    echo "Saves files in PNG format.";
    exit 1;
fi

set -e
# get the filename without the extension
FILEBASE=`basename $3|sed -E -e 's/(.*)(\..*)/\1/g'`
#echo $FILEBASE

# get the file's extension
FILEEXT=$(echo $3|sed -E -e 's/(.*\.)([^\.+])/\2/g')
#echo $FILEEXT

if [ ! "$FILEEXT" = "pov" ]; then
    echo "$3 is not a POVray-source file!";
    exit 3;
fi

OPTIONS='+I'$3' +O'$FILEBASE'.png +FN'

case $1 in
    s|small)  OPTIONS=$OPTIONS' +W640 +H480 +D +P';;
    m|medium) OPTIONS=$OPTIONS' +W800 +H600 +D +P';;
    l|large) OPTIONS=$OPTIONS' +W1024 +H768 +D +P';;
    x|xlarge) OPTIONS=$OPTIONS' +W1280 +H1024 +D +P';;
    h|huge) OPTIONS=$OPTIONS' +W2560 +H2048 -D -P';;
    *) echo "Unknown option?"; exit 3;;
esac

case $2 in
    l|low) OPTIONS=$OPTIONS' +SP16 +EP8 +Q3';;
    m|medium) OPTIONS=$OPTIONS' +SP8 +EP4 +Q7';;
    h|high) OPTIONS=$OPTIONS' +SP2 +EP2 +AM2 +A0.05 +R9 +Q9';;
    x|extra) OPTIONS=$OPTIONS' +SP2 +EP2 +AM2 +A0.05 +R9 +Q11';;
    *) echo "Unknown option?"; exit 4;;
esac

echo "options: "$OPTIONS
echo -n "povray is running... "
$P $OPTIONS
echo "done."

{'fraction_non_alphanumeric': 0.18877682958365657, 'fraction_numerical': 0.05120248254460822, 'mean_word_length': 3.293007769145394, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 27, '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': '6106187', 'n_tokens_mistral': 1692, 'n_tokens_neox': 1567, 'n_words': 497}