From c886358b9cb010d2b951e41c736b6932ba9862bc Mon Sep 17 00:00:00 2001 From: zPlus Date: Sat, 8 Jul 2023 12:54:32 +0200 Subject: [PATCH] Update broken instructions. --- README | 18 ++++++++++-------- scripts/Makefile | 10 +++++++--- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/README b/README index f52f445..b9e9121 100644 --- a/README +++ b/README @@ -5,18 +5,20 @@ listening on port 3142. debiman by default will download from http://localhost:3142/deb.debian.org/ This setting can be changed with -local_mirror or -remote_mirror -Download manpages from Debian: +How to use the scripts: - $ DEBIMAN_SERVING_DIR=/absolue/path make download +1. Download manpages from Debian: -Extract all the pages from .gz: + $ DEBIMAN_SERVING_DIR=/absolue/path make download - $ DEBIMAN_SERVING_DIR=/absolue/path make download +2. Extract all the pages from .gz: -Convert manpages to plaintext: + $ DEBIMAN_SERVING_DIR=/absolue/path make extract - $ DEBIMAN_SERVING_DIR=/absolue/path make convert +3. Convert manpages to plaintext and html: -Create RDF graph: + $ DEBIMAN_SERVING_DIR=/absolue/path make convert - $ DEBIMAN_SERVING_DIR=/absolue/path ./rdf.py +4. Create RDF graph: + + $ DEBIMAN_SERVING_DIR=/absolue/path ./rdf.py diff --git a/scripts/Makefile b/scripts/Makefile index 12f02b2..1d81877 100755 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -1,18 +1,22 @@ SHELL = /bin/bash + +# THIS PATH MUST BE ABSOLUTE. +# The path where debiman will save files. +# There is a bug in debiman, it won't accept a relative path DEBIMAN_SERVING_DIR ?= ./ # This just prints out variables for displaying vars: @echo "Using envvar DEBIMAN_SERVING_DIR = ${DEBIMAN_SERVING_DIR}" - + @echo "If you get errors, this path MUST be absolute." # Note: the behaviour of debiman is to download all the manpages, then render them all. # This cannot be changed. Since we're only interested in the raw manpages and not # the HTML output, -only_render_pkgs is a hack that will make debiman render only one # page (0ad) and quit. download: vars - debiman -sync_codenames="bookworm" -serving_dir="${DEBIMAN_SERVING_DIR}" -only_render_pkgs="0ad" + debiman -sync_codenames="bookworm" -sync_suites= -serving_dir="${DEBIMAN_SERVING_DIR}" -only_render_pkgs="0ad" # Extract downloaded pages since they're compressed by default extract: vars @@ -32,4 +36,4 @@ convert: vars mandoc -T html -O fragment "$${file}" > "$${file}.roff.html"; \ done < <( find "${DEBIMAN_SERVING_DIR}" -type f -name "*.*.*" ! -name "*.gz" ! -name "*.roff" ! -name "*.txt" ! -name "*.html" ! -name "stress-ng.1.en" ! -name "md.4.en" ) -.PHONY: vars download extract +.PHONY: vars download extract convert