id = "urlscan"
name = "urlscan"
homepage = "https://github.com/firecat53/urlscan"
description = "View/select the URLs in an email message or file."
executables = ["urlscan"]
platforms = ["macos", "linux"]
[dotfiles]
paths = ["~/.config/urlscan/config.json"]
exclude = []
secret = []
[commands]
format = 1
label = "List URLs in a message"
description = "Opens the URL picker for one email message, or prints the URLs with --no-browser. Custom regex, run/pipe commands and colour modes are not included."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = false, short_bundles = false }
[[commands.source]]
id = "manual"
kind = "manual"
url = "https://manpages.debian.org/unstable/urlscan/urlscan.1.en.html"
revision = "1.1.2"
evidence = """
urlscan [options] message
-c, --compact
Compact display mode; don't show the context of each URL.
-d, --dedupe
Remove duplicated URLs from the list of URLs.
--headers
Scan certain message headers for URLs.
-n, --no-browser
Disables the selection interface and print the links to standard output.
-R, --reverse
Reverse displayed order of URLs.
-s, --single
Exit urlscan after opening or copying a single browser link.
-w, --width
Set display width.
"""
[[commands.field]]
id = "message"
label = "Message file"
description = "Leave empty to read the message from standard input."
type = "path"
position = 0
path = { kind = "file", role = "input", must_exist = true }
sources = ["manual"]
[[commands.field]]
id = "no_browser"
label = "Print URLs only"
type = "boolean"
option = ["--no-browser", "-n"]
sources = ["manual"]
[[commands.field]]
id = "dedupe"
label = "Remove duplicates"
type = "boolean"
option = ["--dedupe", "-d"]
sources = ["manual"]
[[commands.field]]
id = "compact"
label = "Compact (no context)"
type = "boolean"
option = ["--compact", "-c"]
sources = ["manual"]
[[commands.field]]
id = "reverse"
label = "Reverse order"
type = "boolean"
option = ["--reverse", "-R"]
sources = ["manual"]
[[commands.field]]
id = "headers"
label = "Scan headers too"
type = "boolean"
option = ["--headers"]
sources = ["manual"]
[[commands.field]]
id = "single"
label = "Exit after one URL"
type = "boolean"
option = ["--single", "-s"]
sources = ["manual"]
[[commands.field]]
id = "width"
label = "Display width"
type = "integer"
option = ["--width", "-w"]
sources = ["manual"]
[[commands.task]]
id = "extract"
label = "Print unique URLs"
set = { no_browser = [true], dedupe = [true] }
fields = ["message", "no_browser", "dedupe", "headers"]
required = []
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["message", "no_browser", "dedupe", "compact"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["reverse", "headers", "single", "width"]