Created
February 10, 2018 04:03
-
-
Save utgwkk/2eef992513c6287214a4097ba8e32990 to your computer and use it in GitHub Desktop.
カレントディレクトリのMP3のファイル名を,ID3をもとに変更するスクリプト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
You have to `pip install mutagen` before executing this script | |
""" | |
import os | |
from glob import glob | |
from mutagen.easyid3 import EasyID3 | |
for idx, path in enumerate(glob('*.mp3')): | |
tags = EasyID3(path) | |
new_path = '%02d - %s.mp3' % (idx + 1, tags['title'][0]) | |
os.rename(path, new_path) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment