Skip to content

Commit

Permalink
srv3
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurian committed Dec 12, 2019
0 parents commit abe3b56
Show file tree
Hide file tree
Showing 7 changed files with 550 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
root = true

[*]
indent_style = space
indent_size = 2

end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[Dockerfile]
indent_size = 4

[Makefile]
indent_style = tab
indent_size = 2
158 changes: 158 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@

input/
debug/
output/

# Created by https://www.gitignore.io/api/node,code,linux,macos,textmate
# Edit at https://www.gitignore.io/?templates=node,code,linux,macos,textmate

### Code ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# react / gatsby
public/

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

### TextMate ###
*.tmproj
*.tmproject
tmtags

# End of https://www.gitignore.io/api/node,code,linux,macos,textmate

1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/erbium
49 changes: 49 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
.PHONY: output clean

input/subs.info.json:
youtube-dl --continue --retries 5 --write-info-json \
--no-check-certificate --ignore-errors \
--no-overwrites --skip-download \
--all-subs --sub-format srv3/ttml/vtt \
--output "input/subs.%(ext)s" \
"https://www.youtube.com/watch?v=hB7aGnfLB-8"
youtube-dl --continue --retries 5 --write-info-json \
--no-check-certificate --ignore-errors \
--no-overwrites --skip-download \
--all-subs --sub-format ttml \
--output "input/subs.%(ext)s" \
"https://www.youtube.com/watch?v=hB7aGnfLB-8"
youtube-dl --continue --retries 5 --write-info-json \
--no-check-certificate --ignore-errors \
--no-overwrites --skip-download \
--all-subs --sub-format vtt \
--output "input/subs.%(ext)s" \
"https://www.youtube.com/watch?v=hB7aGnfLB-8"

input/auto-subs.info.json:
youtube-dl --continue --retries 5 --write-info-json \
--no-check-certificate --ignore-errors \
--no-overwrites --skip-download \
--all-subs --sub-format srv3/ttml/vtt --write-auto-sub \
--output "input/auto-subs.%(ext)s" \
"https://www.youtube.com/watch?v=hB7aGnfLB-8"
youtube-dl --continue --retries 5 --write-info-json \
--no-check-certificate --ignore-errors \
--no-overwrites --skip-download \
--all-subs --sub-format ttml --write-auto-sub \
--output "input/auto-subs.%(ext)s" \
"https://www.youtube.com/watch?v=hB7aGnfLB-8"
youtube-dl --continue --retries 5 --write-info-json \
--no-check-certificate --ignore-errors \
--no-overwrites --skip-download \
--all-subs --sub-format vtt --write-auto-sub \
--output "input/auto-subs.%(ext)s" \
"https://www.youtube.com/watch?v=hB7aGnfLB-8"

output: input/subs.info.json input/auto-subs.info.json
node src/convert

clean:
rm -f ./input/*
rm -f ./debug/*
rm -f ./output/*
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "ytdl2transcript",
"version": "1.0.0",
"description": "",
"main": "src/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"shortid": "^2.2.15",
"xml2js": "^0.4.22"
}
}
Loading

0 comments on commit abe3b56

Please sign in to comment.