File tree 1 file changed +30
-0
lines changed
commands/communication/emojis
1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # Dependency: This script requires `jq` cli installed: https://stedolan.github.io/jq/
4
+ # Install via homebrew: `brew install jq`
5
+
6
+ # Required parameters:
7
+ # @raycast.schemaVersion 1
8
+ # @raycast.title Random Emoji
9
+ # @raycast.mode silent
10
+ # @raycast.packageName Emojis
11
+
12
+ # Optional parameters:
13
+ # @raycast.icon 🎲
14
+
15
+ # Documentation:
16
+ # @raycast.description Copy a random emoji to the clipboard.
17
+ # @raycast.author Tomohiro Nishimura
18
+ # @raycast.authorURL https://github.com/Sixeight
19
+
20
+ LANG=" en_US.UTF-8"
21
+
22
+ if ! command -v jq & > /dev/null; then
23
+ echo " jq command is required (https://github.com/jqlang/jq)." ;
24
+ exit 1;
25
+ fi
26
+
27
+ mapfile -t EMOJIS < <( curl -s https://raw.githubusercontent.com/github/gemoji/master/db/emoji.json | jq -r ' .[] | .emoji' )
28
+ EMOJI=" ${EMOJIS[$RANDOM % ${#EMOJIS[@]} ]}"
29
+ echo -n " $EMOJI " | pbcopy
30
+ echo " $EMOJI "
You can’t perform that action at this time.
0 commit comments