From 20f4ba32d02b0960ca434ba21b2d8a8e234678bc Mon Sep 17 00:00:00 2001 From: Alexander Vasarab Date: Fri, 19 Jun 2020 20:18:56 -0700 Subject: [PATCH 1/1] Touch-up header and fix an alignment issue --- munter.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/munter.py b/munter.py index 1e3ad66..fd5e485 100755 --- a/munter.py +++ b/munter.py @@ -2,9 +2,15 @@ # -*- coding: utf-8 -*- -# Munter Time Calculation -# -# Rudimentary program written by ALV to implement the Munter time calculation +""" +Munter Time Calculation +Alexander Vasarab +Wylark Mountaineering LLC + +Version 1.0.2 + +A rudimentary program which implements the Munter time calculation. +""" import sys import argparse @@ -78,10 +84,13 @@ def main(): hours = int(time_calc['time']) minutes = int((time_calc['time'] - hours) * 60) + # NOTE: Below, the line with the unicode up arrow uses an alignment + # value of 31. In the future, consider using e.g. wcwidth + # library so that this is more elegant. print("\n\t╒═══════════════════════════════╕") print("\t╎▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒╎╮") print("\t╎▒{:^29}▒╎│".format('')) - print("\t╎▒{pace_readable:^29}▒╎│".format( + print("\t╎▒{pace_readable:^31}▒╎│".format( pace_readable="{units} {direction} @ {pace}".format( units=round(time_calc['unit_count']), direction=time_calc['direction'], -- 2.30.2