20 lines
407 B
Nim
20 lines
407 B
Nim
|
import base
|
||
|
import lib/codemap
|
||
|
import std/[re,osproc,algorithm]
|
||
|
|
||
|
proc main() =
|
||
|
var info = newInfo("Emoji Picker")
|
||
|
var args = emojiCodemap
|
||
|
args.add("exit")
|
||
|
let output = outputData(info,args)
|
||
|
if output == "exit" or output == "":
|
||
|
return
|
||
|
else:
|
||
|
let e = re.findAll(output,re(".+ :"))
|
||
|
let emoji = re.replace(e[0], re(" :"),"")
|
||
|
copyToClipboard(emoji)
|
||
|
return
|
||
|
|
||
|
if isMainModule:
|
||
|
main()
|