summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdot/local/bin/marginate12
-rwxr-xr-xdot/local/bin/webencode14
-rwxr-xr-xdot/local/bin/xq17
3 files changed, 43 insertions, 0 deletions
diff --git a/dot/local/bin/marginate b/dot/local/bin/marginate
new file mode 100755
index 0000000..9c075c8
--- /dev/null
+++ b/dot/local/bin/marginate
@@ -0,0 +1,12 @@
1#!/bin/sh
2
3options='-gravity center -extent 140%x140%'
4
5for input
6do
7 case "$input" in
8 *.*) output=${input%.*}.margins.${input##*.} ;;
9 *) output=$input.margins.png ;;
10 esac
11 convert "$input" $options "$output"
12done
diff --git a/dot/local/bin/webencode b/dot/local/bin/webencode
new file mode 100755
index 0000000..ede6b72
--- /dev/null
+++ b/dot/local/bin/webencode
@@ -0,0 +1,14 @@
1#!/bin/sh
2
3case $# in
4 2) INPUT=$1
5 OUTPUT=$2
6 ;;
7 1) INPUT=$1
8 OUTPUT=${1%.*}.web.mp4
9 ;;
10 *) exit 1
11 ;;
12esac
13
14ffmpeg -hide_banner -i "$INPUT" -c:a aac -c:v libx264 "$OUTPUT"
diff --git a/dot/local/bin/xq b/dot/local/bin/xq
new file mode 100755
index 0000000..e5077c3
--- /dev/null
+++ b/dot/local/bin/xq
@@ -0,0 +1,17 @@
1#!/bin/sh
2
3xq()
4{
5 f=$(mktemp) || return
6 trap 'rm -f "$f"' EXIT
7 question=$1
8 default=$2
9 w_height=8
10 w_width=50
11 export f question w_height w_width default
12 xterm -e 'whiptail --inputbox "$question" "$w_height" "$w_width" "$default" 2>"$f"' || return
13 read line < "$f"
14 printf '%s\n' "$line"
15}
16
17xq "$1" "$2"