wmtools/emoji.nim
2022-05-10 20:47:15 +01:00

20 lines
430 B
Nim

import base
import lib/emojilist
import std/[re,osproc,algorithm]
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()