diff --git a/Readme.html b/Readme.html deleted file mode 100644 index c3891ee..0000000 --- a/Readme.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - - Readme - - - -

GScripts

-

A set of scripts which I use in my current Gentoo system, all are -installed through portage and of course are tested to work on my system -and my system alone. Where possible I only use dependencies available in -the main Gentoo repo and each script has the dependencies listed.

-

All scripts are licensed under the MIT (Expat) License (for more -information on why I give two names for one license please see what the -GNU project has to say on the matter) I intentionally use the term -MIT license as that is the accepted SPDX license identifier.

-

Coming Eventually: A portage repo that contains my ebuilds -(where I am certain of the accuracy of the license data).

-

Where scripts have configuration all environment variables are -pseudo-namespaced by $GScripts_<OPTION>

-

The Scripts

-

WallChooser

-

A simple script that lets you pick a new wallpaper, it automatically -runs all the required steps to generate a new pywal theme -and set the wallpaper using swww

-

Requirements

- -

BarRunner

-

A tool to run waybar, Automatically restarting the bar -if any of the required config files are changed. NOTE: This tool is very -much designed around my system and will likely fail to operate properly -for you. It is designed with special handling for different compositors. -And compatibility with pywal

-

Arguments

- -

Requirements

- - - diff --git a/Readme.md b/Readme.md index 21ed50b..bb19e89 100644 --- a/Readme.md +++ b/Readme.md @@ -47,3 +47,25 @@ compatibility with `pywal` #### Requirements - `waybar` - `inotifywait` + +### blogv +A simple and naive script to read build log entries. +Really just a bunch of pipes in a shellscript file so it has a name. +Heavily depends on portage build logs being done in a specific way +```bash +## Portage logging +PORTAGE_ELOG_CLASSES="info warn error log qa" +PORTAGE_ELOG_SYSTEM="echo save" +PORTAGE_LOGDIR="/var/log/portage" +PORTAGE_LOG_FILTER_FILE_CMD="bash -c \"ansifilter; exec cat\"" +PORTAGE_LOGDIR_CLEAN="find "${PORTAGE_LOGDIR}" -type f ! -name "summary.log*" -mtime +30 -delete" +## Change some features +FEATURES="clean-logs \ +split-elog \ +split-log " +``` + +#### Requirements +- `fzf` +- `xargs` +- `bat` diff --git a/blogv b/blogv new file mode 100755 index 0000000..a7873fe --- /dev/null +++ b/blogv @@ -0,0 +1,20 @@ +#!/bin/bash +# +SPDX:MIT +# A dumb portage build log viewer +# Currently relies on logging being done in a specific way. +# all arguments are sent to bat + +## WE NEED SOME DEPENDENCIES +depcheck() { + if ! command -v "$1" &> /dev/null ; then + echo "Missing dependency $1" + exit 1 + fi +} +depcheck fzf +depcheck bat +depcheck xargs + +# in true unix style this is just a long pipe of pipes +# shellcheck disable=2068 +find /var/log/portage/build -type f -iname "*.log" | sed -e 's|/var/log/portage/build/||' -e 's/:.*//' | sort | uniq | fzf | xargs --no-run-if-empty --replace={} find /var/log/portage/build -iwholename "*{}*" | sort | xargs bat ${@}