totptool/cmds/ls.nim

15 lines
267 B
Nim
Raw Normal View History

2015-09-15 02:22:11 +00:00
import algorithm
import os
import strutils
2016-02-05 01:39:13 +00:00
const lsUsage* =
2015-09-15 02:22:11 +00:00
"""Usage: totptool ls
Shows all of the totp codes available.
"""
proc ls*(root: string, args: seq[string]) =
for file in walkFiles root / "*":
var name = file.split("/")
echo name.reversed[0]