summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLouie S <louie@example.com>2024-06-05 18:22:54 -0400
committerLouie S <louie@example.com>2024-06-05 18:22:54 -0400
commit973bbcd6a8af9695a937fdc754e384a917984d2a (patch)
tree224effa3cc35d0d0b0033a81e057e3e9123e782a /src
parentef4c089d4f64307e48b3810830c2559830ebf8e2 (diff)
FORK - first commit of dash-docset-builder
Diffstat (limited to 'src')
-rw-r--r--src/Info.plist14
-rwxr-xr-xsrc/index.sh34
-rw-r--r--src/lib/create_table7
-rw-r--r--src/lib/insert8
4 files changed, 0 insertions, 63 deletions
diff --git a/src/Info.plist b/src/Info.plist
deleted file mode 100644
index 111baae..0000000
--- a/src/Info.plist
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleIdentifier</key>
- <string><!-- VALUE --></string>
- <key>CFBundleName</key>
- <string><!-- VALUE --></string>
- <key>DocSetPlatformFamily</key>
- <string><!-- VALUE --></string>
- <key>isDashDocset</key>
- <true/>
-</dict>
-</plist>
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 "$@"
diff --git a/src/lib/create_table b/src/lib/create_table
deleted file mode 100644
index a783c50..0000000
--- a/src/lib/create_table
+++ /dev/null
@@ -1,7 +0,0 @@
-create_table() {
- DB_PATH="$1"
-
- sqlite3 "$DB_PATH" "CREATE TABLE IF NOT EXISTS searchIndex(id INTEGER PRIMARY KEY, name TEXT, type TEXT, path TEXT);"
- sqlite3 "$DB_PATH" "CREATE UNIQUE INDEX IF NOT EXISTS anchor ON searchIndex (name, type, path);"
-}
-
diff --git a/src/lib/insert b/src/lib/insert
deleted file mode 100644
index 31c1b4c..0000000
--- a/src/lib/insert
+++ /dev/null
@@ -1,8 +0,0 @@
-insert() {
- DB_PATH="$1"
- NAME="$2"
- TYPE="$3"
- PAGE_PATH="$4"
-
- sqlite3 "$DB_PATH" "INSERT INTO searchIndex(name, type, path) VALUES (\"$NAME\",\"$TYPE\",\"$PAGE_PATH\");"
-}