Skip to content

Commit

Permalink
updated the CLI to include three new boolean flags
Browse files Browse the repository at this point in the history
  • Loading branch information
hitblast committed Aug 3, 2024
1 parent 6df2415 commit ef75504
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/nimip.nim
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,18 @@ proc run*(): Future[void] {.async.} =
tb.write(4, 5, "Timezone : ", ip.timezone, fmt" | Offset: {ip.offset}")
tb.write(4, 6, "Location : ", addressStr)

tb.drawVertLine(0, 17, 1, doubleStyle = true)
tb.drawVertLine(0, 21, 1, doubleStyle = true)
tb.write(4, 9, "Provider : ", ip.isp)
tb.write(18, 10, fmt"[{ip.orgAs}]")
tb.write(4, 12, "Zip Code : ", ip.zip)

tb.drawHorizLine(1, primaryLength - 2, 13)

tb.write(4, 15, "Latitude : ", fgCyan, fmt"{ip.latitude}", fgWhite)
tb.write(4, 16, "Longitude : ", fgCyan, fmt"{ip.longitude}", fgWhite)

tb.drawHorizLine(1, primaryLength - 2, 17)
tb.write(primaryLength, 13, fgGreen, fmt"{ip.remainingRequests}", fgWhite, " remaining requests")
tb.write(primaryLength, 17, fgGreen, fmt"{ip.timeUntilReset}s", fgWhite, " until limit reset")

tb.write(4, 18, "Mobile : ", if ip.mobile: fgGreen else: fgRed, fmt"{ip.mobile}", fgWhite)
tb.write(4, 19, "Proxy : ", if ip.proxy: fgGreen else: fgRed, fmt"{ip.proxy}", fgWhite)
tb.write(4, 20, "Hosting : ", if ip.hosting: fgGreen else: fgRed, fmt"{ip.hosting}", fgWhite)
tb.drawHorizLine(1, primaryLength - 2, 21)

# Finally, display the entire thing.
# This also includes checking for keypress events in order for the user to quit the interface.
Expand Down

0 comments on commit ef75504

Please sign in to comment.