Coder Social home page Coder Social logo

stagger's Introduction

Stagger

https://travis-ci.org/lorentey/stagger.svg?branch=master

Stagger is an ID3v1/ID3v2 tag manipulation package written in pure Python 3.

The ID3v2 tag format is notorious for its useless specification documents and its quirky, mutually incompatible part-implementations. Stagger is to provide a robust tagging package that is able to handle all the various badly formatted tags out there and allow you to convert them to a consensus format.

The package has a stable API and has been used in production for several years.

Features currently implemented:

  • Reads and writes ID3 v1.0, 1.1, 2.2, 2.3 and 2.4 tags.
  • Supports conversion between tag versions.
  • Supports unsynchronized tags (all versions) and compressed frames (2.3 and 2.4 only).
  • Full Unicode support, with customizable text encoding preferences.
  • Has built-in support for all standard frame types (plus a few nonstandard ones). Easily extensible with additional frame types if needed.
  • Supports duplicate frames and multiple text strings in a single frame.
  • Supports reading/writing frames of unrecognized types and frames with invalid data. Automatically recognizes unknown text and URL frames.
  • The order of frames in a tag is fully customizable.
  • Package comes with extensive unit tests for an extra measure of code kwalitee.
  • Tested under Mac OS X, Windows and GNU/Linux.
>>> import stagger
>>> from stagger.id3 import *       # contains ID3 frame types

>>> tag = stagger.read_tag("track01.mp3")

>>> tag[TIT2]                                      # tag is a MutableMapping
TIT2(utf-8 "Staralfur")

>>> tag[TIT2] = TIT2(text="The Show Must Go On")   # Explicit constructor
>>> tag[TIT2] = "The Show Must Go On"              # Implicit constructor
>>> tag[TIT2] = ("Foo", "Bar", "Baz")              # Multiple strings
>>> tag.title = "The Battle of Evermore"           # Alternative, friendlier API

>>> tag.write()

stagger's People

Contributors

lorentey avatar pepie34 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.