From 0d05ef1e12314985988e567ac22a179d0f646899 Mon Sep 17 00:00:00 2001 From: msglm Date: Sat, 14 Jan 2023 10:33:04 -0600 Subject: Inital Commit --- .local/bin/chineseproverb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 .local/bin/chineseproverb (limited to '.local/bin/chineseproverb') diff --git a/.local/bin/chineseproverb b/.local/bin/chineseproverb new file mode 100755 index 0000000..e6c8f8f --- /dev/null +++ b/.local/bin/chineseproverb @@ -0,0 +1,18 @@ +#!/bin/sh + +#Description: Takes in text input (or a random quote from the fortune command), translates it to chinese, translates it back to english, then displays what it made along with the original text. + +#Axioms: https://wiki.debian.org/fortune + +#Dependencies: https://github.com/argosopentech/argos-translate + + +if [ $# = 0 ] +then + china=$(fortune|argos-translate --from-lang en --to-lang zh) +else + china=$(echo "$1"|argos-translate --from-lang en --to-lang zh) +fi +echo "$china" +echo "" +echo "$china"|argos-translate --from-lang zh --to-lang en -- cgit v1.2.3