{ "info": { "author": "Nicol\u00e1s Cerna", "author_email": "nicolascerna@uc.cl", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "## Pyzub: Manipulate subtitles\n\nPyzub is a small package and CLI for manipulating subtitles\n\n**Suported Formats:**\n\n- SubRip [.srt].\n\n**Plans to Support:**\n\n- SubStation Alpha [.ssa]\n- SubViewer [.sub]\n- Universal Subtitle Format [.usf]\n\n### Installation:\n\nRun `pip install pyzub`\n\n### Command Line Interface:\n\nAt the moment only the *slide* command is available (arguably the most important feature).\nThe *slide* command of *pyzub* lets you move your subtitles so you can synchronize them manually.\n\n```\n$ pyzub slide -h\nUsage: pyzub slide [OPTIONS] FILEPATH\n\nOptions:\n --hours FLOAT\n --minutes FLOAT\n --seconds FLOAT\n --milliseconds FLOAT\n --microseconds FLOAT\n --overwrite Modifies the subtitle file in place.\n --verbose Displays a progress bar and a message when finished.\n --help, -h Show this message and exit.\n```\n\n**Example:**\n\nThis will move your subtitles by 2.5 seconds (you can also give negative values):\n\n```bash\n$ pyzub slide Game_of_Thrones_s03ep09.srt --seconds 2 --milliseconds 500\n```\n\nBy default *pyzub* will generate an output file named *Game_of_Thrones_s03ep09_MODIFIED.srt*, unless ```--overwrite``` is used. The output file will always be in *utf-8* encoding and use your system new line character.\n\nThis is OK too:\n\n```bash\n$ pyzub slide Game_of_Thrones_s03ep09.srt --seconds -70.5 --milliseconds 5000\n```\n This would move your subtitles 65.5 seconds back ~~in time~~.\n\n### Package:\n\nYou can read a subtitle file:\n\n```python\nfrom pyzub.subfiles import SRTFile\n\nfilepath = '/home/user/mysubtitle.srt'\nsubfile = SRTFile(filepath)\n```\n\nIterate over the file:\n```\nfor subtitle in subfile:\n\tprint(subtitle)\n```\n\nPrint a SRTFile:\n\n```python\nprint(subfile)\n```\n\n```\nRelative Path: /home/user/mysubtitle.srt\nCodec: ISO-8859-1\nNo. of Subtitles: 451\n```\n\nGet a subtitle:\n\n```python\n# idx could be a number from 1 to 451 in this case\nsubtitle = subfile.get_subtitle(idx)\n```\n\nPrint the subtitle:\n\n```python\nprint(subtitle)\n```\n\n```\nIndex: 1\nStart Time: 00:00:04,605\nEnd Time: 00:00:06,105\nText: En un d\u00eda cualquiera,\n```\n\nAn of course modify anything you want directly:\n\n```python\n# modify the text\nsubtile.text = 'modified subtitle'\n\n# times use timedelta from the datetime package\nsubtitle.start_time = timedelta(minutes=10)\n# also, you can assign directly a string\nsubtitle.end_time = '01:25:59,650'\n\n# write the changes to disk\nsubfile.dump('/home/user/mysubtitle_modified.srt')\n```\n\nAnd finally:\n\n```\nprint(len(subfile))\n# output: 451 (i.e, the number of subtitles in the file)\n```\n\n```\nprint(len(subtitle))\n# output: 21 (i.e, the number of chars in the subtitle's text attribute)\n```\n\n### Planned features:\n- Insert, delete subtitles, etc.\n- Automatic grammar and syntax correction\n\n### License\n\nMIT\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/nicolascerna/pyzub", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pyzub", "package_url": "https://pypi.org/project/pyzub/", "platform": "", "project_url": "https://pypi.org/project/pyzub/", "project_urls": { "Homepage": "https://github.com/nicolascerna/pyzub" }, "release_url": "https://pypi.org/project/pyzub/0.1.6/", "requires_dist": [ "Click", "chardet", "tqdm" ], "requires_python": ">=3.0", "summary": "A small package and CLI for manipulating and creating subtitles (SubRip, .srt, etc.)", "version": "0.1.6" }, "last_serial": 3970451, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "12437c35ea92ebebe60eb20dc649ec65", "sha256": "75d36e11b49293f787e45d680e77a11736d7cbace6dfc383b8e512b937fa6edb" }, "downloads": -1, "filename": "pyzub-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "12437c35ea92ebebe60eb20dc649ec65", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4488, "upload_time": "2018-06-16T02:05:37", "url": "https://files.pythonhosted.org/packages/77/14/e795116a62c356e4096340dde541dd929003960f8d576bf38451c2a9d606/pyzub-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0d3ce33c441ef2a2aa49f622458fac14", "sha256": "859a0805bdddacb2f0b70b91a2779875b4a3c0d28992b421fc3187b70e2286f4" }, "downloads": -1, "filename": "pyzub-0.1.0.tar.gz", "has_sig": false, "md5_digest": "0d3ce33c441ef2a2aa49f622458fac14", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3498, "upload_time": "2018-06-16T02:05:38", "url": "https://files.pythonhosted.org/packages/5c/b4/9861d1d7c5ac82475e9f9c9f463e05bfad4125270eab68d2fccfc73f91aa/pyzub-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "13183b8943924fa51ae136cd151bc3be", "sha256": "ace4a70df752ac3ad05391b13e632ff4fd78f1f658f6a8250015e15fbfc8e302" }, "downloads": -1, "filename": "pyzub-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "13183b8943924fa51ae136cd151bc3be", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4519, "upload_time": "2018-06-16T02:31:46", "url": "https://files.pythonhosted.org/packages/3f/1a/1e11d5f36ebf5885463b7a76f3d5c37ca46bf163485e6ba59649e2c86a05/pyzub-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bc8c653c2c56195c1620b7ce19ae7293", "sha256": "31ffa14a0ed63b71d72963f7712a102cc7e7bbbc6627754a203042a076d75ef1" }, "downloads": -1, "filename": "pyzub-0.1.1.tar.gz", "has_sig": false, "md5_digest": "bc8c653c2c56195c1620b7ce19ae7293", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3565, "upload_time": "2018-06-16T02:31:47", "url": "https://files.pythonhosted.org/packages/c4/01/549425e41049111529256b3c18a3cd49aa7c260afdf0d6ad41e909116ca1/pyzub-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "a450a94c906070f904349a08b7d87f8d", "sha256": "39a063a0ec60e5397b491599187c3f034f7692e1419ceeb293f02fe24c1d5be3" }, "downloads": -1, "filename": "pyzub-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "a450a94c906070f904349a08b7d87f8d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.0", "size": 4529, "upload_time": "2018-06-16T02:42:22", "url": "https://files.pythonhosted.org/packages/51/eb/5821665efffdd80e6ba6ad4a19e63659a91e61faad63cef0538cacfdf476/pyzub-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a3f6a2c31d7f0986177a8c5dee6de7c7", "sha256": "1539b0078301e0293c2e85e89b71cc60505aa469b7c89aa6574dba2a8596702b" }, "downloads": -1, "filename": "pyzub-0.1.2.tar.gz", "has_sig": false, "md5_digest": "a3f6a2c31d7f0986177a8c5dee6de7c7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.0", "size": 3592, "upload_time": "2018-06-16T02:42:23", "url": "https://files.pythonhosted.org/packages/ea/b6/8599bbc9aa9be9be71ea73f826af4fb2cf57c763594226e52cbd46cc5228/pyzub-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "407ee29e42768e344b6d7364d8fde886", "sha256": "77cefb6801a5abe33707830e03832759d442f4bf048fb25fcf0a3102d1291e23" }, "downloads": -1, "filename": "pyzub-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "407ee29e42768e344b6d7364d8fde886", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.0", "size": 4532, "upload_time": "2018-06-16T02:45:38", "url": "https://files.pythonhosted.org/packages/90/c4/04cb96ed8078634d044c7b8d6a921db3634be6cab6e01a9ceec424319958/pyzub-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "040ac9f76ca3dda092c399632ddcf9bc", "sha256": "b8d621edf7b6d6084e002bb2a6721fd51da0a5237328d1e2e7b7e0221b3a5c84" }, "downloads": -1, "filename": "pyzub-0.1.3.tar.gz", "has_sig": false, "md5_digest": "040ac9f76ca3dda092c399632ddcf9bc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.0", "size": 3590, "upload_time": "2018-06-16T02:45:39", "url": "https://files.pythonhosted.org/packages/73/fc/3ed69b2185ca89d2061b0f45991e974a1c70deb59040675c9d327ecb76a4/pyzub-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "9c5a64c29832444a921dff481a6281b6", "sha256": "44f33391faf1863d81e219a23b450c12ad3cd71f38f35b7101ad65a3d9f81f35" }, "downloads": -1, "filename": "pyzub-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "9c5a64c29832444a921dff481a6281b6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.0", "size": 4533, "upload_time": "2018-06-16T02:53:41", "url": "https://files.pythonhosted.org/packages/4d/b1/bb5e1171939da382b29ca36dbc819ce17cd7102cb605fd553b706598f7ba/pyzub-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d4b00c93f837af8d7cf423897ada490d", "sha256": "aa8ae7b376f8eab6909323e3d695010659fd4aa9c58a263827a5cd02a783bc3e" }, "downloads": -1, "filename": "pyzub-0.1.4.tar.gz", "has_sig": false, "md5_digest": "d4b00c93f837af8d7cf423897ada490d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.0", "size": 3604, "upload_time": "2018-06-16T02:53:42", "url": "https://files.pythonhosted.org/packages/ac/ed/b84542e675b6134bc4f9961d0d84db6a6aae7ccdf1e6f238141b160b9176/pyzub-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "250857a1c306a6f0bd621099d78a810d", "sha256": "5656f72d61ec810658f585df77ab401afda4d9775a331b6fbb8f9af8c58bba84" }, "downloads": -1, "filename": "pyzub-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "250857a1c306a6f0bd621099d78a810d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.0", "size": 5349, "upload_time": "2018-06-16T16:34:37", "url": "https://files.pythonhosted.org/packages/ca/7e/d65a00153b623ee5e7a17e80a9c6a9a4002ed02c56123dd2502482f96014/pyzub-0.1.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a9f7bee01d5889ce34f2e6b41095cd9e", "sha256": "51aff9f5ee7354c96b72b1533e6bf733e472a7cd056c190d0f16981ecdf1c343" }, "downloads": -1, "filename": "pyzub-0.1.5.tar.gz", "has_sig": false, "md5_digest": "a9f7bee01d5889ce34f2e6b41095cd9e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.0", "size": 4622, "upload_time": "2018-06-16T16:34:39", "url": "https://files.pythonhosted.org/packages/ca/60/265c6f807daacbe065c8b18be8712708986ce7f3cf42505730c3598e160b/pyzub-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "4738ce91ac6837a703da42f8b54bc25c", "sha256": "8923991e385579684391dd1378e74b814e6c503e45d7609d10606617a068436a" }, "downloads": -1, "filename": "pyzub-0.1.6-py3-none-any.whl", "has_sig": false, "md5_digest": "4738ce91ac6837a703da42f8b54bc25c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.0", "size": 6031, "upload_time": "2018-06-17T04:38:29", "url": "https://files.pythonhosted.org/packages/af/1d/cf8c0109b15a9e591f395610c54fa39f08a266718a1647a949646ca3f783/pyzub-0.1.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b9b3306044f593cd10f68c3519b1f74c", "sha256": "6624030d1ed8297a691c48135b918ab27e5d9c57071a5d1ae1bbcd1a0513dcb6" }, "downloads": -1, "filename": "pyzub-0.1.6.tar.gz", "has_sig": false, "md5_digest": "b9b3306044f593cd10f68c3519b1f74c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.0", "size": 5164, "upload_time": "2018-06-17T04:38:30", "url": "https://files.pythonhosted.org/packages/10/81/530078f3b4c85265859458e027b0ddb6f982d2b943f6c2c286dcff8c7f90/pyzub-0.1.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4738ce91ac6837a703da42f8b54bc25c", "sha256": "8923991e385579684391dd1378e74b814e6c503e45d7609d10606617a068436a" }, "downloads": -1, "filename": "pyzub-0.1.6-py3-none-any.whl", "has_sig": false, "md5_digest": "4738ce91ac6837a703da42f8b54bc25c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.0", "size": 6031, "upload_time": "2018-06-17T04:38:29", "url": "https://files.pythonhosted.org/packages/af/1d/cf8c0109b15a9e591f395610c54fa39f08a266718a1647a949646ca3f783/pyzub-0.1.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b9b3306044f593cd10f68c3519b1f74c", "sha256": "6624030d1ed8297a691c48135b918ab27e5d9c57071a5d1ae1bbcd1a0513dcb6" }, "downloads": -1, "filename": "pyzub-0.1.6.tar.gz", "has_sig": false, "md5_digest": "b9b3306044f593cd10f68c3519b1f74c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.0", "size": 5164, "upload_time": "2018-06-17T04:38:30", "url": "https://files.pythonhosted.org/packages/10/81/530078f3b4c85265859458e027b0ddb6f982d2b943f6c2c286dcff8c7f90/pyzub-0.1.6.tar.gz" } ] }