Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[
{
"caption": "Reg Replace: Format VTT",
"command": "reg_replace",
"args": {"replacements": ["remove_timestamps", "remove_numbered_lines","remove_empty_lines","remove_line_endings","remove_WEBVTT_literal","remove_v_tags"]
}
},
]
{
"format": "3.0",
"replacements":
{
"remove_WEBVTT_literal":
{
"find": "WEBVTT",
"literal": true,
"name": "remove_WEBVTT_literal",
"replace": ""
},
"remove_empty_lines":
{
"find": "^\\n",
"name": "remove_empty_lines",
"replace": ""
},
"remove_line_endings":
{
"find": "\\n",
"multi_pass": true,
"name": "remove_line_endings",
"replace": " "
},
"remove_numbered_lines":
{
"find": "^(\\d)*?\\n",
"name": "remove_numbered_lines",
"replace": ""
},
"remove_timestamps":
{
"find": "^0.*.\\n",
"greedy": true,
"name": "remove_timestamps",
"replace": ""
},
"remove_v_tags":
{
"find": "(<v ->)|(</v>)",
"multi_pass": true,
"name": "remove_v_tags",
"replace": ""
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment