This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""Convert a subtitles file into a transcript. | |
Usage: srt2txt.py [-h] [--version] | |
[-i FILE] [-o FILE] | |
[--md] | |
Options: | |
-h, --help show this message and exit | |
--version show version and exit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
MOUNT_DIR=/mnt/data | |
DEVICE_NAME=/dev/$(lsblk | grep disk | tail -n1 | awk '{print $1}') | |
VERSION="0.1.0" | |
USAGE="\ | |
Usage: add-disk.sh [--help | --version] | |
[--mount DIR] [--dev DEVICE] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: function h(html) { | |
return html | |
.replace(/<li>[^<]*?<p>/g, "<p>1. ") | |
.replace(/<pre>[^<]*<div .+?<\/div>/g, "") | |
.replace(/<ol start="(\d+)">[^<]*?<li>/g, "\n\n$1. ") | |
.replace(/<ol>/g, "\n") | |
.replace(/<p>/g, "\n\n") | |
.replace(/<\/p>/g, "") | |
.replace(/<b>/g, "**") | |
.replace(/<\/b>/g, "**") |
OlderNewer