<commit_before>#!/bin/bash
# transcode from mp3 to high-quality (q=8) ogg vorbis
# bin-depends: mp3info2, lame, and oggenc
#
# tested on Fedora 20 (with RPM-Fusion repos enabled)
# adapted 2013 December 22 from
# https://www.linuxquestions.org/questions/programm \
# ing-9/bash-mp3-to-ogg-script-535632/

# find all the mp3's
find . -iname "*.mp3" | while read file
# for each mp3..
do
# pull the metadata / tags
  eval "`mp3info2 -p "ARTIST='%a' LABEL='%l' TRACK='%n'
                    TITLE='%t' GENRE='%g' YEAR='%y' 
                    COMMENT='%c'" "$file"`"
# set file name without file extension=mp3
  ofile=${file#./}
# pipe the raw audio to OGGENC encoder
# saving at quality=8 with original metadata
  lame --decode "${file}" - |
    oggenc -q 8 -a "$ARTIST" -t "$TITLE" \
    -l "$LABEL" -G "$GENRE" -d "$YEAR" -N "$TRACK" \
    -c "comment=$COMMENT" -o "${ofile%[Mm][Pp]3}ogg" -
done<commit_msg>more verbose comments<commit_after>#!/bin/bash
# transcode from mp3 to high-quality (q=8) ogg vorbis
# bin-depends: mp3info2, lame, and oggenc
#
# tested on Fedora 20 (with RPM-Fusion repos enabled)
# adapted 2013 December 22 from
# https://www.linuxquestions.org/questions/programm \
# ing-9/bash-mp3-to-ogg-script-535632/

# find all the mp3's in the current directory
find . -iname "*.mp3" | while read file
# for each mp3..
do
# pull the metadata / tags from the mp3
  eval "`mp3info2 -p "ARTIST='%a' LABEL='%l' TRACK='%n'
                    TITLE='%t' GENRE='%g' YEAR='%y' 
                    COMMENT='%c'" "$file"`"
# set file name without file extension=mp3
  ofile=${file#./}
# pipe the raw audio to OGGENC encoder
# saving at quality=8 with original metadata
  lame --decode "${file}" - |
    oggenc -q 8 -a "$ARTIST" -t "$TITLE" \
    -l "$LABEL" -G "$GENRE" -d "$YEAR" -N "$TRACK" \
    -c "comment=$COMMENT" -o "${ofile%[Mm][Pp]3}ogg" -
done
{'fraction_non_alphanumeric': 0.16952789699570817, 'fraction_numerical': 0.03165236051502146, 'mean_word_length': 3.036796536796537, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 17, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '893230', 'n_tokens_mistral': 762, 'n_tokens_neox': 700, 'n_words': 210}