From 4244793d7629e2745bc9c01d77bb11257b1a3320 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Mon, 15 Jul 2019 23:13:19 -0400 Subject: Add up -t --- bin/man1/up.1 | 17 +++++++++++++++-- bin/up.sh | 16 +++++++++++++++- 2 files changed, 30 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/man1/up.1 b/bin/man1/up.1 index 07f25e33..58b5359f 100644 --- a/bin/man1/up.1 +++ b/bin/man1/up.1 @@ -1,4 +1,4 @@ -.Dd July 9, 2019 +.Dd July 15, 2019 .Dt UP 1 .Os . @@ -8,9 +8,16 @@ . .Sh SYNOPSIS .Nm -.Op Fl chs +.Op Fl h .Op Ar file . +.Nm +.Fl c | t +.Ar command ... +. +.Nm +.Fl s +. .Sh DESCRIPTION .Nm uploads a file @@ -51,6 +58,12 @@ to produce a PNG file for upload. The file is optimized by .Xr pngo 1 if available. +.It Fl t +Run a command with +.Xr ptee 1 +and +.Xr shotty 1 +to produce an HTML file for upload. .El . .Pp diff --git a/bin/up.sh b/bin/up.sh index ef3ff6c7..a439c8f7 100644 --- a/bin/up.sh +++ b/bin/up.sh @@ -45,13 +45,27 @@ uploadScreen() { upload "${temp}/capture.png" } -args=$(setopt 'chs' "$@") +uploadTerminal() { + temp + cat > "${temp}/term.html" <<-EOF + + ${1} + + EOF + ptee "$@" | shotty -Bcs >> "${temp}/term.html" + upload "${temp}/term.html" +} + +args=$(setopt 'chst' "$@") eval set -- "$args" for opt; do case "$opt" in (-c) shift; fn=uploadCommand;; (-h) shift; fn=uploadHi;; (-s) shift; fn=uploadScreen;; + (-t) shift; fn=uploadTerminal;; (--) shift; break;; esac done -- cgit 1.4.1 on>
path: root/bin (unfollow)
Commit message (Expand)Author
2021-02-09Show minutes left instead of battery percentageJune McEnroe
2021-02-09Set antialiasing and unhinting globallyJune McEnroe
2021-02-09Open youtube and twitch with mpvJune McEnroe
2021-02-09Add volume control bindings to cwmJune McEnroe
2021-02-09Use w3m to open other URLsJune McEnroe
2021-02-09Disable mouse mode in xtermJune McEnroe
2021-02-09Add pbcopy, pbpaste, open dispatch scriptsJune McEnroe
2021-02-09Use flags for pbd client behaviourJune McEnroe
2021-02-08Add macOS-like copy and paste to xtermJune McEnroe
2021-02-08Only update clock script every minuteJune McEnroe
2021-02-08Use 4M- for window resizing in cwmJune McEnroe
2021-02-08Tweak trackpad scaling, mouse accelerationJune McEnroe
2021-02-08Use xsel in up and add it do install.shJune McEnroe
2021-02-07Swap root window coloursJune McEnroe
2021-02-07Add -X flag to install X stuff on OpenBSDJune McEnroe
2021-02-07Adjust brightness by smaller incrementsJune McEnroe
2021-02-07Fix cwm window cycling, move big by defaultJune McEnroe
2021-02-07Use class names for Foreground, Background, BorderColorJune McEnroe
2021-02-07Add simple battery status and clock to xsessionJune McEnroe
2021-02-07Set cursor theme and sizeJune McEnroe
2021-02-07Use scrot for up -s if no screencaptureJune McEnroe
2021-02-07Enable mouse acceleration in XJune McEnroe
2021-02-07Set colours for Xt and cwmJune McEnroe
2021-02-07Set urgency on bell in xtermJune McEnroe
2021-02-07Add bindings for brightness controlJune McEnroe
2021-02-07Set X key repeat rateJune McEnroe
2021-02-07Bump font size to 12June McEnroe
2021-02-07Fully configure and rebind cwmJune McEnroe
2021-02-07Add BintiJune McEnroe
2021-02-07Finish configuring xtermJune McEnroe
2021-02-06Enable tapping, reverse scroll, set scaling in wsconsctlJune McEnroe
2021-02-06Set root window to black on purple snowJune McEnroe
2021-02-06Add xmodmap configurationJune McEnroe
2021-02-06Add initial OpenBSD X configurationJune McEnroe
2021-02-06Add xterm output to schemeJune McEnroe