summaryrefslogtreecommitdiff
path: root/src/index.sh
diff options
context:
space:
mode:
authorLouie S <louie@example.com>2023-05-28 17:52:08 -0700
committerLouie S <louie@example.com>2023-05-28 17:52:08 -0700
commitae168236bbc1d5be63f607e872216a1b6d6ac3e5 (patch)
tree4e8af8141d916c86482e2cd042338815ce34a1ef /src/index.sh
parent6dd93704a3218a26d10a4268f73c919eea3f22c8 (diff)
GNU Automake (now with more indexing)
Diffstat (limited to 'src/index.sh')
-rwxr-xr-xsrc/index.sh34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/index.sh b/src/index.sh
deleted file mode 100755
index 0b6e693..0000000
--- a/src/index.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/env sh
-
-# shellcheck source=./lib/create_table
-. "$(dirname "$0")"/lib/create_table
-# shellcheck source=./lib/insert
-. "$(dirname "$0")"/lib/insert
-
-DB_PATH="$1"
-shift
-
-get_title() {
- FILE="$1"
-
- pup -p -f "$FILE" 'title text{}' | \
- tr -d \\n | \
- sed 's/\"/\"\"/g'
-}
-
-insert_pages() {
- # Get title and insert into table for each html file
- while [ -n "$1" ]; do
- unset PAGE_NAME
- unset PAGE_TYPE
- PAGE_NAME="$(get_title "$1")"
- PAGE_TYPE="Guide"
- if [ -n "$PAGE_NAME" ]; then
- insert "$DB_PATH" "$PAGE_NAME" "$PAGE_TYPE" "$(basename "$1")"
- fi
- shift
- done
-}
-
-create_table "$DB_PATH"
-insert_pages "$@"