summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/grub-dev/get_title9
-rw-r--r--src/grub/get_title9
-rwxr-xr-xsrc/index-page.sh12
-rw-r--r--src/multiboot/Info.plist14
-rw-r--r--src/multiboot/get_title9
5 files changed, 45 insertions, 8 deletions
diff --git a/src/grub-dev/get_title b/src/grub-dev/get_title
new file mode 100644
index 0000000..df8772b
--- /dev/null
+++ b/src/grub-dev/get_title
@@ -0,0 +1,9 @@
+get_title() {
+ FILE="$1"
+
+
+ pup -p -f "$FILE" 'title text{}' | \
+ tr -d \\n | \
+ sed 's/^GNU[^:]*: //' | \
+ sed 's/\"/\"\"/g'
+}
diff --git a/src/grub/get_title b/src/grub/get_title
new file mode 100644
index 0000000..df8772b
--- /dev/null
+++ b/src/grub/get_title
@@ -0,0 +1,9 @@
+get_title() {
+ FILE="$1"
+
+
+ pup -p -f "$FILE" 'title text{}' | \
+ tr -d \\n | \
+ sed 's/^GNU[^:]*: //' | \
+ sed 's/\"/\"\"/g'
+}
diff --git a/src/index-page.sh b/src/index-page.sh
index 0742470..becfd48 100755
--- a/src/index-page.sh
+++ b/src/index-page.sh
@@ -5,17 +5,13 @@
# shellcheck source=./lib/insert
. "$(dirname "$0")"/lib/insert
-DB_PATH="$1"
+CALLER="$1"
shift
-get_title() {
- FILE="$1"
+. "$(dirname "$0")"/"$CALLER"/get_title
- pup -p -f "$FILE" 'title text{}' | \
- tr -d \\n | \
- sed 's/^GNU[^:]*: //' | \
- sed 's/\"/\"\"/g'
-}
+DB_PATH="$1"
+shift
insert_pages() {
# Get title and insert into table for each html file
diff --git a/src/multiboot/Info.plist b/src/multiboot/Info.plist
new file mode 100644
index 0000000..a735d39
--- /dev/null
+++ b/src/multiboot/Info.plist
@@ -0,0 +1,14 @@
+<?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>multiboot</string>
+ <key>CFBundleName</key>
+ <string>Multiboot Specification</string>
+ <key>DocSetPlatformFamily</key>
+ <string>multiboot</string>
+ <key>isDashDocset</key>
+ <true/>
+</dict>
+</plist>
diff --git a/src/multiboot/get_title b/src/multiboot/get_title
new file mode 100644
index 0000000..6bf29fc
--- /dev/null
+++ b/src/multiboot/get_title
@@ -0,0 +1,9 @@
+get_title() {
+ FILE="$1"
+
+
+ pup -p -f "$FILE" 'title text{}' | \
+ tr -d \\n | \
+ sed 's/^Multiboot[^:]*: //' | \
+ sed 's/\"/\"\"/g'
+}