webvtt-py


Namewebvtt-py JSON
Version 0.4.6 PyPI version JSON
download
home_pagehttps://github.com/glut23/webvtt-py
SummaryWebVTT reader, writer and segmenter
upload_time2020-11-18 09:59:45
maintainer
docs_urlNone
authorAlejandro Mendez
requires_python>=3.4
licenseMIT
keywords webvtt captions
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            webvtt-py
=========

.. image:: https://img.shields.io/pypi/v/webvtt-py.svg
        :target: https://pypi.python.org/pypi/webvtt-py

.. image:: https://travis-ci.org/glut23/webvtt-py.svg?branch=master
        :target: https://travis-ci.org/glut23/webvtt-py

.. image:: https://readthedocs.org/projects/webvtt-py/badge/?version=latest
        :target: http://webvtt-py.readthedocs.io/en/latest/?badge=latest
        :alt: Documentation Status

``webvtt-py`` is a Python module for reading/writing WebVTT_ caption files. It also features caption segmentation useful when captioning `HLS videos`_.

Requires Python 3.4+.

Documentation is available at http://webvtt-py.readthedocs.io.

.. _`WebVTT`: http://dev.w3.org/html5/webvtt/
.. _`HLS videos`: https://tools.ietf.org/html/draft-pantos-http-live-streaming-19

Installation
------------

::

    $ pip install webvtt-py

Usage
-----

.. code-block:: python

  import webvtt

  for caption in webvtt.read('captions.vtt'):
      print(caption.start)
      print(caption.end)
      print(caption.text)

Segmenting for HLS
------------------

.. code-block:: python

  import webvtt

  webvtt.segment('captions.vtt', 'output/path')

Converting captions from other formats
--------------------------------------

Supported formats:

* SubRip (.srt)
* YouTube SBV (.sbv)

.. code-block:: python

  import webvtt

  webvtt = webvtt.from_srt('captions.srt')
  webvtt.save()

  # one liner if we just need to convert without editing
  webvtt.from_sbv('captions.sbv').save()

CLI
---
Caption segmentation is also available from the command line:
::

    $ webvtt segment captions.vtt --output destination/directoy

License
-------

Licensed under the MIT License.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/glut23/webvtt-py",
    "name": "webvtt-py",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.4",
    "maintainer_email": "",
    "keywords": "webvtt captions",
    "author": "Alejandro Mendez",
    "author_email": "amendez23@gmail.com",
    "download_url": "",
    "platform": "",
    "description": "webvtt-py\n=========\n\n.. image:: https://img.shields.io/pypi/v/webvtt-py.svg\n        :target: https://pypi.python.org/pypi/webvtt-py\n\n.. image:: https://travis-ci.org/glut23/webvtt-py.svg?branch=master\n        :target: https://travis-ci.org/glut23/webvtt-py\n\n.. image:: https://readthedocs.org/projects/webvtt-py/badge/?version=latest\n        :target: http://webvtt-py.readthedocs.io/en/latest/?badge=latest\n        :alt: Documentation Status\n\n``webvtt-py`` is a Python module for reading/writing WebVTT_ caption files. It also features caption segmentation useful when captioning `HLS videos`_.\n\nRequires Python 3.4+.\n\nDocumentation is available at http://webvtt-py.readthedocs.io.\n\n.. _`WebVTT`: http://dev.w3.org/html5/webvtt/\n.. _`HLS videos`: https://tools.ietf.org/html/draft-pantos-http-live-streaming-19\n\nInstallation\n------------\n\n::\n\n    $ pip install webvtt-py\n\nUsage\n-----\n\n.. code-block:: python\n\n  import webvtt\n\n  for caption in webvtt.read('captions.vtt'):\n      print(caption.start)\n      print(caption.end)\n      print(caption.text)\n\nSegmenting for HLS\n------------------\n\n.. code-block:: python\n\n  import webvtt\n\n  webvtt.segment('captions.vtt', 'output/path')\n\nConverting captions from other formats\n--------------------------------------\n\nSupported formats:\n\n* SubRip (.srt)\n* YouTube SBV (.sbv)\n\n.. code-block:: python\n\n  import webvtt\n\n  webvtt = webvtt.from_srt('captions.srt')\n  webvtt.save()\n\n  # one liner if we just need to convert without editing\n  webvtt.from_sbv('captions.sbv').save()\n\nCLI\n---\nCaption segmentation is also available from the command line:\n::\n\n    $ webvtt segment captions.vtt --output destination/directoy\n\nLicense\n-------\n\nLicensed under the MIT License.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "WebVTT reader, writer and segmenter",
    "version": "0.4.6",
    "split_keywords": [
        "webvtt",
        "captions"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "3841639ba16b2c7b37152dba6d9a3709",
                "sha256": "5cf9da2a8c34bc789db599377be87b228b7e4734c629597edd27a8054e004a57"
            },
            "downloads": -1,
            "filename": "webvtt_py-0.4.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3841639ba16b2c7b37152dba6d9a3709",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.4",
            "size": 16981,
            "upload_time": "2020-11-18T09:59:45",
            "upload_time_iso_8601": "2020-11-18T09:59:45.494291Z",
            "url": "https://files.pythonhosted.org/packages/1b/83/115b001f8c79f9580834faf214062b1ff69f61c62ab1a5c3c1e5e347d4a3/webvtt_py-0.4.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2020-11-18 09:59:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "glut23",
    "github_project": "webvtt-py",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "webvtt-py"
}
        
Elapsed time: 0.01862s