From f24538403d74ed5a503d8a1d01ac2ba635d6be45 Mon Sep 17 00:00:00 2001 From: Ian Langworth Date: Mon, 1 Apr 2024 11:58:21 -0700 Subject: [PATCH] Add slurp standalone command --- .vscode-mac.settings.json | 5 ++++- .zshrc | 3 ++- bin/slurp | 19 +++++++++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100755 bin/slurp diff --git a/.vscode-mac.settings.json b/.vscode-mac.settings.json index f0466134..b1703cab 100644 --- a/.vscode-mac.settings.json +++ b/.vscode-mac.settings.json @@ -197,5 +197,8 @@ "’": true, "‘": true }, - "terminal.integrated.enableImages": true + "terminal.integrated.enableImages": true, + "markdown.copyFiles.destination": { + "images/${fileName}": "" + } } diff --git a/.zshrc b/.zshrc index 915f1aee..d64700a9 100644 --- a/.zshrc +++ b/.zshrc @@ -146,6 +146,7 @@ alias gcanes='gcane --gpg-sign' alias gcanoe='gcne' alias gcanoes='gcne --gpg-sign' alias gcanv='git commit --amend --no-verify' +alias gcd1='git clone --depth=1' alias gcia='git commit --amend' alias gcnv='git commit --no-verify' alias gd='git diff' @@ -170,6 +171,7 @@ alias gist='gist -p -c' alias gk='gitk &>/dev/null' alias gl1='git log -n 1' alias gl='git quicklog -n 12' +alias glg='git quicklog --grep' alias gll='git quicklog-long' alias gls='git log --show-signature' alias gm='git merge' @@ -231,7 +233,6 @@ alias rxvt-invert="echo -n '[?5t'" alias rxvt-scrollbar="echo -n '[?30t'" alias scp='scp -C -p' alias screen='screen -U' -alias slurp='wget -t 5 -c -nH -r -k -p -N --no-parent' alias st='git status' alias stt='git status -uall' alias t='tmux attach' diff --git a/bin/slurp b/bin/slurp new file mode 100755 index 00000000..946dad26 --- /dev/null +++ b/bin/slurp @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +set -eo pipefail + +# Original alias: wget -t 5 -c -nH -r -k -p -N --no-parent + +# Scrapes a page and subdirectories +wget \ + --tries=5 \ + --continue \ + --no-host-directories \ + --recursive \ + --convert-links \ + --timestamping \ + --no-parent \ + --directory-prefix=slurp \ + --no-verbose \ + $@ +