From 3d034114c58d710edd6a4d03d0053b5c99fec57f Mon Sep 17 00:00:00 2001 From: xorfish Date: Sat, 24 Sep 2016 01:53:34 +0200 Subject: [PATCH] add youtube-upload option for video uploads --- README.md | 3 ++- config.example | 2 +- teiler_helper | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8bdbca0..0c5e597 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ choose between screenshots or screencasts. * screenshots fullscreen/monitor/area * delay of screenshots * screencasts of monitor/area -* upload screenshots/screencasts - teiler can also upload your files via scp, imgur or filebin, ix (for pastes) and amazon s3. +* upload screenshots/screencasts - teiler can also upload your files via scp, imgur or filebin, youtube-upload, ix (for pastes) and amazon s3. * History of Images and Videos with support for + Viewing + Editing @@ -33,5 +33,6 @@ choose between screenshots or screencasts. * filebin (http://git.server-speed.net/users/flo/filebin) * openssh (http://www.openssh.com) * ix (http://ix.io) +* youtube-upload (https://github.com/tokland/youtube-upload) * s3 cli tools diff --git a/config.example b/config.example index eecfb2a..225f195 100644 --- a/config.example +++ b/config.example @@ -17,7 +17,7 @@ always_ul=1 # Uploading options # Possible Choices for img_ul: fb, scp, s3, imgur -# Possible Choices for vid_ul: fb, scp, s3 +# Possible Choices for vid_ul: fb, scp, s3, youtube-upload # Possible Choices for paste_ul: fb, scp, ix img_ul=imgur vid_ul=fb diff --git a/teiler_helper b/teiler_helper index 3ef2f6c..35a53ea 100755 --- a/teiler_helper +++ b/teiler_helper @@ -40,6 +40,8 @@ elif [[ $vid_ul == "scp" ]]; then videoUpload () { scpUpload "Video" "${vid_path}" "$1" "${scp_host}" "${scp_path_vid}" "${http_vid}"; } elif [[ $vid_ul == "s3" ]]; then videoUpload () { cd "${vid_path}"; s3cmd --no-progress put "{$1}" "s3://${s3_bucket}/${s3_path_vid}/"; notify-send -a "teiler" "Video Uploaded" "${s3_http_vid}/${1}"; echo -n "${s3_http_vid}/${1}" | xclip; x_clip; } +elif [[ $vid_ul == "yt" ]]; then + videoUpload () { echo -n "https://youtu.be/" | (cat; youtube-upload -t ${1} --privacy=unlisted ${vid_path}/${1}) | xclip; x_clip; notify-send -a "teiler" "Video Uploaded" "$(xclip -o)";} else videoUpload () { echo "No video uploader set. Check example config"; } fi