<commit_before>#!/usr/bin/env bash

FNAME=$1
NAME=$2
LINK=$3

JPG=${FNAME/cr2/jpg}
LATEST=${PANDIR}/images/latest.jpg

# We only make a thumb of latest
THUMB=${LATEST/.jpg/_tn.png}

# Convert CR2 to JPG
dcraw -c -q 3 -a -w -H 5 -b 5 ${FNAME} | cjpeg -quality 90 > ${JPG}

if [[ $LINK == 'link' ]]; then
    # Make thumbnail from jpg. Roughly 1/8th original
    convert ${JPG} -thumbnail 651x450 -background black -fill red \
        -font ubuntu -pointsize 12 label:"${NAME}" -gravity South -append ${THUMB}

    # Remove symlink
    rm ${LATEST}
    ln -s ${JPG} ${LATEST}
    # Annotate the symlink
    convert ${LATEST} -orient bottom-right -background black -fill red -font ubuntu -pointsize 72 \
        label:"${NAME}" -gravity South -append ${LATEST}
fi<commit_msg>Adjusting pretty image<commit_after>#!/usr/bin/env bash

FNAME=$1
NAME=$2
LINK=$3

JPG=${FNAME/cr2/jpg}
LATEST=${PANDIR}/images/latest.jpg

# We only make a thumb of latest
THUMB=${LATEST/.jpg/_tn.png}

# Convert CR2 to JPG
dcraw -c -q 3 -a -w -H 5 -b 5 ${FNAME} | cjpeg -quality 90 > ${JPG}

if [[ $LINK == 'link' ]]; then
    # Make thumbnail from jpg. Roughly 1/8th original
    convert ${JPG} -thumbnail 651x450 -background black -fill red \
        -font ubuntu -pointsize 12 label:"${NAME}" -gravity South -append ${THUMB}

    # Remove symlink
    rm ${LATEST}
    ln -s ${JPG} ${LATEST}
    # Annotate the symlink
    convert ${LATEST} -strip -orient top-left -background black -fill red -font ubuntu -pointsize 72 \
        label:"${NAME}" -gravity South -append ${LATEST}
fi
{'fraction_non_alphanumeric': 0.15231362467866325, 'fraction_numerical': 0.028277634961439587, 'mean_word_length': 3.0232558139534884, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5682413', 'n_tokens_mistral': 622, 'n_tokens_neox': 573, 'n_words': 184}