diff options
Diffstat (limited to 'ar')
| -rw-r--r-- | ar/.config/git/config | 5 | ||||
| -rw-r--r-- | ar/.config/git/ignore | 1 | ||||
| -rw-r--r-- | ar/.config/shell/aliasrc | 3 | ||||
| -rw-r--r-- | ar/.config/shell/bm-dirs | 3 | ||||
| -rw-r--r-- | ar/.config/shell/bm-files | 1 | ||||
| -rwxr-xr-x | ar/.local/bin/hugow | 28 |
6 files changed, 39 insertions, 2 deletions
diff --git a/ar/.config/git/config b/ar/.config/git/config index 3d9b746..1cdd37f 100644 --- a/ar/.config/git/config +++ b/ar/.config/git/config @@ -92,3 +92,8 @@ [credential "https://gist.github.com"] helper = helper = !/usr/bin/gh auth git-credential +[filter "lfs"] + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f + process = git-lfs filter-process + required = true diff --git a/ar/.config/git/ignore b/ar/.config/git/ignore index 6b90686..6f2cd71 100644 --- a/ar/.config/git/ignore +++ b/ar/.config/git/ignore @@ -83,7 +83,6 @@ Thumbs.db # Private *personal* -/content/recordings/** # Shortcuts shortcutrc diff --git a/ar/.config/shell/aliasrc b/ar/.config/shell/aliasrc index 712c72c..5cd7580 100644 --- a/ar/.config/shell/aliasrc +++ b/ar/.config/shell/aliasrc @@ -494,6 +494,9 @@ alias ylogi='ylog -s hidden -c us | grep $(LC_TIME=C date -d "1 days ago" +%d/%b alias ylogp='ylog -s peertube | grep $(LC_TIME=C date +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "' alias ylogP='ylog -s peertube | grep $(LC_TIME=C date -d "1 days ago" +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "' alias ylogt='ylog -s diary -c us | grep $(LC_TIME=C date +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "' +alias ylogT='ylog -s recordings -c us | grep $(LC_TIME=C date +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "' alias ylogy='ylog -s diary -c us | grep $(LC_TIME=C date -d "1 days ago" +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "' +alias ylogY='ylog -s recordings -c us | grep $(LC_TIME=C date -d "1 days ago" +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "' alias ylogr='ylog -s diary -c us | grep $(LC_TIME=C date -d "2 days ago" +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "' +alias ylogR='ylog -s recordings -c us | grep $(LC_TIME=C date -d "2 days ago" +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "' alias ylogu='ylog -s diary -c us' diff --git a/ar/.config/shell/bm-dirs b/ar/.config/shell/bm-dirs index d1373e8..d296c9f 100644 --- a/ar/.config/shell/bm-dirs +++ b/ar/.config/shell/bm-dirs @@ -1,5 +1,6 @@ # Keys Filename bb ${XDG_SCRIPTS_HOME:-${HOME}/.local/bin} +bcr ${XDG_SCRIPTS_HOME:-${HOME}/.local/bin}/cron bs ${XDG_SCRIPTS_HOME:-${HOME}/.local/bin}/statusbar btp ${XDG_SCRIPTS_HOME:-${HOME}/.local/bin}/tmux btw ${XDG_SCRIPTS_HOME:-${HOME}/.local/bin}/task/taskwarrior-tui @@ -28,7 +29,7 @@ cnp ${XDG_CONFIG_HOME:-${HOME}/.config}/ncmpcpp cns ${XDG_CONFIG_HOME:-${HOME}/.config}/newsboat cnv ${XDG_CONFIG_HOME:-${HOME}/.config}/nvim cqt ${XDG_CONFIG_HOME:-${HOME}/.config}/qutebrowser -cr ${XDG_SCRIPTS_HOME:-${HOME}/.local/bin}/cron +crp ${XDG_CONFIG_HOME:-${HOME}/.config}/rmpc cse ${XDG_CONFIG_HOME:-${HOME}/.config}/sesh csf ${XDG_SOURCES_HOME:-${HOME}/.local/src}/suckless/surf csh ${XDG_CONFIG_HOME:-${HOME}/.config}/shell diff --git a/ar/.config/shell/bm-files b/ar/.config/shell/bm-files index 1adddbe..7ba1950 100644 --- a/ar/.config/shell/bm-files +++ b/ar/.config/shell/bm-files @@ -28,6 +28,7 @@ vnp ${XDG_CONFIG_HOME:-${HOME}/.config}/ncmpcpp/config vns ${XDG_CONFIG_HOME:-${HOME}/.config}/newsboat/config # Newsboat config (RSS reader) vnu ${XDG_CONFIG_HOME:-${HOME}/.config}/newsboat/urls # Newsboat url (RSS reader) vqt ${XDG_CONFIG_HOME:-${HOME}/.config}/qutebrowser/config.py # Qutebrowser config +vrp ${XDG_CONFIG_HOME:-${HOME}/.config}/rmpc/config.ron # Rmpc config Vsm /etc/samba/smb.conf # Samba config vsa ${XDG_CONFIG_HOME:-${HOME}/.config}/shell/aliasrc # Aliases used by shell (and potentially other shells) vse ${XDG_CONFIG_HOME:-${HOME}/.config}/sesh/sesh.toml # Sesh config diff --git a/ar/.local/bin/hugow b/ar/.local/bin/hugow index a715606..8860286 100755 --- a/ar/.local/bin/hugow +++ b/ar/.local/bin/hugow @@ -3,10 +3,13 @@ set -eu repodir="$HOME/Private/repos/THESIAH" out="$repodir/public/diary/index.html" +out2="$repodir/public/recordings/index.html" server="${THESIAH_SERVER:-root@thesiah.xyz}" dest="/var/www/thesiah/diary/" +dest2="/var/www/thesiah/recordings/" defaults="sy after foramonth" src="$repodir/public/diary/" +src2="$repodir/public/recordings/" bgm="$repodir/static/bgm/" bgmd="/var/www/thesiah/bgm/" @@ -18,7 +21,13 @@ if [ ! -f "$out" ]; then exit 1 fi +if [ ! -f "$out2" ]; then + echo "error: not found: $out2" >&2 + exit 1 +fi + ssh "$server" "mkdir -p '$dest'" +ssh "$server" "mkdir -p '$dest2'" rsync -azv --update --itemize-changes --stats "$bgm" "$server:$bgmd" @@ -31,6 +40,15 @@ else "$src" "$server:$dest" fi +if [ -n "${THESIAH_SSH_OPTS:-}" ]; then + rsync -azv --update --itemize-changes --stats \ + -e "ssh $THESIAH_SSH_OPTS" \ + "$src2" "$server:$dest2" +else + rsync -azv --update --itemize-changes --stats \ + "$src2" "$server:$dest2" +fi + if [ -n "${1-}" ]; then new="$repodir/content/diary/$1" if [ -f "$new" ]; then @@ -40,6 +58,16 @@ if [ -n "${1-}" ]; then fi fi +if [ -n "${1-}" ]; then + new="$repodir/content/recordings/$1" + if [ -f "$new" ]; then + rsync -az --update "$new" "$server:$dest2" + elif [ -d "$new" ]; then + rsync -az --update "$new/" "$server:$dest2$(basename "$new")/" + fi +fi + ssh "$THESIAH_SERVER" "chmod 644 $dest/index.html" +ssh "$THESIAH_SERVER" "chmod 644 $dest2/index.html" cd - >/dev/null |
