summaryrefslogtreecommitdiff
path: root/mac
diff options
context:
space:
mode:
Diffstat (limited to 'mac')
-rw-r--r--mac/.config/shell/aliasrc4
-rwxr-xr-xmac/.local/bin/ylog14
2 files changed, 12 insertions, 6 deletions
diff --git a/mac/.config/shell/aliasrc b/mac/.config/shell/aliasrc
index 6f06710..359e951 100644
--- a/mac/.config/shell/aliasrc
+++ b/mac/.config/shell/aliasrc
@@ -497,3 +497,7 @@ alias za='zathura'
# zsh
alias sps="source ${XDG_CONFIG_HOME:-${HOME}/.config}/shell/profile"
alias szs="source ${XDG_CONFIG_HOME:-${HOME}/.config}/zsh/.zshrc"
+
+
+alias ylogt='ylog -s recordings -c us | grep $(LC_TIME=C date +%d/%b)'
+alias ylogy='ylog -s recordings -c us | grep $(LC_TIME=C date -v-1d +%d/%b)'
diff --git a/mac/.local/bin/ylog b/mac/.local/bin/ylog
index 1cfc52f..f15fb3b 100755
--- a/mac/.local/bin/ylog
+++ b/mac/.local/bin/ylog
@@ -9,7 +9,7 @@ SCOPE="all" # all|access|recordings
EXCL_FIREFOX=1 # 1 = exclude Firefox lines by default
EXCLUDES="59.19.56.8" # default exclude pattern
ADD_EXCLUDES=""
-LINE_LIMIT=10 # default number of lines when TARGET=all
+LINE_LIMIT=30 # default number of lines when TARGET=all
usage() {
cat <<'EOF'
@@ -81,11 +81,13 @@ LINE_LIMIT='"$LINE_LIMIT"'
# collect files
pick_files() {
- # recordings: always include recordings.access.log (old merged logs)
+ # recordings: include recordings.access.log only if COUNTRY=all
if [ "$SCOPE" = "recordings" ] || [ "$SCOPE" = "all" ]; then
- for q in "$LOG_DIR/recordings.access.log" "$LOG_DIR/recordings.access.log".*; do
- [ -e "$q" ] && printf "%s\n" "$q"
- done
+ if [ "$COUNTRY" = "all" ]; then
+ for q in "$LOG_DIR/recordings.access.log" "$LOG_DIR/recordings.access.log".*; do
+ [ -e "$q" ] && printf "%s\n" "$q"
+ done
+ fi
case "$COUNTRY" in
kr) for q in "$LOG_DIR/recordings.kr.log" "$LOG_DIR/recordings.kr.log".*; do [ -e "$q" ] && printf "%s\n" "$q"; done ;;
us) for q in "$LOG_DIR/recordings.us.log" "$LOG_DIR/recordings.us.log".*; do [ -e "$q" ] && printf "%s\n" "$q"; done ;;
@@ -149,7 +151,7 @@ for f in $(cat "$FILES_TMP"); do
if [ "$TARGET" = "all" ]; then
cmd="$reader"
else
- cmd="$reader | grep -E -- \"${ESC_TARGET}[[:space:]]\""
+ cmd="$reader | grep -E -- \"${ESC_TARGET}\""
fi
if [ -n "${EXRE:-}" ]; then