Compare commits
3 Commits
7a676a1f88
...
1b5fb4144d
Author | SHA1 | Date |
---|---|---|
Lucien Cartier-Tilet | 1b5fb4144d | |
Lucien Cartier-Tilet | 13943e5775 | |
Lucien Cartier-Tilet | 26053b0e8b |
|
@ -87,7 +87,7 @@ qt5-imageformats qemu r raw-thumbnailer reflector ripgrep rofi rsync rtv \
|
|||
ruby-rb-fsevent ruby-sass rustup samba scrot sent shadow siji-git \
|
||||
simplescreenrecorder sshfs st-luke-git sxiv texlive-bin texlive-langchinese \
|
||||
texlive-langcyrillic texlive-langgreek texlive-langjapanese texlive-langkorean \
|
||||
texlive-latexextra texlive-localmanager-git texlive-most tmux tree \
|
||||
texlive-latexextra texlive-localmanager-git texlive-most tldr tmux tree \
|
||||
ttf-arphic-uming ttf-baekmuk ttf-charis-sil ttf-dejavu \
|
||||
ttf-google-fonts-opinionated-git ttf-hanazono ttf-joypixels ttf-koruri \
|
||||
ttf-liberation ttf-monapo ttf-sazanami ttf-tibetan-machine typescript \
|
||||
|
|
|
@ -833,7 +833,7 @@ The main aim of this function is to transform the URLs contained in the argument
|
|||
:END:
|
||||
The final function to declare before the main body of the script is ~_ytdl_download_batch~: it will look for each line, ignoring the ones beginning by ~#~, ~;~ and ~]~ (just like ~youtube-dl~) and will download them, assuming these are channel URLs or playlist URLs, however it should also work with direct video URLs.
|
||||
|
||||
What this function does is for each line, it will fetch the entierty of the video IDs found in a playlist or channel. Then, it will look each ID up the list of already downloaded videos and will add all new IDs to a queue of videos to be downloaded. It will then pass each new video ID to ~_ytdl_download_video~ directly.
|
||||
What this function does is for each line, it will fetch the entierty of the video IDs found in a playlist or channel. Then, it will look each ID up the list of already downloaded videos and will add all new IDs to a queue of videos to be downloaded. It will then pass each new video ID to ~_ytdl_download_video~ directly. Beware that if you pass directly the URL of the channel, such as ~https://www.youtube.com/user/enyay~ if you want to download Tom Scott’s videos, it will download everything on the main page of their channel, which means it will even download videos from playlists they decided to put on their channel’s front page, even if it is not theirs. So in that case, we need to append ~/videos~ to any channel URL.
|
||||
#+BEGIN_SRC fish
|
||||
function _ytdl_download_batch
|
||||
set -q $FILE
|
||||
|
@ -842,7 +842,11 @@ What this function does is for each line, it will fetch the entierty of the vide
|
|||
set CHANNELS (cat $FILE | grep -vE "#|;|\]")
|
||||
for c in $CHANNELS
|
||||
_ytdl_log "INFO" "Getting IDs for channel $c"
|
||||
set IDS (youtube-dl --get-id $c)
|
||||
if test (egrep '\/c\/|user|channel' (echo $c |psub))
|
||||
set -g IDS (youtube-dl --get-id "$c/videos")
|
||||
else
|
||||
set -g IDS (youtube-dl --get-id $c)
|
||||
end
|
||||
_ytdl_log "INFO" "Fetching new videos from channel"
|
||||
for i in (seq (count $IDS))
|
||||
printf "\rsearching (%d/%d)" $IDn (count $IDS)
|
||||
|
|
|
@ -3448,7 +3448,7 @@ Now, onto some shortcuts related to org-mode. Let’s first declare the category
|
|||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(spacemacs/set-leader-keys-for-major-mode 'org-mode "ob" 'phundrak/blog-publish)
|
||||
(spacemacs/declare-prefix-for-mode 'org-mode "ob" "blog")
|
||||
(spacemacs/declare-prefix-for-mode 'org-mode "ob" "publish blog")
|
||||
#+END_SRC
|
||||
|
||||
Now, I have a couple of shortcuts I use regularly:
|
||||
|
|
|
@ -221,7 +221,7 @@ Let’s set in a custom varible what packages we’ll be needing.
|
|||
ruby-rb-fsevent ruby-sass rustup samba scrot sent shadow siji-git \
|
||||
simplescreenrecorder sshfs st-luke-git sxiv texlive-bin texlive-langchinese \
|
||||
texlive-langcyrillic texlive-langgreek texlive-langjapanese texlive-langkorean \
|
||||
texlive-latexextra texlive-localmanager-git texlive-most tmux tree \
|
||||
texlive-latexextra texlive-localmanager-git texlive-most tldr tmux tree \
|
||||
ttf-arphic-uming ttf-baekmuk ttf-charis-sil ttf-dejavu \
|
||||
ttf-google-fonts-opinionated-git ttf-hanazono ttf-joypixels ttf-koruri \
|
||||
ttf-liberation ttf-monapo ttf-sazanami ttf-tibetan-machine typescript \
|
||||
|
|
Loading…
Reference in New Issue