From f6a5417d7ee29480ef614ff468eea4f882ae8bfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Sun, 23 Feb 2020 11:16:18 +0100 Subject: [PATCH 1/4] add new alias for youtube-dl --- aliases | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aliases b/aliases index b70f523..1d6f09a 100644 --- a/aliases +++ b/aliases @@ -100,7 +100,7 @@ alias u=umount alias testmail='echo testemail von ${USER}@${HOSTNAME} am $(date)|mail -s "TESTEMAIL ${USER}@${HOSTNAME} $(date)"' # logging -alias tailmail='sudo tail -f /var/log/mail.log /var/log/exim4/mainlog /var/log/exim4/rejectlog /var/log/exim4/paniclog' +alias tailexim='sudo tail -f /var/log/mail.log /var/log/exim4/mainlog /var/log/exim4/rejectlog /var/log/exim4/paniclog' alias tailmail='sudo journalctl -f -u exim4.service -u dovecot.service -u rspamd.service -u getmail*' alias taildemsg='sudo watch -n1 "dmesg|tail -n20"' alias tailsys='sudo tail -f /var/log/syslog /var/log/dmesg' @@ -121,6 +121,8 @@ alias unetbootin='export QT_X11_NO_MITSHM=1 unetbootin' alias vi='/usr/bin/vim' alias vlc='VDPAU_DRIVER=va_gl vlc' alias tmux='tmux -f ~/.tmux.conf' +alias youtube-dl-whole-user="youtube-dl --yes-playlist --write-description --write-info-json --write-annotations --write-all-thumbnails -f 'mp4' -o '%(uploader)s/%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' -w -c " +alias youtube-dl-whole-playlist="youtube-dl --yes-playlist --write-description --write-info-json --write-annotations --write-all-thumbnails -f 'mp4' -o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' -w -c " # rock64 alias rock64='sudo minicom -D /dev/ttyUSB0 --color=on' From 8827e99d53f79d1532384e1a648e1fae3738e2f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Mon, 24 Feb 2020 08:43:28 +0100 Subject: [PATCH 2/4] add script for youtube-dl to download or update a full user/playlist from youtube, add a file named "url" in the directory and run youtube-dl-download-or-update.sh. It picks the file "url" and grabs the whole playlist or even youtube-user and downloads all playlists in separate directories --- bin/youtube-dl-download-or-update.sh | 2 ++ 1 file changed, 2 insertions(+) create mode 100755 bin/youtube-dl-download-or-update.sh diff --git a/bin/youtube-dl-download-or-update.sh b/bin/youtube-dl-download-or-update.sh new file mode 100755 index 0000000..4401f68 --- /dev/null +++ b/bin/youtube-dl-download-or-update.sh @@ -0,0 +1,2 @@ +#!/bin/bash +youtube-dl --write-description --write-info-json --write-annotations --write-all-thumbnails -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' -o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' -c -w -a ./url From 42e20462ca2127309dcdacb7e0058da2db6560bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Tue, 25 Feb 2020 16:15:32 +0100 Subject: [PATCH 3/4] add option for sync or not sync profile Variable MYSHELLCONFIG_GIT_SYNC in ~/.bashrc if unset it defaults to true. So profile is synced If Set to false, do not sync profile --- bashrc_add | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/bashrc_add b/bashrc_add index cffa5aa..fc95be8 100755 --- a/bashrc_add +++ b/bashrc_add @@ -27,6 +27,7 @@ if [[ $- = *i* ]] ; then [ -z "${MYSHELLCONFIG_GIT_TIMEOUT+x}" ] && MYSHELLCONFIG_GIT_TIMEOUT=5s [ -z "${MYSHELLCONFIG_GIT_CHECKOUT_TIMEOUT+x}" ] && MYSHELLCONFIG_GIT_CHECKOUT_TIMEOUT=20s MYSHELLCONFIG_BASH_COMPLETION="${HOME}/${MYSHELLCONFIG_SUBPATH}/bash_completion.d" + [ -z "${MYSHELLCONFIG_GIT_SYNC+x}" ] && MYSHELLCONFIG_GIT_SYNC=true SGIT="git -C ${MYSHELLCONFIG_BASE}" export MYSHELLCONFIG_BASE MYSHELLCONFIG_LOGDIR MYSHELLCONFIG_LOGFILE SGIT MYSHELLCONFIG_VIM_PLUGINS @@ -47,22 +48,26 @@ EOF } sync_config () { - local nok="" - local gco="" - if which git >/dev/null; then - echo -n "Sync config with ${MYSHELLCONFIG_GIT_SERVER}: " 1>&2 - # MYSHELLCONFIG_GITCHECKOUTSCRIPT_OPTIONS are options for bin/git-myshellconfig-checkout - if [ -z ${MYSHELLCONFIG_GIT_CHECKOUTSCRIPT_OPTIONS+x} ]; then - gco="-h" - else - gco="$MYSHELLCONFIG_GIT_CHECKOUTSCRIPT_OPTIONS" - fi - ${MYSHELLCONFIG_BASE}/bin/git-myshellconfig-checkout ${gco}|| nok="not " 1>>"${MYSHELLCONFIG_LOGFILE}" 2>&1 - printf '%s\n' "${nok}synced" 1>&2 - [ -z "$nok" ] && mkdir -pv "${MYSHELLCONFIG_LOGDIR}" + if $MYSHELLCONFIG_GIT_SYNC; then + local nok="" + local gco="" + if which git >/dev/null; then + echo -n "Sync config with ${MYSHELLCONFIG_GIT_SERVER}: " 1>&2 + # MYSHELLCONFIG_GITCHECKOUTSCRIPT_OPTIONS are options for bin/git-myshellconfig-checkout + if [ -z ${MYSHELLCONFIG_GIT_CHECKOUTSCRIPT_OPTIONS+x} ]; then + gco="-h" + else + gco="$MYSHELLCONFIG_GIT_CHECKOUTSCRIPT_OPTIONS" + fi + ${MYSHELLCONFIG_BASE}/bin/git-myshellconfig-checkout ${gco}|| nok="not " 1>>"${MYSHELLCONFIG_LOGFILE}" 2>&1 + printf '%s\n' "${nok}synced" 1>&2 + [ -z "$nok" ] && mkdir -pv "${MYSHELLCONFIG_LOGDIR}" + else + echo "git not installed, no configuration possible, please install git" >&2 + fi else - echo "git not installed, no configuration possible, please install git" >&2 + echo "Not syncing profile in case of configuration" fi } From c74f20e0f1d1f54ca8ff7065e725c4df40656f75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Wed, 26 Feb 2020 18:24:46 +0100 Subject: [PATCH 4/4] change nosync --- myshell_git_sync | 1 - 1 file changed, 1 deletion(-) diff --git a/myshell_git_sync b/myshell_git_sync index d6ff3a5..d1933fb 100644 --- a/myshell_git_sync +++ b/myshell_git_sync @@ -131,7 +131,6 @@ if ! $SSHS; then vim -c "PluginInstall" -c ":qa!" fi [ -z ${MYSHELLCONFIG_GIT_REMOTE_PUSH+x} ] || $SGIT remote set-url --push ${MYSHELLCONFIG_GIT_REMOTE_NAME} "${MYSHELLCONFIG_GIT_REMOTE_PUSH}" - # cd ${HOME} ;; *screen*) echo "I'm in sceen/tmux now" >&2