Skip to content

Commit

Permalink
[merge] from unstable into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
OneCDOnly committed Aug 10, 2024
2 parents b781a5a + 6704df7 commit 09581cf
Show file tree
Hide file tree
Showing 8 changed files with 572 additions and 597 deletions.
Binary file modified objects.tar.gz
Binary file not shown.
Binary file modified sherpa-manager.tar.gz
Binary file not shown.
1,060 changes: 471 additions & 589 deletions support/sherpa-manager.source

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions workshop/colorcolumn
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/awk -f
#
# colorcolumn - Like `column`, but works with ANSI colors
#
# Based on this Stack Exchange answer by Stephane Chazelas:
# https://unix.stackexchange.com/a/121139/259233

# Example usage:
# echo -e '\e[32mHello there\e[0m (\e[33mfailed\e[0m)|World\nFoo|Bar\na much longer line of text to show|and the description' | colorcolumn FS='|' OFS=''

{
nf[NR]=NF
for (i = 1; i <= NF; i++) {
cell[NR,i] = $i
gsub(/\033\[[0-9;]*[mK]/, "", $i)
len[NR,i] = l = length($i)
if (l > max[i]) max[i] = l
}
}
END {
for (row = 1; row <= NR; row++) {
for (col = 1; col < nf[row]; col++)
printf "%s%*s%s", cell[row,col], max[col]-len[row,col], "", OFS
print cell[row,nf[row]]
}
}
10 changes: 4 additions & 6 deletions workshop/ideas.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
* Autowidth report columns?
- Maybe this? https://unix.stackexchange.com/a/448471
- requires GNU awk from Entware for compatibility.

* When building status report, check if OOM killer has been active.
- Check killed pids against inactive daemons and report as-such.

Expand All @@ -11,8 +15,6 @@
* Only install IPKs for QPKGs that download successfully (or are already downloaded).
- ... and the installed ones, as-happens now.

* If service-script is unable to update repo/download release file, and there isn't already an installation, then abort immediately.

* Default dependency report should only show installed QPKGs.
- ... but should allow 'sherpa d all' to see all QPKGs.
- Do the same for repository report.
Expand Down Expand Up @@ -59,8 +61,6 @@
- if it's a group, and an action has already been set, process action and group.
- if it's a group, and no action was set, then assign a default action, process action and group, then iterate.

* 'debug' and 'verbose' modes should be persistent when set as groups.

* Add "about" user arg to display current environment.

* BASH completion.
Expand Down Expand Up @@ -125,7 +125,5 @@
* Wrap description column text in packages report?
- Use 'GNU column' for this? Nope, 'column' can't wrap text containing ANSI codes. Won't show a wrapped column in colour. :(

* Autowidth report columns?

* Include new integrated help screens for all actions?
- Like: `sherpa paste help`, `sherpa install help`, `sherpa reassign help`
2 changes: 0 additions & 2 deletions workshop/issues.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ Observed issues:

-------------------------------------------------------------------------------------------------------------------------

* If installed QPKGs are disabled, then upgraded, upgrade result is "failed".

* 'sherpa enable-auto-update active' is not running 'enable-auto-update' action.

* Near the end of installing IPKs, monitored download path can remain at non-zero size while packages complete installation.
Expand Down
38 changes: 38 additions & 0 deletions workshop/report.ansi
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
QPKG name:|QPKG statuses:|QPKG action (result):|QPKG version:|Application version:
Bazarr|- enabled, active| start (OK)| 240809| dynamic
ClamAV|- enabled, active| start (OK)| 240809| 0.104.4
duf| enabled, active| start (OK)| 240731| 0.8.1
Entware| enabled, active| unsupported| 1.03a| 1.03a
Glances| enabled, active| start (OK)| 240809| dynamic
Headphones| enabled, active| start (failed)| 240809| dynamic
HideThatBanner| enabled, active| start (OK)| 240807| 240807
IncreaseTimeouts| enabled, active| start (OK)| 240808| 240808
inxi| enabled, active| unsupported| 240417| 3.3.34
Kapowarr| enabled, active| start (OK)| 240809| dynamic
LazyLibrarian| enabled, active| start (OK)| 240809| dynamic
OLidarr| enabled, active| start (OK)| 240809| dynamic
OMedusa| enabled, active| start (OK)| 240809| dynamic
Mylar3| enabled, active| start (OK)| 240809| dynamic
nzbget| enabled, active| unsupported| 24.2| 24.2
NZBHydra2| enabled, active| start (OK)| 240809| dynamic
nzbToMedia| enabled, active| unsupported| 240205| dynamic
OliveTin| enabled, active| start (OK)| 240809| dynamic
Par2turbo| enabled, active| unsupported| 1.1.0| 1.1.0
pyLoad| enabled, active| start (OK)| 240809| dynamic
OqBittorrent| enabled, active| start (OK)| 240809| 4.6.3
QDK| enabled, active| unsupported| 2.3.13| 2.3.13
OReadarr| enabled, active| start (OK)| 240809| dynamic
RunLast| enabled, active| start (OK)| 240731| 240731
SABnzbd| enabled, active| start (OK)| 240809| dynamic
sha3sum| enabled, active| start (OK)| 240808| 1.23.1
sherpa| enabled, active| start (OK)| 240809| 240809
OSickGear| enabled, active| start (OK)| 240809| dynamic
OSonarr| enabled, active| start (OK)| 240809| dynamic
SortMyQPKGs| enabled, active| start (OK)| 240801| 240801
OTautulli| enabled, active| start (OK)| 240809| dynamic
OTransmission| enabled, active| start (OK)| 240809| 4.0.4
Unmanic| enabled, active| start (OK)| 240809| dynamic
Unrar| enabled, active| unsupported| 7.0.8| 7.01 beta 1
OWatcher3| enabled, active| start (OK)| 240809| final
WebSSH| enabled, active| start (OK)| 240809| dynamic
OWhisparr| enabled, active| start (OK)| 240809| dynamic
33 changes: 33 additions & 0 deletions workshop/table.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash

readonly REPORT_OUTPUT_PATHFILE=report.ansi

Tabilise()
{

# Generate an ANSI-aware table with auto-width columns.

# With many thanks to Stephane Chazelas for writing this:
# https://unix.stackexchange.com/a/121139/259233

awk '{
nf[NR]=NF
for (i = 1; i <= NF; i++) {
cell[NR,i] = $i
gsub(/\033\[[0-9;]*[mK]/, "", $i)
len[NR,i] = l = length($i)
if (l > max[i]) max[i] = l
}
}
END {
for (row = 1; row <= NR; row++) {
for (col = 1; col < nf[row]; col++)
printf "%s%*s%s", cell[row,col], max[col]-len[row,col], "", OFS
print cell[row,nf[row]]
}
}' FS='|' OFS=' '

}

Tabilise < "$REPORT_OUTPUT_PATHFILE"

0 comments on commit 09581cf

Please sign in to comment.