about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBrian Chu <brianmchu42@gmail.com>2021-02-21 00:11:56 -0800
committerBrian Chu <brianmchu42@gmail.com>2021-02-21 00:11:56 -0800
commit49ca9728b7d0d5ba4eb31d9ef3fbfaed3f66a7ea (patch)
tree63c03bfb0973965d5f39511504652a6bdda95c38
downloadsarcasticizer-49ca9728b7d0d5ba4eb31d9ef3fbfaed3f66a7ea.tar.gz
initial commit:
- implement basic functionality in Racket
- implement shell wrapper
-rwxr-xr-xmain.rkt12
-rwxr-xr-xsarcasticizer8
2 files changed, 20 insertions, 0 deletions
diff --git a/main.rkt b/main.rkt
new file mode 100755
index 0000000..90e0daa
--- /dev/null
+++ b/main.rkt
@@ -0,0 +1,12 @@
+#!/usr/bin/env racket
+#lang racket/base
+
+(require racket/string)
+
+(define line (list->vector (string->list (string-downcase (read-line)))))
+
+(for ([i (vector-length line)])
+  (let [(chance (>= 5 (random 10)))]
+    (cond [chance (vector-set! line i (char-upcase (vector-ref line i)))])))
+
+(displayln (list->string (vector->list line)))
diff --git a/sarcasticizer b/sarcasticizer
new file mode 100755
index 0000000..eff6823
--- /dev/null
+++ b/sarcasticizer
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+echo "This is the sarcasticizer! It makes text lOoK LIkE thIs!"
+echo "What are you trying to mock today?"
+read input
+echo $input | ./main.rkt | xclip
+
+echo "Your sarcasm is now copied and ready to go! Middle click where you want to paste to get your snark on!"