From 234d8b9d0fb568e2ad0f6ec9b88fbae87e7145ae Mon Sep 17 00:00:00 2001 From: Louie Shprung Date: Fri, 30 Dec 2022 12:48:13 -0800 Subject: Rudimentary docset creation --- Makefile | 10 ++++----- src/Info.plist | 6 +++--- src/icon.png | Bin 1617 -> 0 bytes src/index.sh | 63 +++++++++++++++++++++++++++++++++++---------------------- 4 files changed, 47 insertions(+), 32 deletions(-) delete mode 100644 src/icon.png diff --git a/Makefile b/Makefile index 023d235..929ca2e 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ DOCUMENTS_DIR = $(RESOURCES_DIR)/Documents INFO_PLIST_FILE = $(CONTENTS_DIR)/Info.plist INDEX_FILE = $(RESOURCES_DIR)/docSet.dsidx -ICON_FILE = $(DOCSET_DIR)/icon.png +#ICON_FILE = $(DOCSET_DIR)/icon.png ARCHIVE_FILE = $(DOCSET_NAME).tgz MANUAL_URL = https://invisible-island.net/archives/ncurses/ncurses.tar.gz @@ -16,7 +16,7 @@ MANUAL_SRC = tmp/ncurses-* MANUAL_PATH = ncurses-*/doc/html MANUAL_FILE = $(MANUAL_SRC)/doc/html -DOCSET = $(INFO_PLIST_FILE) $(INDEX_FILE) $(ICON_FILE) +DOCSET = $(INFO_PLIST_FILE) $(INDEX_FILE) all: $(DOCSET) @@ -55,7 +55,7 @@ $(INFO_PLIST_FILE): src/Info.plist $(CONTENTS_DIR) $(INDEX_FILE): src/index.sh $(DOCUMENTS_DIR) rm -f $@ - src/index.sh $@ $(DOCUMENTS_DIR)/*.html + src/index.sh $@ $(DOCUMENTS_DIR)/* -$(ICON_FILE): src/icon.png $(DOCSET_DIR) - cp src/icon.png $@ +#$(ICON_FILE): src/icon.png $(DOCSET_DIR) +# cp src/icon.png $@ diff --git a/src/Info.plist b/src/Info.plist index 2850204..8cf14a1 100644 --- a/src/Info.plist +++ b/src/Info.plist @@ -3,11 +3,11 @@ CFBundleIdentifier - gnuautoconf + ncurses CFBundleName - GNU Autoconf + ncurses DocSetPlatformFamily - autoconf + ncurses isDashDocset diff --git a/src/icon.png b/src/icon.png deleted file mode 100644 index 9b18522..0000000 Binary files a/src/icon.png and /dev/null differ diff --git a/src/index.sh b/src/index.sh index e81a0f7..e506ae4 100755 --- a/src/index.sh +++ b/src/index.sh @@ -6,7 +6,7 @@ shift get_title() { FILE="$1" - PATTERN=".*\(Autoconf\).*" + PATTERN="<[tT][iI][tT][lL][eE]>.*" #Find pattern in file grep -Eo "$PATTERN" "$FILE" | @@ -18,6 +18,8 @@ get_title() { sed 's/[ ]*$//g' | \ #Replace '&' with '&' sed 's/&/&/g' | \ + # ReplACE '–' with '-' + sed 's/–/-/g' | \ #Replace '<' with '<' sed 's/</