诱变剂是一个python模块,它试图基于已经设置的标记和公共web资源尽可能多地扩展id3标记。

mutagenerate的Python项目详细描述


https://travis-ci.org/gtnx/mutagenerate.svg?branch=master

使用可用的Web资源自动扩展ID3标记(Amazon 例如)。基于诱变剂。

动机

您可能有标记很少的歌曲(例如,只有标题和艺术家) 你想知道更多的信息所以你的音乐数据库是 完成。例如,规范化的类型将允许您 轻松建立游戏列表。时间是宝贵的,手动填充 对你来说,信息似乎是个骗局。这个包的目标是 以合理的错误率自动获取此信息。

想法

在很多情况下,艺术家的头衔并不含糊 足够通过查询可用的web资源来收集其他标记。亚马逊 有一个庞大的数据库,用这两个信息查询它经常会给你 第一名的好成绩。

该软件包查询Amazon,然后收集以下信息:

  • 体裁
  • 专辑
  • 封面
  • 亚马逊网址

用法

使用二进制

仅使用Amazon First结果

mid3generate.py --source amazon "My Song.mp3"

使用MusicBrainz API

mid3generate.py --source musicbrainz "My Song.mp3"

ID3标记文件的人工列表

   mid3ls ~/Music
                                                                     filename |      artist |                                 album |                                           title | track | genre |  cover | year
          The Beatles - Sgt. Pepper's Lonely Hearts Club Band-DP82hSD_BXU.mp3 | The Beatles | Sgt. Pepper’s Lonely Hearts Club Band |           Sgt. Pepper’s Lonely Hearts Club Band |     1 |   Pop | 30734c | 1987
             The Beatles - With a Little Help from My Friends-aXYdXBbVhU4.mp3 | The Beatles | Sgt. Pepper’s Lonely Hearts Club Band |              With a Little Help From My Friends |     2 |   Pop | 30734c | 1987
                  The Beatles - Lucy in the Sky with Diamonds-e38oGAJ09f8.mp3 | The Beatles | Sgt. Pepper’s Lonely Hearts Club Band |                   Lucy in the Sky With Diamonds |     3 |   Pop | 30734c | 1987
                                 The Beatles - Getting Better-QxqueWiTrPA.mp3 | The Beatles | Sgt. Pepper’s Lonely Hearts Club Band |                                  Getting Better |     4 |   Pop | 30734c | 1987
                                  The Beatles - Fixing a Hole-SZXZRtsuN8s.mp3 | The Beatles | Sgt. Pepper’s Lonely Hearts Club Band |                                   Fixing a Hole |     5 |   Pop | 30734c | 1987
                             The Beatles - She's Leaving Home-oxYpUlcuQSM.mp3 | The Beatles | Sgt. Pepper’s Lonely Hearts Club Band |                              She’s Leaving Home |     6 |   Pop | 30734c | 1987
             The Beatles - Being for the Benefit of Mr. Kite!--ly7NYOLGck.mp3 | The Beatles | Sgt. Pepper’s Lonely Hearts Club Band |              Being for the Benefit of Mr. Kite! |     7 |   Pop | 30734c | 1987
                         The Beatles - Within You Without You-xVuZ83XgA9A.mp3 | The Beatles | Sgt. Pepper’s Lonely Hearts Club Band |                          Within You Without You |     8 |   Pop | 30734c | 1987
                            The Beatles - When I'm Sixty-Four-P0IgrkFMinI.mp3 | The Beatles | Sgt. Pepper’s Lonely Hearts Club Band |                             When I’m Sixty‐Four |     9 |   Pop | 30734c | 1987
                                    The Beatles - Lovely Rita-f00-n_blwC4.mp3 | The Beatles | Sgt. Pepper’s Lonely Hearts Club Band |                                     Lovely Rita |    10 |   Pop | 30734c | 1987
                      The Beatles - Good Morning Good Morning-as9txvOctPc.mp3 | The Beatles | Sgt. Pepper’s Lonely Hearts Club Band |                       Good Morning Good Morning |    11 |   Pop | 30734c | 1987
The Beatles  - Sgt. Pepper's Lonely Hearts Club Band(Reprise)-RPovvrhlBJM.mp3 | The Beatles | Sgt. Pepper’s Lonely Hearts Club Band | Sgt. Pepper’s Lonely Hearts Club Band (reprise) |    12 |   Pop | 30734c | 1987
                              The Beatles - A Day in the Life-shZh-gFCeVU.mp3 | The Beatles | Sgt. Pepper’s Lonely Hearts Club Band |                               A Day in the Life |    13 |   Pop | 30734c | 1987

为文件设置封面

mid3cover --set-cover path/to/cover song1.mp3 song2.m4a

展开盖子

mid3cover --expand-cover song1.mp3 song2.mp3

使用库

from mutagen.id3 import ID3
from mutagenerate.amazon import AmazonSource
from mutagenerate.musicbrainz import MusicBrainzSource

mp3 = ID3("My Song.mp3")
AmazonSource().generate_and_save(mp3, update=False, yes=True)
user = 'my-user-here'
password = 'my-password-here'
MusicBrainzSource(user, password).generate_and_save(mp3, update=False, yes=True)

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java组织。openqa。硒。遥远的UnreachableBrowserException如何定义EXE路径?   java Camel AdviceWith不使用指定文件替换端点   基于字符串的java图像加载   Java中的启发式算法,计算8个谜题状态的线性冲突   java为什么不支持文件。probeContentType返回null   JPA@EntityListeners、@PrePersist和Spring@RepositoryEventHandler、@HandleBeforeSave之间的java差异   可能前缀的Java字符串到字符串[]   安装rJava | Makefile时发生java错误。全部:38:target’libjri的配方。所以他失败了   Java公共静态void main()   java如何覆盖txt文件中的某些单词   java如何获得循环中生成的字符值之和?   java Log4j创建另一个具有相同属性的appender   java如何在从Axis2 Web服务客户端通过代理服务器调用Web服务时设置代理设置?   在Windows上安装Elasticsearch时发生java错误   java如何向EditText组件添加TextChangedListener?