lbrayner / vtt-to-srt

Python 3 script that converts WebVTT files to SubRip.
GNU Lesser General Public License v2.1
26 stars 9 forks source link

Port vtt-to-srt functionality #1

Closed isaacbernat closed 5 years ago

isaacbernat commented 5 years ago

Hi Leonardo,

I am writing this issue because recently I got one myself about .vtt format https://github.com/isaacbernat/netflix-to-srt/issues/21 . Seeing you have this here, also written in python, I thought you might be interested in porting the code to the one linked above. One reason would be because many people have already bookmarked it and if netflix is apparently using this new format many people would benefit from being able to convert it from the existing repository they already rely on.

Thanks in advance.

Isaac

lbrayner commented 5 years ago

Hi, Isaac. Possible solutions:

The former will make it simpler for whoever is cloning https://github.com/isaacbernat/netflix-to-srt. The latter is more mantainable, but requires an extra step: checking out the submodule.

isaacbernat commented 5 years ago

Thanks for taking the time to analyse the issue.

I think keeping it as simple as possible for the final user is most important. Lowering the threshold will mean reaching and helping wider audiences. Therefore, I would favour the first proposal. (This is also why I chose not to use any external dependencies in netflix-to-srt, but here that would imply a major rewrite. Maybe a solution would be to import the libraries needed only if VTT files are found, and then ask the user to pip-install the requirements if it's not present with a try-except?)

Could you work on the first option you suggested?

lbrayner commented 5 years ago

I'll work on the first solution. I think I'll add: a separete folder with the script and a Makefile (and instructions on how to build); and a bytecode-compiled version to the the root folder, ready to be used.

lbrayner commented 5 years ago

Bytecode is no good. Just wrote the script in a way that it ensures pip is installed and installs all the modules. Please check it out before I make the pull request: https://github.com/lbrayner/netflix-to-srt/tree/master/vendor/vtt-to-srt

isaacbernat commented 5 years ago

Wow, that was fast! It looks good! I think it would be even better with a sample .vtt and the resulting .srt, so people can run it (or test it) and immediately check they get the correct results. It will also need updating the instructions on the readme on the main page, but I can also do that after merging. Thanks again!

lbrayner commented 5 years ago

It will also need updating the instructions on the readme on the main page, but I can also do that after merging.

Please do!

Pull request made.

isaacbernat commented 5 years ago

Thanks a lot Leonardo, by the end of the week I'll merge the PR and update the Readme.

lbrayner commented 5 years ago

My pleasure, Isaac!