Name | xspf-lib JSON |
Version |
0.3.4
JSON |
| download |
home_page | |
Summary | Library for work with xspf format |
upload_time | 2023-05-26 10:31:50 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.7 |
license | MIT |
keywords |
xspf
playlist
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
========
xspf-lib
========
.. image:: https://github.com/dem214/xspf-lib/workflows/Python%20package/badge.svg?branch=master
:target: https://github.com/dem214/xspf-lib/actions
:alt: Python package
.. image:: https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336
:target: https://pycqa.github.io/isort/
:alt: isort
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: black
.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit
:target: https://github.com/pre-commit/pre-commit
:alt: pre-commit
Library to work with xspf.
Requirements
------------
* `Python 3.8 or higher <https://www.python.org/downloads/>`_
Installing
----------
Install and update via `pip`_:
.. code-block:: text
pip install -U xspf-lib
Example
-------
1. Generating new playlist.
>>> import xspf_lib as xspf
>>> killer_queen = xspf.Track(location="file:///home/music/killer_queen.mp3",
title="Killer Queen",
creator="Queen",
album="Sheer Heart Attack",
trackNum=2,
duration=177000,
annotation="#2 in GB 1975",
info="https://ru.wikipedia.org/wiki/Killer_Queen",
image="file:///home/images/killer_queen_cover.png")
>>> anbtd = xspf.Track()
>>> anbtd.location = ["https://freemusic.example.com/loc.ogg",
"file:///home/music/anbtd.mp3"]
>>> anbtd.title = "Another One Bites the Dust"
>>> anbtd.creator = "Queen"
>>> anbtd.identifier = ["id1.group"]
>>> anbtd.link = [xspf.Link("link.namespace", "link.uri.info")]
>>> anbtd.meta = [xspf.Meta("meta.namespace", "METADATA_INFO")]
>>> playlist = xspf.Playlist(title="Some Tracks",
creator="myself",
annotation="I did this only for examples!.",
trackList=[killer_queen, anbtd])
>>> print(playlist.xml_string())
<playlist version="1" xmlns="http://xspf.org/ns/0/"><title>Some Tracks</title><creator>myself</creator><annotation>I did this only for examples!.</annotation><date>2020-02-03T14:29:59.199202+03:00</date><trackList><track><location>file:///home/music/killer_queen.mp3</location><title>Killer Queen</title><creator>Queen</creator><annotation>#2 in GB 1975</annotation><info>https://ru.wikipedia.org/wiki/Killer_Queen</info><image>file:///home/images/killer_queen_cover.png</image><album>Sheer Heart Attack</album><trackNum>2</trackNum><duration>177000</duration></track><track><location>https://freemusic.example.com/loc.ogg</location><location>file:///home/music/anbtd.mp3</location><identifier>id1.group</identifier><title>Another One Bites the Dust</title><creator>Queen</creator><link rel="link.namespace">link.uri.info</link><meta rel="meta.namespace">METADATA_INFO</meta></track></trackList></playlist>
>>> playlist.write("some_tracks.xspf")
2. Parsing from file.
>>> from xspf_lib import Playlist
>>> playlist = Playlist.parse("some_tracks.xspf")
License
-------
The license of the project is MIT License - see LICENSE_ file for details.
.. _LICENSE: https://github.com/dem214/xspf-lib/blob/master/LICENSE
.. _pip: https://pip.pypa.io/en/stable/quickstart
Raw data
{
"_id": null,
"home_page": "",
"name": "xspf-lib",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "xspf playlist",
"author": "",
"author_email": "Dzmitry Izaitka <dem214overlord@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/78/eb/90c96d2a94bc52297d66477d6d476b1559b306eba4b0ee557a41cadcf9c7/xspf_lib-0.3.4.tar.gz",
"platform": null,
"description": "========\nxspf-lib\n========\n\n.. image:: https://github.com/dem214/xspf-lib/workflows/Python%20package/badge.svg?branch=master\n :target: https://github.com/dem214/xspf-lib/actions\n :alt: Python package\n.. image:: https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336\n :target: https://pycqa.github.io/isort/\n :alt: isort\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/psf/black\n :alt: black\n.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\n :target: https://github.com/pre-commit/pre-commit\n :alt: pre-commit\n\n\nLibrary to work with xspf.\n\nRequirements\n------------\n\n* `Python 3.8 or higher <https://www.python.org/downloads/>`_\n\nInstalling\n----------\n\nInstall and update via `pip`_:\n\n.. code-block:: text\n\n pip install -U xspf-lib\n\nExample\n-------\n1. Generating new playlist.\n\n>>> import xspf_lib as xspf\n>>> killer_queen = xspf.Track(location=\"file:///home/music/killer_queen.mp3\",\n title=\"Killer Queen\",\n creator=\"Queen\",\n album=\"Sheer Heart Attack\",\n trackNum=2,\n duration=177000,\n annotation=\"#2 in GB 1975\",\n info=\"https://ru.wikipedia.org/wiki/Killer_Queen\",\n image=\"file:///home/images/killer_queen_cover.png\")\n>>> anbtd = xspf.Track()\n>>> anbtd.location = [\"https://freemusic.example.com/loc.ogg\",\n \"file:///home/music/anbtd.mp3\"]\n>>> anbtd.title = \"Another One Bites the Dust\"\n>>> anbtd.creator = \"Queen\"\n>>> anbtd.identifier = [\"id1.group\"]\n>>> anbtd.link = [xspf.Link(\"link.namespace\", \"link.uri.info\")]\n>>> anbtd.meta = [xspf.Meta(\"meta.namespace\", \"METADATA_INFO\")]\n>>> playlist = xspf.Playlist(title=\"Some Tracks\",\n creator=\"myself\",\n annotation=\"I did this only for examples!.\",\n trackList=[killer_queen, anbtd])\n>>> print(playlist.xml_string())\n<playlist version=\"1\" xmlns=\"http://xspf.org/ns/0/\"><title>Some Tracks</title><creator>myself</creator><annotation>I did this only for examples!.</annotation><date>2020-02-03T14:29:59.199202+03:00</date><trackList><track><location>file:///home/music/killer_queen.mp3</location><title>Killer Queen</title><creator>Queen</creator><annotation>#2 in GB 1975</annotation><info>https://ru.wikipedia.org/wiki/Killer_Queen</info><image>file:///home/images/killer_queen_cover.png</image><album>Sheer Heart Attack</album><trackNum>2</trackNum><duration>177000</duration></track><track><location>https://freemusic.example.com/loc.ogg</location><location>file:///home/music/anbtd.mp3</location><identifier>id1.group</identifier><title>Another One Bites the Dust</title><creator>Queen</creator><link rel=\"link.namespace\">link.uri.info</link><meta rel=\"meta.namespace\">METADATA_INFO</meta></track></trackList></playlist>\n>>> playlist.write(\"some_tracks.xspf\")\n\n2. Parsing from file.\n\n>>> from xspf_lib import Playlist\n>>> playlist = Playlist.parse(\"some_tracks.xspf\")\n\nLicense\n-------\n\nThe license of the project is MIT License - see LICENSE_ file for details.\n\n.. _LICENSE: https://github.com/dem214/xspf-lib/blob/master/LICENSE\n\n.. _pip: https://pip.pypa.io/en/stable/quickstart\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Library for work with xspf format",
"version": "0.3.4",
"project_urls": {
"Bug tracker": "https://github.com/dem214/xspf-lib/issues",
"Documentation": "https://xspf-lib.readthedocs.io/",
"Source": "https://github.com/dem214/xspf-lib"
},
"split_keywords": [
"xspf",
"playlist"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "662f4845e975a257910ba422838092a217cdb15409f013073de56bc03ef27a27",
"md5": "7ad4546e5e1bebcf46e7773b01eebe2e",
"sha256": "ff5dd25aaae6606a310ca395b9427ded58b16aa96703b0e614e8bc6ee645d75f"
},
"downloads": -1,
"filename": "xspf_lib-0.3.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7ad4546e5e1bebcf46e7773b01eebe2e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 13404,
"upload_time": "2023-05-26T10:31:48",
"upload_time_iso_8601": "2023-05-26T10:31:48.874065Z",
"url": "https://files.pythonhosted.org/packages/66/2f/4845e975a257910ba422838092a217cdb15409f013073de56bc03ef27a27/xspf_lib-0.3.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "78eb90c96d2a94bc52297d66477d6d476b1559b306eba4b0ee557a41cadcf9c7",
"md5": "90d4442dab86bfd2437c37dcaca6a3d4",
"sha256": "58ecbbe04dc00444042cb7d4933d796047a7411f4a74f14f7e8ca958b606a223"
},
"downloads": -1,
"filename": "xspf_lib-0.3.4.tar.gz",
"has_sig": false,
"md5_digest": "90d4442dab86bfd2437c37dcaca6a3d4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 25476,
"upload_time": "2023-05-26T10:31:50",
"upload_time_iso_8601": "2023-05-26T10:31:50.462510Z",
"url": "https://files.pythonhosted.org/packages/78/eb/90c96d2a94bc52297d66477d6d476b1559b306eba4b0ee557a41cadcf9c7/xspf_lib-0.3.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-26 10:31:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dem214",
"github_project": "xspf-lib",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "xspf-lib"
}