Thursday, November 14, 2019

How to install youtube-dl on Windows (WSL)

Install Python2 and then curl install youtube-dl to the /usr/local/bin directory
* sudo apt install python -y
* sudo apt install mpv -y
* sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl && sudo chmod a+rx /usr/local/bin/youtube-dl
* youtube-dl all the things

Specific examples of how to use youtube-dl
* youtube-dl https://www.youtube.com/watch?v=KK5KTQGuXSQ --format ("bestvideo[width>=1920]"/bestvideo)+bestaudio/best --download-archive archive.txt --output %%(uploader)s/%%(upload_date)s.%%(title)s.%%(id)s.%%(ext)s --add-metadata --write-info-json --write-description --write-annotation --write-thumbnail --merge-output-format mkv --ignore-errors

You can use my Shell Script here too
#!/bin/sh
echo this you put $1
CORE='youtube-dl'
FIRST='${1}'
SECOND='-f bestvideo+bestaudio/best -i --prefer-ffmpeg --write-sub --all-subs --convert-subs srt --add-metadata --write-description --write-annotations --write-thumbnail -v'
echo this is second $SECOND

echo this is command: ${CORE} ${1} $SECOND
${CORE} ${1} $SECOND


#end

Command syntax is $ sh youtube-dl.sh https://full-youtube-link

Thursday, November 7, 2019

How to setup GNU Emacs on Windows 10

  • You want to C-h v (describe variable) user-init-file 
  • Put the path to your real init files in there eg, (load "c:/emacs/bin/init.el")
  • Source additional init files, eg, (load "c:/emacs/bin/_org.el"), (load "c:/emacs/bin/_erc.el")

Tuesday, November 5, 2019

How to Log Your Time in GNU Emacs

  • Create an .org mode file
  • C-u C-c .
    
to create your starting time
C-u C-c.
to create your ending time, make sure the two times are in succession with the
--
operator in between then, then you can evaluate the amount of time the task took with
C-c C-y
 
---
guidelines: https://orgmode.org/manual/Creating-timestamps.html