Skip to content

Instantly share code, notes, and snippets.

@LitKnd
Last active March 20, 2021 06:57
Show Gist options
  • Save LitKnd/5f98f0f0dcbc4e4bc88c10a6ee6717eb to your computer and use it in GitHub Desktop.
Save LitKnd/5f98f0f0dcbc4e4bc88c10a6ee6717eb to your computer and use it in GitHub Desktop.
[
{
"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