-
Create the script below with it's contents. (Tip: Highlight and copy with linenumbers hidden)
-
Edit the parts to accommodate your needs.
- See the bash, findmnt and efibootmgr manpage's of the utilities used for/in this script.
- Make it executable.
import json, srt, datetime | |
def timeconvert(timestamp): | |
ts_str=str(timestamp) | |
return datetime.timedelta(seconds=int(ts_str[:-3]),milliseconds=int(ts_str[-3:])) | |
class Srt: | |
def __init__(self, decoded): | |
self.decoded = decoded | |
self.subs = [(i + 2, timeconvert(s[0]), timeconvert(s[1]), s[2]) |