aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2022-05-17 18:13:52 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2022-05-17 18:13:52 +0200
commitf018806b598f752c021be814de4ad641082a0ab9 (patch)
tree04ccfab7216849d732032d38f1b9ccd372fc96b1
parent58f547462ec79d2cbdf713351c086a2354e9f34b (diff)
downloadscripts-f018806b598f752c021be814de4ad641082a0ab9.tar.gz
scripts-f018806b598f752c021be814de4ad641082a0ab9.zip
Added gfmt
-rw-r--r--Makefile1
-rw-r--r--TODO2
-rwxr-xr-xgfmt9
3 files changed, 12 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 72d33bb..63a0a70 100644
--- a/Makefile
+++ b/Makefile
@@ -16,6 +16,7 @@ SCRIPTS = addressgrep \
16 dmenu-websearch \ 16 dmenu-websearch \
17 ffmpeg-screenrecord \ 17 ffmpeg-screenrecord \
18 ffmpeg-facecam \ 18 ffmpeg-facecam \
19 gfmt \
19 mail-compose \ 20 mail-compose \
20 notify-status \ 21 notify-status \
21 open-file \ 22 open-file \
diff --git a/TODO b/TODO
index e6e60d2..d9b64b4 100644
--- a/TODO
+++ b/TODO
@@ -1,3 +1,5 @@
1* gfmt: avoid double spacing within ```
2
1* sfeed-browser: optionally just write link to stdout (or to xsel -i) 3* sfeed-browser: optionally just write link to stdout (or to xsel -i)
2 4
3* Refactor: review all scripts and adapt to common style 5* Refactor: review all scripts and adapt to common style
diff --git a/gfmt b/gfmt
new file mode 100755
index 0000000..d38351f
--- /dev/null
+++ b/gfmt
@@ -0,0 +1,9 @@
1#!/bin/sh
2
3# Format text from gemtext format to short lines with double \n
4
5# TODO: remove double spacing from within ```
6
7sed 's/ //' | \
8sed 'a\\' | \
9fold -sw 80

Generated with cgit - Back to sebastiano.tronto.net