From 96bae65ab624a8e67636a4def6ae0382fa5841dc Mon Sep 17 00:00:00 2001 From: Masaya Tojo Date: Wed, 8 Jul 2020 05:28:15 +0900 Subject: Add (qkbox toot) module. --- Makefile.am | 3 ++- qkbox/toot.scm | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 qkbox/toot.scm diff --git a/Makefile.am b/Makefile.am index c6455f4..3bffc0f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -41,7 +41,8 @@ godir=$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/site-ccache bin_SCRIPTS = -SOURCES = +SOURCES = \ + qkbox/toot.scm TESTS = 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) + '())))) -- cgit v1.2.3