diff options
author | Louie S <louie@example.com> | 2024-01-16 08:39:58 -0500 |
---|---|---|
committer | Louie S <louie@example.com> | 2024-01-16 08:39:58 -0500 |
commit | 10a6815096b5101618d22c518dcc72331831d231 (patch) | |
tree | 42313030e450f067ce85b1a6c18f5b8dcfb3699d | |
parent | 8fb96e377ed2fa0c0ab707425b862363a29be859 (diff) |
First commit as Meson docset generator
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 9 | ||||
-rw-r--r-- | README | 19 | ||||
-rw-r--r-- | README.md | 33 | ||||
-rw-r--r-- | README.template | 17 | ||||
-rw-r--r-- | src/Info.plist | 6 | ||||
-rw-r--r-- | src/icon.png | bin | 0 -> 16051 bytes |
7 files changed, 26 insertions, 59 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1a1f527 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +Meson.* @@ -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 $@ @@ -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 `<NAME>`, `<UPSTREAM LINK>`, and `<UPSTREAM HOST>` 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 `<!-- VALUE -->` 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 <NAME> docset for Dash. The script is based on the dash-docset-generation-template - -- <NAME>: <UPSTREAM LINK> -- 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 <NAME> Manual, simply -execute `make` from the same directory as this README file. The latest edition -will be downloaded from <UPSTREAM HOST> 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 @@ <plist version="1.0"> <dict> <key>CFBundleIdentifier</key> - <string><!-- VALUE --></string> + <string>meson</string> <key>CFBundleName</key> - <string><!-- VALUE --></string> + <string>Meson</string> <key>DocSetPlatformFamily</key> - <string><!-- VALUE --></string> + <string>meson</string> <key>isDashDocset</key> <true/> </dict> diff --git a/src/icon.png b/src/icon.png Binary files differnew file mode 100644 index 0000000..1b3915d --- /dev/null +++ b/src/icon.png |