summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouie Shprung <lshprung@scu.edu>2022-11-24 20:07:45 -0800
committerLouie Shprung <lshprung@scu.edu>2022-11-24 21:17:04 -0800
commit623e48251d1098007ba8a27e4bc2b7c18d39d8a3 (patch)
tree40eb9ccfa9c0cbaaa7fdb4added5a51c20940ae4
parent60cf749e9cb8f751346db0d378ac9ed93534db4d (diff)
Added way to specify alternative executable for python script
-rw-r--r--Makefile4
-rw-r--r--README.md8
2 files changed, 9 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index a6fd474..daf3d1b 100644
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,11 @@ $(DOCSET): getters/$(DOCSET).sh
# Convert to dash docset using python script
$(DOCSET).docset: $(DOCSET) mandocset.py
+ifndef EXECUTABLE
python3 mandocset.py -o $(DOCSET) -p $(DOCSET)/
+else
+ python3 mandocset.py -o $(DOCSET) -p $(DOCSET)/ -e "$(EXECUTABLE)"
+endif
# Remove generated files/directories
.PHONY: clean
diff --git a/README.md b/README.md
index 74cc38a..a403ce9 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,6 @@
This is python script (mandocset.py) that generates Dash docset from man pages. It takes folders with man pages as it's arguments. Then in each folder it finds all folders, containing digit in their name, runs `man2html -r` for each file inside them.
-By default script uses man2html utility. If you prefer pandoc just use `-e "pandoc -f man -t html"`.
-
---
This is a loose fork of [Yanpas' repository](https://github.com/Yanpas/mandocset), forked to help package additional man page collections. Currently, this fork only supports Debian and Debian-based systems.
@@ -22,7 +20,11 @@ This is a loose fork of [Yanpas' repository](https://github.com/Yanpas/mandocset
### Usage
-Available docsets to build are listed under `getters/`. To build a docset, run `make DOCSET=[DOCSET]`, where `[DOCSET]` is the docset you wish to generate (the name of the script in `getters/` minus the extension). Additional make directives include:
+Available docsets to build are listed under `getters/`. To build a docset, run `make DOCSET=[DOCSET]`, where `[DOCSET]` is the docset you wish to generate (the name of the script in `getters/` minus the extension).
+
+An alternative executable to `man2html` for conversion can also be specified using `EXECUTABLE=[EXECUTABLE]`, for example, `EXECUTABLE="pandoc -f man -t html"`.
+
+Additional make targets include:
- `make clean` - remove the directories created when building the docset
- `make tgz` - Create a .tgz archive for easily submitting to [Dash-User-Contributions](https://github.com/Kapeli/Dash-User-Contributions)