Skip to content

Commit

Permalink
sysutils/tailspin: add port: Log file highlighter
Browse files Browse the repository at this point in the history
tailspin works by reading through a log file line by line, running a
series of regexes against each line. The regexes recognize patterns
like dates, numbers, severity keywords and more.

tailspin does not make any assumptions on the format or position of
the items it wants to highlight. For this reason, it requires no
configuration or setup and will work predictably regardless of the
format the log file is in.

WWW: https://github.com/bensadeh/tailspin
  • Loading branch information
tagattie committed Nov 11, 2023
1 parent a473a9e commit d462234
Show file tree
Hide file tree
Showing 5 changed files with 483 additions and 0 deletions.
1 change: 1 addition & 0 deletions sysutils/Makefile
Expand Up @@ -1413,6 +1413,7 @@
SUBDIR += sysvbanner
SUBDIR += szyszka
SUBDIR += tai64nfrac
SUBDIR += tailspin
SUBDIR += tarsnap
SUBDIR += tarsnap-gui
SUBDIR += tarsnap-periodic
Expand Down
45 changes: 45 additions & 0 deletions sysutils/tailspin/Makefile
@@ -0,0 +1,45 @@
PORTNAME= tailspin
DISTVERSION= 2.0.0
CATEGORIES= sysutils

MAINTAINER= tagattie@FreeBSD.org
COMMENT= Log file highlighter
WWW= https://github.com/bensadeh/tailspin

LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENCE

USES= cargo

USE_GITHUB= yes
GH_ACCOUNT= bensadeh

PLIST_FILES= bin/tspin \
etc/bash_completion.d/tspin \
share/fish/completions/tspin.fish \
share/man/man1/tspin.1.gz \
share/zsh/site-functions/_tspin

PORTDOCS= CHANGELOG.md README.md

OPTIONS_DEFINE= DOCS

post-install:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/tspin
${INSTALL_MAN} ${WRKSRC}/man/tspin.1 \
${STAGEDIR}${MANPREFIX}/share/man/man1
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d
${INSTALL_DATA} ${WRKSRC}/completions/tspin.bash \
${STAGEDIR}${PREFIX}/etc/bash_completion.d/tspin
@${MKDIR} ${STAGEDIR}${PREFIX}/share/fish/completions
${INSTALL_DATA} ${WRKSRC}/completions/tspin.fish \
${STAGEDIR}${PREFIX}/share/fish/completions/tspin.fish
@${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions
${INSTALL_DATA} ${WRKSRC}/completions/tspin.zsh \
${STAGEDIR}${PREFIX}/share/zsh/site-functions/_tspin

post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_MAN} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>
142 changes: 142 additions & 0 deletions sysutils/tailspin/Makefile.crates
@@ -0,0 +1,142 @@
CARGO_CRATES= addr2line-0.20.0 \
adler-1.0.2 \
aho-corasick-1.0.2 \
anstream-0.6.4 \
anstyle-1.0.1 \
anstyle-parse-0.2.1 \
anstyle-query-1.0.0 \
anstyle-wincon-3.0.1 \
async-trait-0.1.74 \
autocfg-1.1.0 \
backtrace-0.3.68 \
bitflags-1.3.2 \
bitflags-2.4.1 \
bytes-1.4.0 \
cc-1.0.79 \
cfg-if-1.0.0 \
clap-4.4.7 \
clap_builder-4.4.7 \
clap_complete-4.4.4 \
clap_derive-4.4.7 \
clap_lex-0.6.0 \
color-eyre-0.6.2 \
color-spantrace-0.2.0 \
colorchoice-1.0.0 \
colored-2.0.4 \
crossbeam-channel-0.5.8 \
crossbeam-utils-0.8.16 \
ctrlc-3.4.1 \
dirs-5.0.1 \
dirs-sys-0.4.1 \
equivalent-1.0.0 \
errno-0.3.1 \
errno-dragonfly-0.1.2 \
eyre-0.6.8 \
fastrand-2.0.0 \
filetime-0.2.21 \
futures-core-0.3.28 \
futures-task-0.3.28 \
futures-util-0.3.28 \
getrandom-0.2.10 \
gimli-0.27.3 \
hashbrown-0.14.0 \
heck-0.4.1 \
hermit-abi-0.2.6 \
hermit-abi-0.3.1 \
indenter-0.3.3 \
indexmap-2.0.0 \
inotify-0.9.6 \
inotify-sys-0.1.5 \
is-terminal-0.4.8 \
kqueue-1.0.7 \
kqueue-sys-1.0.3 \
lazy_static-1.4.0 \
libc-0.2.149 \
linemux-0.3.0 \
linux-raw-sys-0.4.10 \
lock_api-0.4.10 \
log-0.4.19 \
memchr-2.6.3 \
miniz_oxide-0.7.1 \
mio-0.8.8 \
nix-0.27.1 \
notify-5.2.0 \
num_cpus-1.15.0 \
object-0.31.1 \
once_cell-1.18.0 \
option-ext-0.2.0 \
owo-colors-3.5.0 \
parking_lot-0.12.1 \
parking_lot_core-0.9.8 \
pin-project-lite-0.2.12 \
pin-utils-0.1.0 \
ppv-lite86-0.2.17 \
proc-macro2-1.0.64 \
quote-1.0.30 \
rand-0.8.5 \
rand_chacha-0.3.1 \
rand_core-0.6.4 \
redox_syscall-0.2.16 \
redox_syscall-0.3.5 \
redox_syscall-0.4.1 \
redox_users-0.4.3 \
regex-1.10.2 \
regex-automata-0.4.3 \
regex-syntax-0.8.2 \
rustc-demangle-0.1.23 \
rustix-0.38.21 \
same-file-1.0.6 \
scopeguard-1.1.0 \
serde-1.0.190 \
serde_derive-1.0.190 \
serde_spanned-0.6.4 \
sharded-slab-0.1.4 \
shellexpand-3.1.0 \
signal-hook-registry-1.4.1 \
slab-0.4.8 \
smallvec-1.10.0 \
socket2-0.5.3 \
strsim-0.10.0 \
syn-2.0.28 \
tempfile-3.8.1 \
terminal_size-0.3.0 \
thiserror-1.0.40 \
thiserror-impl-1.0.40 \
thread_local-1.1.7 \
tokio-1.33.0 \
tokio-macros-2.1.0 \
toml-0.8.6 \
toml_datetime-0.6.5 \
toml_edit-0.20.7 \
tracing-0.1.37 \
tracing-core-0.1.31 \
tracing-error-0.2.0 \
tracing-subscriber-0.3.17 \
unicode-ident-1.0.9 \
utf8parse-0.2.1 \
valuable-0.1.0 \
walkdir-2.3.3 \
wasi-0.11.0+wasi-snapshot-preview1 \
winapi-0.3.9 \
winapi-i686-pc-windows-gnu-0.4.0 \
winapi-util-0.1.5 \
winapi-x86_64-pc-windows-gnu-0.4.0 \
windows-sys-0.45.0 \
windows-sys-0.48.0 \
windows-targets-0.42.2 \
windows-targets-0.48.0 \
windows_aarch64_gnullvm-0.42.2 \
windows_aarch64_gnullvm-0.48.0 \
windows_aarch64_msvc-0.42.2 \
windows_aarch64_msvc-0.48.0 \
windows_i686_gnu-0.42.2 \
windows_i686_gnu-0.48.0 \
windows_i686_msvc-0.42.2 \
windows_i686_msvc-0.48.0 \
windows_x86_64_gnu-0.42.2 \
windows_x86_64_gnu-0.48.0 \
windows_x86_64_gnullvm-0.42.2 \
windows_x86_64_gnullvm-0.48.0 \
windows_x86_64_msvc-0.42.2 \
windows_x86_64_msvc-0.48.0 \
winnow-0.5.15

0 comments on commit d462234

Please sign in to comment.