From 197e9691db69bce004125d1bf4e70b18bb6a5788 Mon Sep 17 00:00:00 2001 From: joe Date: Sun, 5 Oct 2025 16:31:12 +0200 Subject: up --- .local/bin/backup | 2 ++ .local/bin/nb | 9 --------- .local/bin/newsboat-notif | 14 -------------- .local/bin/ref-newsboat | 48 ----------------------------------------------- 4 files changed, 2 insertions(+), 71 deletions(-) delete mode 100755 .local/bin/nb delete mode 100755 .local/bin/newsboat-notif delete mode 100755 .local/bin/ref-newsboat (limited to '.local/bin') diff --git a/.local/bin/backup b/.local/bin/backup index 06b168c..5d09ddf 100755 --- a/.local/bin/backup +++ b/.local/bin/backup @@ -8,6 +8,8 @@ rsync -avhz --progress --delete-after "${HOME}"/games/ssd/ksp-kcalbeloh/GameData rsync -avhz --progress --delete-after "${XDG_DATA_HOME}"/pass zhinu:/var/mother_backup/pass/ rsync -avhz --progress --delete-after "${XDG_DATA_HOME}"/newsboat/ zhinu:/var/mother_backup/newsboat/data/ rsync -avhz --progress --delete-after "${XDG_CONFIG_HOME}"/newsboat/ zhinu:/var/mother_backup/newsboat/conf/ +rsync -avhz --progress --delete-after "${XDG_DATA_HOME}"/sfeed/ zhinu:/var/mother_backup/newsboat/data/ +rsync -avhz --progress --delete-after "${XDG_CONFIG_HOME}"/sfeed/ zhinu:/var/mother_backup/newsboat/conf/ rsync -avhz --progress --delete-after "${HOME}"/dev/c/c_dergods_realm_2 zhinu:/var/mother_backup/dr2/ rsync -avhz --progress --delete-after "${HOME}"/mid/sort zhinu:/var/mother_backup/ ssh zhinu -- 'chown -v 1000: /var/mother_backup/*' diff --git a/.local/bin/nb b/.local/bin/nb deleted file mode 100755 index 3b36835..0000000 --- a/.local/bin/nb +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -[ $(hostname -s) = "po-rbo" ] && exec newsboat -[ -f /tmp/cache.db ] && exec newsboat -c /tmp/cache.db -u /tmp/urls -cache_file="$XDG_DATA_HOME/newsboat/cache.db.gpg" -urls_file="$XDG_CONFIG_HOME/newsboat/urls.gpg" -[ -f $urls_file ] && gpg -q -d $urls_file > /tmp/urls || return -[ -f $cache_file ] && gpg -q -d $cache_file > /tmp/cache.db || return -newsboat -c /tmp/cache.db -u /tmp/urls diff --git a/.local/bin/newsboat-notif b/.local/bin/newsboat-notif deleted file mode 100755 index ad15c70..0000000 --- a/.local/bin/newsboat-notif +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# ===================== -# ==== =============== -# ===================== -# === === ==== == -# ==== == == = = -# ==== == = == = -# ==== == = == ==== -# ==== == = == = = -# = = === ==== == -# == ================ -# ===================== - -[ $1 -gt 0 ] && exec herbe " $@ new articles" & diff --git a/.local/bin/ref-newsboat b/.local/bin/ref-newsboat deleted file mode 100755 index e5d9848..0000000 --- a/.local/bin/ref-newsboat +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env perl - -use strict; -use warnings; -use Capture::Tiny qw(capture); - -use constant { - NEWSBOAT_PATH => 'newsboat', - NOTIFYSEND_PATH => 'herbe' -}; - -sub notify -{ - my ($str) = @_; - - my $pid = fork(); - if (not $pid) { - exec(NOTIFYSEND_PATH, $str); - } - return; -}; - -sub main -{ - my $stdout; - my $nb; - - $nb = NEWSBOAT_PATH; - if (system( - $nb, - '-x', - 'reload' - ) != 0) { - exit 1; - } - - $stdout = qx($nb -x print-unread); - $stdout =~ s/\s.+//; - chomp $stdout; - if ($stdout != 0) { - notify(' ' . $stdout . ' new articles'); - } - return; -} - -main(); - -__END__ -- cgit v1.2.3