21 lines
419 B
Nim
21 lines
419 B
Nim
|
import ../../base
|
||
|
import lib/emojilist
|
||
|
import std/[re]
|
||
|
|
||
|
proc main() =
|
||
|
var info = newInfo("Emoji Picker")
|
||
|
var args = getEmoji()
|
||
|
args.add("exit")
|
||
|
let output = outputData(info,args)
|
||
|
if output == "exit" or output == "":
|
||
|
return
|
||
|
else:
|
||
|
let e = re.findAll(output,re(".+ :"))
|
||
|
if len(e) > 0:
|
||
|
let emoji = re.replace(e[0], re(" :"),"")
|
||
|
copyToClipboard(emoji)
|
||
|
return
|
||
|
|
||
|
if isMainModule:
|
||
|
main()
|