summaryrefslogtreecommitdiff
path: root/qkbox
diff options
context:
space:
mode:
authorMasaya Tojo <masaya@tojo.tokyo>2020-07-08 05:28:15 +0900
committerMasaya Tojo <masaya@tojo.tokyo>2020-07-08 05:30:13 +0900
commit96bae65ab624a8e67636a4def6ae0382fa5841dc (patch)
tree245d7ec558b658aabe30dc12d223d88d9a7807b5 /qkbox
parent5a4c8f98774e3d19562a508a2f71a60d8fbb2a2d (diff)
Add (qkbox toot) module.
Diffstat (limited to 'qkbox')
-rw-r--r--qkbox/toot.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/qkbox/toot.scm b/qkbox/toot.scm
new file mode 100644
index 0000000..94de0ad
--- /dev/null
+++ b/qkbox/toot.scm
@@ -0,0 +1,15 @@
+(define-module (qkbox toot)
+ #:use-module (ice-9 format)
+ #:export (post))
+
+(define* (post x #:key spoiler-text)
+ (apply system*
+ "toot"
+ "post"
+ (cond
+ ((string? x) x)
+ (else
+ (format #f "~y" x)))
+ `(,@(if spoiler-text
+ `("-p" ,spoiler-text)
+ '()))))