2

I posted this earlier but it got put on hold as too vague. Hopefully this clears it up.

I'm looking to populate a table (size x*y, for x items and y properties) from the file metadata in a folder. Specifically I'm looking at music files, so the properties are: year, length, and genre.

I tried looking at questions related to file properties, but those just came back with file size, date last modified, etc.

It's just a for loop:

f = open("output.txt", "w")  
for files in folder:  
    year[] += file.year  
    genre[] += file.genre  
    length[] += file.length
    f.write(file.year + "\t" + file.genre + "\t" + file.length + "\n")

I just don't know what the python functions are for accessing the metadata, to replace 'file.year' and etc.

EDIT: I haven't been able to install anything via 'pip' on my computer - is there a trick to it or something? I'm on Windows 7.

1 Answer 1

1

You need libraries that parse audio files and extract metadata like eyeD3, Mutagen and such.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.