Skip to content

Commit

Permalink
Update packaging and setup to current best practices
Browse files Browse the repository at this point in the history
  • Loading branch information
firecat53 committed Oct 6, 2021
1 parent 54c2b12 commit b0d65e5
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 33 deletions.
46 changes: 17 additions & 29 deletions README.rst → README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
Urlscan
=======
# Urlscan

Contributors
------------
## Contributors

Scott Hansen <[email protected]> (Author and Maintainer)
Scott Hansen \<[email protected]\> (Author and Maintainer)

Maxime Chatelle <[email protected]> (Debian Maintainer)
Maxime Chatelle \<[email protected]\> (Debian Maintainer)

Daniel Burrows <[email protected]> (Original Author)
Daniel Burrows \<[email protected]\> (Original Author)

Purpose and Requirements
------------------------
## Purpose and Requirements

Urlscan is a small program that is designed to integrate with the "mutt"
mailreader to allow you to easily launch a Web browser for URLs contained in
Expand All @@ -21,8 +18,7 @@ email messages. It is a replacement for the "urlview" program.

Requires: Python 3.6+ and the python-urwid library

Features
--------
## Features

Urlscan parses an email message or file and scans it for URLs and email
addresses. It then displays the URLs and their context within the message, and
Expand Down Expand Up @@ -71,19 +67,18 @@ Relative to urlview, urlscan has the following additional features:
- Scan certain email headers for URLs. Currently `Link`, `Archived-At` and
`List-*` are scanned when `--headers` is passed.

Installation and setup
----------------------
## Installation and setup

To install urlscan, install from your distribution repositories (Archlinux),
from Pypi, or do a local development install with pip -e::
from Pypi, or do a local development install with pip -e:

pip install --user urlscan

OR

cd <path/to/urlscan> && pip install --user -e .

.. NOTE::
**NOTE**

The minimum required version of urwid is 1.2.1.

Expand All @@ -104,10 +99,7 @@ is not set, xdg-open will control which browser is used, if it's available.:
export BROWSER=/usr/bin/epiphany


Command Line usage
------------------

::
## Command Line usage

urlscan OPTIONS <file>

Expand Down Expand Up @@ -142,18 +134,16 @@ the URL can be piped to the command using `--run-safe <command> --pipe` (or
`--run`). Using --run-safe with --pipe is preferred if the command supports it,
as it is marginally more secure and tolerant of special characters in the URL.

Theming
-------
## Theming

Run `urlscan -g` to generate ~/.config/urlscan/config.json with the default
color and black & white palettes. This can be edited or added to, as desired.
The first palette in the list will be the default. Configure the palettes
according to the `Urwid display attributes`_.
according to the [Urwid display attributes][1].

Display width can be set with `--width`.

Keybindings
-----------
## Keybindings

Run `urlscan -g` to generate ~/.config/urlscan/config.json. All of the keys will
be listed. You can either leave in place or delete any that will not be altered.
Expand All @@ -180,13 +170,11 @@ The follow actions are supported:
- `top` -- move to first list item (default: `g`)
- `up` -- cursor up (default: `k`)

Update TLD list (for developers, not users)
-------------------------------------------
## Update TLD list (for developers, not users)

`wget https://data.iana.org/TLD/tlds-alpha-by-domain.txt`

Known bugs and limitations
--------------------------
## Known bugs and limitations

- Running urlscan sometimes "messes up" the terminal background. This seems to
be an urwid bug, but I haven't tracked down just what's going on.
Expand All @@ -201,4 +189,4 @@ Known bugs and limitations
sub-parts, rather than just picking one, which may lead to URLs and context
appearing twice. (Bypass this by selecting the '--dedupe' option)

.. _Urwid display attributes: http://urwid.org/manual/displayattributes.html#display-attributes
[1]: http://urwid.org/manual/displayattributes.html#display-attributes "Urwid display attributes"
20 changes: 16 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
#!/usr/bin/env python3
"""urlscan setup.py"""

from setuptools import setup


def long_description():
"""Generate long description from README"""
with open("README.md") as readme:
return readme.read()


setup(name="urlscan",
version="0.9.6",
version="0.9.7",
description="View/select the URLs in an email message or file",
long_description=long_description(),
long_description_content_type="text/markdown",
author="Scott Hansen",
author_email="[email protected]",
url="https://github.com/firecat53/urlscan",
download_url="https://github.com/firecat53/urlscan/archive/0.9.6.zip",
packages=['urlscan'],
scripts=['bin/urlscan'],
entry_points={
'console_scripts': ['urlscan=urlscan.__main__:main']
},
package_data={'urlscan': ['assets/*']},
data_files=[('share/doc/urlscan', ['README.rst', 'COPYING']),
data_files=[('share/doc/urlscan', ['README.md', 'COPYING']),
('share/man/man1', ['urlscan.1'])],
license="GPLv2",
install_requires=["urwid>=1.2.1"],
Expand All @@ -28,5 +40,5 @@
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Topic :: Utilities'],
keywords=("urlscan urlview email mutt tmux"),
keywords="urlscan, urlview, email, mutt, tmux"
)
File renamed without changes.

0 comments on commit b0d65e5

Please sign in to comment.