From 52de56b79d8392f86235529c51863b5a5b35c1e4 Mon Sep 17 00:00:00 2001 From: finga Date: Fri, 5 Nov 2021 11:04:09 +0100 Subject: [PATCH] Rename `watch` to `series` To resolve the naming conflict with `watch` which executes a program periodically and shows its output. --- {watch => series}/README.md | 10 +++++----- {watch => series}/input.conf | 0 {watch => series}/watch.sh | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) rename {watch => series}/README.md (57%) rename {watch => series}/input.conf (100%) rename {watch => series}/watch.sh (94%) diff --git a/watch/README.md b/series/README.md similarity index 57% rename from watch/README.md rename to series/README.md index 58df721..da6c7bc 100644 --- a/watch/README.md +++ b/series/README.md @@ -1,4 +1,4 @@ -# watch +# `series` A small script to help me remember were I left off playing alphabetically correct ordered media files. @@ -7,9 +7,9 @@ The idea is to have a symlink which is updated each time a clip is played until the end. Then it points to the next Episode. ## Configuration -The path containing the media can be set via the `WATCH_SRC_PATH` +The path containing the media can be set via the `SERIES_SRC_PATH` environment variable. The path for keeping the symlinks (the current -file to be watched) can be set via the `WATCH_LINK_PATH` environment -variable. If `WATCH_LINK_PATH` is not set the symlinks are kept in the +file to be watched) can be set via the `SERIES_LINK_PATH` environment +variable. If `SERIES_LINK_PATH` is not set the symlinks are kept in the folder of the series and will point to a relative path. If -`WATCH_LINK_PATH` is set the symlink points to an absolute path. +`SERIES_LINK_PATH` is set the symlink points to an absolute path. diff --git a/watch/input.conf b/series/input.conf similarity index 100% rename from watch/input.conf rename to series/input.conf diff --git a/watch/watch.sh b/series/watch.sh similarity index 94% rename from watch/watch.sh rename to series/watch.sh index f895c46..36ced9a 100755 --- a/watch/watch.sh +++ b/series/watch.sh @@ -1,8 +1,8 @@ #!/bin/sh set -e -src_path="${WATCH_SRC_PATH:-/media/hdd1/media/series}" -link_path="${WATCH_LINK_PATH:-}" +src_path="${SERIES_SRC_PATH:-/media/hdd1/media/series}" +link_path="${SERIES_LINK_PATH:-}" find_series() { find "$src_path" -maxdepth 1 -printf "%f\\n" | sort | grep -v "$(basename "$src_path")"