Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bashhub/bashhub_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def main():

print(ascii_art)
print("Welcome to bashhub setup!")
print(BH_URL)
is_new_user = query_yes_no("Are you a new user?")

# Initialize variaous Credentials for logging in.
Expand Down
17 changes: 9 additions & 8 deletions bashhub/view/status.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
import dateutil.parser
import datetime
import humanize
from ..bashhub_globals import BH_URL

status_view = """\
=== Bashhub Status
https://bashhub.com/{0}
Total Commands: {1}
Total Sessions: {2}
Total Systems: {3}
{0}/{1}
Total Commands: {2}
Total Sessions: {3}
Total Systems: {4}
===
Session PID {4} Started {5}
Commands In Session: {6}
Commands Today: {7}
Session PID {5} Started {6}
Commands In Session: {7}
Commands Today: {8}
"""

def build_status_view(model):
date = datetime.datetime.fromtimestamp(model.session_start_time / 1000.0)
date_str = humanize.naturaltime(date)
return status_view.format(
model.username, model.total_commands, model.total_sessions,
BH_URL, model.username, model.total_commands, model.total_sessions,
model.total_systems, model.session_name, date_str,
model.session_total_commands, model.total_commands_today)