{ "info": { "author": "Michael Howitz", "author_email": "icemac@gmx.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Religion", "License :: OSI Approved", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: Implementation", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Religion", "Topic :: Software Development", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Processing", "Topic :: Text Processing :: Filters" ], "description": "===================\n icemac.songbeamer\n===================\n\n.. image:: https://travis-ci.com/icemac/icemac.songbeamer.svg?branch=master\n :target: https://travis-ci.com/icemac/icemac.songbeamer\n.. image:: https://coveralls.io/repos/github/icemac/icemac.songbeamer/badge.svg?branch=master\n :target: https://coveralls.io/github/icemac/icemac.songbeamer?branch=master\n\nLibrary to read and write `SongBeamer`_ files.\n\nThis package is licensed under the MIT License, see LICENSE.TXT inside the\npackage.\n\n.. contents::\n\nSupported SongBeamer versions\n=============================\n\nCurrently Songbeamer versions 2 to 4 are supported. (Internal version\nnumber in .sng files: ``#Version=3``.)\n\n.. _`SongBeamer` : http://songbeamer.com\n\nSupported Python version\n========================\n\nRuns only on Python 3.7. Older Python versions are not supported.\n\nRunning Tests\n=============\n\nTo run the tests call::\n\n $ tox\n\n(You maybe have to install `tox` beforehand using: ``pip install tox``.)\n\nHacking\n=======\n\nFork me on: https://github.com:/icemac/icemac.songbeamer\n\n\n=========\n Changes\n=========\n\n1.0 (2018-11-02)\n================\n\nBackwards incompatible changes\n------------------------------\n\n- The ``icemac.songbeamer.SNG`` instances no longer store the data on the\n `data` attribute but it now behaves like a ``dict`` thus allowing direct dict\n access to the data.\n\n- It is no longer possible to use attributes on ``icemac.songbeamer.SNG``\n instances to read and store encoded bytes data. Either read/write text data\n from/to the ``icemac.songbeamer.SNG`` instance using the `dict` API or use\n the ``parse`` function (see next item) to import resp. use ``.SNG.export()``\n to export the data encoded.\n\n- Add a function ``icemac.songbeamer.parse()`` converting a byte stream\n into a ``icemac.songbeamer.SNG`` instance. It replaces the class method on\n the `SNG` instance. It returns ``None`` if the data cannot be\n parsed and it logs an error message.\n\n- Drop support for Python 3.5, 3.6 and PyPy3, thus only supporting Python 3.7\n now.\n\nFeatures\n--------\n\n- Add a function ``icemac.songbeamer.open()`` to open a file given by a path\n and get a ``icemac.songbeamer.SNG`` instance.\n\n- Make ``.SNG.export()`` robust against missing text in songs.\n\n- Add a command line script `songbeamer-xls-export` exporting titles and song\n book numbers from folder containing SongBeamer files to an XLS file. To be\n able to use it `icemac.songbeamer` has to be installed with the ``xls`` extra\n like this::\n\n $ pip install \"icemac.songbeamer[xls]\"\n\n- Support UTF-8 encoded SongBeamer files starting with the UTF-8 BOM.\n\n- Change license from ZPL to MIT.\n\n\n0.3 (2018-10-07)\n================\n\n- Add support for Python 3.5 to 3.7 and PyPy3.\n\n- Drop support for Python 3.2 and 3.3.\n\n\n0.2.0 (2012-10-31)\n==================\n\n- Add ability to parse bytes objects.\n\n- Sorting keys in export file to be compatible across Python 3.2 and 3.3.\n\n\n0.1.0 (2012-05-05)\n==================\n\n- Initial public release.\n\n\n\n\n=======\n To do\n=======\n\nImplementations\n===============\n\n* import/export of .col files (schedules)\n\n\nOpen Questions\n==============\n\n* Are `Transpose` and `Speed` actually int values?\n\n\n=======\n Usage\n=======\n\nImporting a .sng file\n=====================\n\nTo import a `.sng` file use the ``open`` function in the module\n``icemac.songbeamer``. It expects a filename and path and returns a SNG\ninstance:\n\n >>> import icemac.songbeamer\n >>> import pkg_resources\n >>> filename = pkg_resources.resource_filename(\n ... 'icemac.songbeamer.tests', 'example.sng')\n >>> sng = icemac.songbeamer.open(filename)\n >>> sng.__class__\n \n\nAlternatively there is a function ``parse`` in the same module which parses\nbytes (e. g. read from a binary file) into an SNG instance:\n\n >>> with open(filename, 'rb') as file:\n ... sng = icemac.songbeamer.parse(file.read())\n >>> sng.__class__\n \n\nAccessing a file's data\n=======================\n\nThe SNG instance extends ``dict`` so the date is accessible via the usual\npython ``dict`` API:\n\n >>> from pprint import pprint\n >>> pprint(sng)\n {'Author': 'me',\n 'Text': ['La la la', '---', 'Lei lei lei'],\n 'Version': 3}\n >>> sng['Title'] = 'M\u00ff \u0161\u00f4\u00f1g'\n\nThe values are stored as numbers resp. strings (text):\n\n >>> sng['Version']\n 3\n >>> sng['Author']\n 'me'\n\nExporting a .sng file\n=====================\n\n >>> from tempfile import TemporaryFile\n\nTo export to a .sng file use the ``export`` method. It expects a byte stream\n(io.BytesIO or open binary file) as argument to write into:\n\n >>> with TemporaryFile() as file:\n ... sng.export(file)\n ... _ = file.seek(0)\n ... pprint(file.readlines())\n [b'#Author=me\\r\\n',\n b'#Title=M\\xff \\x9a\\xf4\\xf1g\\r\\n',\n b'#Version=3\\r\\n',\n b'---\\r\\n',\n b'La la la\\r\\n',\n b'---\\r\\n',\n b'Lei lei lei']\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/icemac/icemac.songbeamer", "keywords": "python 3 songbeamer import export", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "icemac.songbeamer", "package_url": "https://pypi.org/project/icemac.songbeamer/", "platform": "", "project_url": "https://pypi.org/project/icemac.songbeamer/", "project_urls": { "Homepage": "https://github.com/icemac/icemac.songbeamer" }, "release_url": "https://pypi.org/project/icemac.songbeamer/1.0/", "requires_dist": [ "setuptools", "pytest; extra == 'test'", "xlrd; extra == 'test'", "xlwt; extra == 'xls'" ], "requires_python": "", "summary": "Python 3 library to import from and export to SongBeamer format.", "version": "1.0" }, "last_serial": 4443752, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "6713507d668c3c35c0d6f7d2e24ea975", "sha256": "53e06f099d6fd30498813dd5295324c507901c5e947ee18b337b7905bb7e8451" }, "downloads": -1, "filename": "icemac.songbeamer-0.1.0.tar.gz", "has_sig": false, "md5_digest": "6713507d668c3c35c0d6f7d2e24ea975", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7864, "upload_time": "2012-05-05T18:01:52", "url": "https://files.pythonhosted.org/packages/09/22/493c754826bd11a16d058a3c74b480c63124971f3d9c75d72ce2e95bf168/icemac.songbeamer-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "af73e915c1177cdb7860551bd289b9cd", "sha256": "ca40fbbf7fe903852a767f7e43fbbe4084c59d076befddb81b1876e4e82ca03e" }, "downloads": -1, "filename": "icemac.songbeamer-0.2.0.zip", "has_sig": false, "md5_digest": "af73e915c1177cdb7860551bd289b9cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15244, "upload_time": "2012-10-31T08:30:25", "url": "https://files.pythonhosted.org/packages/b6/06/18abd4be5f93baaa658537c1b1bf305b685cede01d55fed9c1a8ec6a7e8f/icemac.songbeamer-0.2.0.zip" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "8660f1a9f109c912f901a9e0bf4095e8", "sha256": "f98108a9f1bb122d8221d8936888069bf697b6dcc38bc433166fe791546b6f87" }, "downloads": -1, "filename": "icemac.songbeamer-0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8660f1a9f109c912f901a9e0bf4095e8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10841, "upload_time": "2018-10-07T14:28:35", "url": "https://files.pythonhosted.org/packages/cf/27/482b7de6f0609859f41ec0c8140a1ffa3df34dcd267554e4d58251e2e2a7/icemac.songbeamer-0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e5cadff7ab9daffcdc797a306bf9a0a9", "sha256": "3aafed6bb2815974ad0db522e689499928366eb12029dc03c83ff998979c6d0b" }, "downloads": -1, "filename": "icemac.songbeamer-0.3.tar.gz", "has_sig": false, "md5_digest": "e5cadff7ab9daffcdc797a306bf9a0a9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7986, "upload_time": "2018-10-07T14:28:38", "url": "https://files.pythonhosted.org/packages/d6/4c/456a8afcbc130b9d667b6b50764f72d1e7d46799fc685202d3e17f93d12a/icemac.songbeamer-0.3.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "cb75cfc4c2758bb44fa5f4173ccaaf2f", "sha256": "5371e7c61fc4ccdbd767283d1d6f6013e0541cd88e8d990b75736a7df7a675c7" }, "downloads": -1, "filename": "icemac.songbeamer-1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "cb75cfc4c2758bb44fa5f4173ccaaf2f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15515, "upload_time": "2018-11-02T09:01:36", "url": "https://files.pythonhosted.org/packages/04/a2/2c657a0c3ba76b02d2b8797c07763399a969b5452117a34089ea2d9b9b71/icemac.songbeamer-1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a4ee67a235fc69356ad81b393bd1d4c8", "sha256": "1ddb798612043e4cfae806a1a2914dd485c14ec56034195873a0786702373167" }, "downloads": -1, "filename": "icemac.songbeamer-1.0.tar.gz", "has_sig": false, "md5_digest": "a4ee67a235fc69356ad81b393bd1d4c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11244, "upload_time": "2018-11-02T09:01:38", "url": "https://files.pythonhosted.org/packages/bf/15/fd6db50d69c547e1fd558303c5c224b087a08b071221708bfaeae24d7e01/icemac.songbeamer-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cb75cfc4c2758bb44fa5f4173ccaaf2f", "sha256": "5371e7c61fc4ccdbd767283d1d6f6013e0541cd88e8d990b75736a7df7a675c7" }, "downloads": -1, "filename": "icemac.songbeamer-1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "cb75cfc4c2758bb44fa5f4173ccaaf2f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15515, "upload_time": "2018-11-02T09:01:36", "url": "https://files.pythonhosted.org/packages/04/a2/2c657a0c3ba76b02d2b8797c07763399a969b5452117a34089ea2d9b9b71/icemac.songbeamer-1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a4ee67a235fc69356ad81b393bd1d4c8", "sha256": "1ddb798612043e4cfae806a1a2914dd485c14ec56034195873a0786702373167" }, "downloads": -1, "filename": "icemac.songbeamer-1.0.tar.gz", "has_sig": false, "md5_digest": "a4ee67a235fc69356ad81b393bd1d4c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11244, "upload_time": "2018-11-02T09:01:38", "url": "https://files.pythonhosted.org/packages/bf/15/fd6db50d69c547e1fd558303c5c224b087a08b071221708bfaeae24d7e01/icemac.songbeamer-1.0.tar.gz" } ] }