From 10a6815096b5101618d22c518dcc72331831d231 Mon Sep 17 00:00:00 2001 From: Louie S Date: Tue, 16 Jan 2024 08:39:58 -0500 Subject: First commit as Meson docset generator --- .gitignore | 1 + Makefile | 9 +++------ README | 19 +++++++++++++++++++ README.md | 33 --------------------------------- README.template | 17 ----------------- src/Info.plist | 6 +++--- src/icon.png | Bin 0 -> 16051 bytes 7 files changed, 26 insertions(+), 59 deletions(-) create mode 100644 .gitignore create mode 100644 README delete mode 100644 README.md delete mode 100644 README.template create mode 100644 src/icon.png diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1a1f527 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +Meson.* diff --git a/Makefile b/Makefile index 9339745..4b63990 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -#DOCSET_NAME = ... +DOCSET_NAME = Meson DOCSET_DIR = $(DOCSET_NAME).docset CONTENTS_DIR = $(DOCSET_DIR)/Contents @@ -10,10 +10,10 @@ INDEX_FILE = $(RESOURCES_DIR)/docSet.dsidx ICON_FILE = $(DOCSET_DIR)/icon.png ARCHIVE_FILE = $(DOCSET_NAME).tgz -#SRC_ICON = src/icon.png +SRC_ICON = src/icon.png #MANUAL_URL = ... -#MANUAL_FILE = tmp/... +MANUAL_FILE = Meson.src.tgz ERROR_DOCSET_NAME = $(error DOCSET_NAME is unset) WARNING_MANUAL_URL = $(warning MANUAL_URL is unset) @@ -52,9 +52,6 @@ tmp: $(ARCHIVE_FILE): $(DOCSET) tar --exclude='.DS_Store' -czf $@ $(DOCSET_DIR) -$(MANUAL_FILE): tmp - curl -o $@ $(MANUAL_URL) - $(DOCSET_DIR): mkdir -p $@ diff --git a/README b/README new file mode 100644 index 0000000..6959129 --- /dev/null +++ b/README @@ -0,0 +1,19 @@ +Here is a script and a Makefile for generating a Meson docset for Dash. The script is based on the dash-docset-generation-template + +- Meson: https://mesonbuild.com/ +- Dash: https://kapeli.com/dash +- dash-docset-generation-template: https://github.com/lshprung/dash-docset-generation-template + +To generate a docset from the latest edition of the Meson Manual: +1. Build an offline copy of the Meson official docs from https://github.com/mesonbuild/meson/tree/master/docs by following their instructions. +2. Create a .tar.gz file called `Meson.src.tgz` containing everything from the `built_docs/Meson documentation-doc/html` directory, and place it in the same directory as this README. + - Do not name it `Meson.tgz` because that is what the packaged Dash docset will be called +3. Now simply execute `make` from the same directory as this README file. + +Requirements: + +- any POSIX-compliant shell +- curl - https://curl.se/ +- make - https://www.gnu.org/software/make/ +- pup - https://tracker.debian.org/pkg/pup +- sqlite3 - https://www.sqlite.org/index.html diff --git a/README.md b/README.md deleted file mode 100644 index 774f7de..0000000 --- a/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# Dash Docset Template - -This is a repository providing a template to package a Dash docset from HTML source documentation. Files that need to be manually configured are listed below. Additional fine tuning is also recommended, depending on the quirks of the documentation being packaged. An example docset packaging script for GNU Make using this template can be seen [here](https://github.com/lshprung/gnu-make-dash-docset) - -### `README.template` - -This file will provide a README for the packaging script. Replace ``, ``, and `` with appropriate values. - -### `Makefile` - -This file will build the docset. - -- `DOCSET_NAME` must be set -- `MANUAL_FILE` must be set - - If the script should download documentation from the internet, `MANUAL_URL` must also be set. If not, ensure a `.tgz` archive of the HTML documentation exists at `tmp/MANUAL.tgz` (where MANUAL is the name of the archive) - -### `src/icon.png` - -If you want to associate an icon with the docset, it should be saved to `src/icon.png`. Make sure to uncomment the corresponding line in `Makefile` to include the icon in the docset. - -### `src/index.sh` - -This is the main script that builds the docset index. This script does not require any manual modifications, but you will probably want to make additions/changes to improve the quality of your docset and accomodate any quirks. - -### `src/Info.plist` - -This file contains metadata for the docset. Replace `` with appropriate values. It may be useful to refer to the `Info.plist` file of an existing docset for reference. - ---- - -### Credits - -Created by [lshprung](https://github.com/lshprung), and originally based on [benzado](https://github.com/benzado)'s [gnu-make-dash-docset](https://github.com/benzado/gnu-make-dash-docset). diff --git a/README.template b/README.template deleted file mode 100644 index 6fa12d5..0000000 --- a/README.template +++ /dev/null @@ -1,17 +0,0 @@ -Here is a script and a Makefile for generating a docset for Dash. The script is based on the dash-docset-generation-template - -- : -- Dash: https://kapeli.com/dash -- dash-docset-generation-template: https://github.com/lshprung/dash-docset-generation-template - -To generate a docset from the latest edition of the Manual, simply -execute `make` from the same directory as this README file. The latest edition -will be downloaded from and packaged appropriately. - -Requirements: - -- any POSIX-compliant shell -- curl - https://curl.se/ -- make - https://www.gnu.org/software/make/ -- pup - https://tracker.debian.org/pkg/pup -- sqlite3 - https://www.sqlite.org/index.html diff --git a/src/Info.plist b/src/Info.plist index 111baae..d60f994 100644 --- a/src/Info.plist +++ b/src/Info.plist @@ -3,11 +3,11 @@ CFBundleIdentifier - + meson CFBundleName - + Meson DocSetPlatformFamily - + meson isDashDocset diff --git a/src/icon.png b/src/icon.png new file mode 100644 index 0000000..1b3915d Binary files /dev/null and b/src/icon.png differ -- cgit