lintian-ssg

command module
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2025 License: GPL-2.0 Imports: 25 Imported by: 0

README

Lintian SSG

build coverage goreport version

A very simple static site generator that builds a Web version of Lintian tags' explanations, based on the output of lintian-explain-tags --format=json. It is used to generate the pages of https://lintian.debian.org.

Interesting examples include very-long-line-length-in-source-file as it displays all fields and override_dh_auto_test-does-not-check-DEB_BUILD_OPTIONS for its rich markup.

Build

The only build requirement is Go >= 1.18.

go generate ./version # to include version, only from a git checkout
go build
go test ./...         # optionally, to run tests

Usage

Usage: lintian-ssg [OPTION]...

Generate a static web site for Lintian tags' explanations. By default, it will
call lintian-explain-tags in a subprocess, except if the --tags-file option is
provided.

Options:
  --base-url=URL        URL, including the scheme, where the root of the website
                        will be located. This will be used in the sitemap, the
                        canonical link of each page and the robots.txt.

  --footer=TEXT         TEXT to add to the footer, inline Markdown elements will
                        be parsed.

  --lintian-version=V   Override Lintian's version in output with V.
  --manual-file=FILE    Read Lintian's manual from FILE.
                        (default "/usr/share/doc/lintian/lintian.html")

  --no-sitemap          Disable sitemap.xml.gz (and thus robots.txt) generation.
  -o, --output-dir=DIR  Path of the directory DIR where to output the generated
                        website. (default "out")

  --stats               Display some statistics.
  --tags-file=FILE      Read Lintian tags from FILE (in JSON format).

  --debug               Print stack traces on errors.
  -h, --help            Show this help and exit.
  --version             Show version and exit.
Apache (global, vhost)
# For a more friendly 404 error page
ErrorDocument 404 /404.html

<Location "/tags/">
	# To allow access .html files without their extension
	Options +MultiViews
</Location>
Nginx (server)
# For a more friendly 404 error page
error_page 404 /404.html;

location /tags/ {
    # To allow access .html files without their extension
    try_files $uri.html $uri =404;
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL