Skip to content

Commit

Permalink
rename approve comments usage
Browse files Browse the repository at this point in the history
  • Loading branch information
purarue committed Oct 27, 2023
1 parent 0604cdc commit d0b6d7f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bin/vps_backup_server
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ tar xf "$BACKUP_TO" -C "$CACHE_DIR"
command -v dust >/dev/null 2>&1 && dust -n 8 "$BACKUP_DIR"

set +x
"${THIS_DIR}/approve_comments" --epochs 2>/dev/null | grep '^EPOCH' | cut -d':' -f2 | jq >"${BACKUP_DIR}/page_hits_epochs.json"
"${THIS_DIR}/approve-comments" --epochs 2>/dev/null | grep '^EPOCH' | cut -d':' -f2 | jq >"${BACKUP_DIR}/page_hits_epochs.json"

printf "Backed up %d files from the VPS\n" "$(tar tvf "${HOME}/.cache/backup_dir.tar.gz" | wc -l)"
2 changes: 1 addition & 1 deletion functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ alias remsync-public='REMSYNC_PUBLIC=1 remsync' # to push to /p/ (public index)
# to use ranger to quickly remove/add files
alias remsync-ranger='ranger "${XDG_DOCUMENTS_DIR}/remsync" && remsync'
alias remsync-public-ranger='ranger "${HOME}/Files/remsync_public" && remsync-public'
alias print-new-comments='approve_comments --print-new-comments'
alias print-new-comments='approve-comments --print-new-comments'
alias page-hits="curl -s 'https://sean.fish/api/page_hit' | jq '.count'"
alias gb-comments="curl 'https://sean.fish/api/gb_comment' | jq 'reverse'"
gb-comments-pretty() {
Expand Down
2 changes: 1 addition & 1 deletion jobs/linux/guestbook_comments.job
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ evry 15 minutes -guestbook_comments && {

get_count() {
local SSH_OUTPUT COUNT_LINE
SSH_OUTPUT="$("${REPOS}/vps/bin/approve_comments" --print-count 2>/dev/null)" || return $?
SSH_OUTPUT="$("${REPOS}/vps/bin/approve-comments" --print-count 2>/dev/null)" || return $?
COUNT_LINE="$(grep -m1 -P '^COUNT:\d+' <<<"$SSH_OUTPUT")" || {
echo "Couldn't find 'COUNT' in ssh output" 1>&2
return 1
Expand Down

0 comments on commit d0b6d7f

Please sign in to comment.