Package: less
Version: 481-2.1ubuntu0.1
Severity: wishlist

Dear Maintainer,

Enclosed below are recipes from my ~/.lessfilter for viewing .whl and .egg
files in less(1) which I hope will be of general use and worthy of inclusion in
lesspipe.

The wheel (.whl) format and its predecessor the egg (.egg) are the official
built-package formats for the Python programming language.  Both formats are
implemented as zipfiles containing a directory of metadata alongside the actual
Python files.  My recipes (in imitation of lesspipe's .deb recipe) display the
primary metadata file, a blank line, and the list of files in the zipfile.  The
primary metadata includes the package's entire README, which is frequently very
long, and so I have inserted sed(1) commands to remove this field.

If you need egg and/or wheel files to test against, I would direct you to
possibly the most popular Python project that still provides both:
<https://pypi.python.org/pypi/setuptools_scm/#downloads>

    *.egg)
        if [ -x "`which unzip`" ]; then
            unzip -p "$1" EGG-INFO/PKG-INFO | \
                sed '/^Description:/,/^\S/{/^Description:/d; /^\S/b; d}'
            echo
            unzip -v "$1"
        else
            echo "No unzip available"
        fi
        ;;

    *.whl)
        if [ -x "`which unzip`" ]; then
            unzip -p "$1" '*.dist-info/METADATA' | sed '/^$/q'
            unzip -v "$1"
        else
            echo "No unzip available"
        fi
        ;;

-- John Wodder


-- System Information:
Debian Release: stretch/sid
  APT prefers xenial-updates
  APT policy: (500, 'xenial-updates'), (500, 'xenial-security'), (500, 
'xenial'), (100, 'xenial-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.4.0-72-generic (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages less depends on:
ii  debianutils  4.7
ii  libc6        2.23-0ubuntu7
ii  libtinfo5    6.0+20160213-1ubuntu1

less recommends no packages.

less suggests no packages.

-- no debconf information

Reply via email to