Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # download the chat log corresponding to an existing youtube-dl description file
- # usage: holochat.sh [youtube-dl .description file]
- # activate chat_downloader virtualenv
- source /home/anon/src/chat-replay-downloader/venv/bin/activate
- # extract the base filename
- base_filename=`echo "$1" | awk -F. '{print $(NF-1)}'`
- # extract youtube video ID from base filename
- video_id=`echo "${base_filename}" | awk '{print substr( $0, length($0) - 10 , length($0) ) }'`
- # download log
- /home/anon/src/chat-replay-downloader/venv/bin/chat_downloader --message_type all --chat_type live "https://youtube.com/watch?v=${video_id}" | tee "${base_filename}".log &&
- # update file modification date to match description file
- touch -r "${base_filename}".description "${base_filename}".log
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement