<commit_before>#!/usr/bin/env python
"""Handles decoding wavpack files"""
import subprocess
import config

HANDLES=['wv']

def decode(inF, outF):
    ##TODO
    pass

def getTag(file, tag):
    p = subprocess.Popen(['wvunpack', '-q', '-x', tag, file],
            stdout=subprocess.PIPE)
    p.wait()
    output = p.communicate()[0]
    return output or None

def getMetaData(file):
    meta = { }
    meta['Title'] = getTag(file, "Title")
    meta['Artist'] = getTag(file, "Artist")
    meta['Album'] = getTag(file, "Album")
    meta['Genre'] = getTag(file, "Genre")
    meta['Track Number'] = getTag(file, "Track")
    meta['Tracktotal'] = getTag(file, "Tracktotal")
    meta['Date'] = getTag(file, "Year")

    for index in meta:
        if not meta[index]:
            del meta[index]
    return meta<commit_msg>'D' should have been lower case here<commit_after>#!/usr/bin/env python
"""Handles decoding wavpack files"""
import subprocess
import config

HANDLES=['wv']

def decode(inF, outF):
    ##TODO
    pass

def getTag(file, tag):
    p = subprocess.Popen(['wvunpack', '-q', '-x', tag, file],
            stdout=subprocess.PIPE)
    p.wait()
    output = p.communicate()[0]
    return output or None

def getMetadata(file):
    meta = { }
    meta['Title'] = getTag(file, "Title")
    meta['Artist'] = getTag(file, "Artist")
    meta['Album'] = getTag(file, "Album")
    meta['Genre'] = getTag(file, "Genre")
    meta['Track Number'] = getTag(file, "Track")
    meta['Tracktotal'] = getTag(file, "Tracktotal")
    meta['Date'] = getTag(file, "Year")

    for index in meta:
        if not meta[index]:
            del meta[index]
    return meta
{'fraction_non_alphanumeric': 0.1716012084592145, 'fraction_numerical': 0.0012084592145015106, 'mean_word_length': 3.2790697674418605, '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': '4290138', 'n_tokens_mistral': 582, 'n_tokens_neox': 570, 'n_words': 143}