wmtools/emoji.nim

21 lines
430 B
Nim
Raw Normal View History

2022-05-09 22:08:54 +02:00
import base
2022-05-10 21:47:15 +02:00
import lib/emojilist
2022-05-09 22:08:54 +02:00
import std/[re,osproc,algorithm]
proc main() =
var info = newInfo("Emoji Picker")
2022-05-10 21:47:15 +02:00
var args = getEmoji()
2022-05-09 22:08:54 +02:00
args.add("exit")
let output = outputData(info,args)
if output == "exit" or output == "":
return
else:
let e = re.findAll(output,re(".+ :"))
2022-05-10 21:47:15 +02:00
if len(e) > 0:
let emoji = re.replace(e[0], re(" :"),"")
copyToClipboard(emoji)
2022-05-09 22:08:54 +02:00
return
if isMainModule:
main()