Commit 44cdfcc2 authored by Gottfried Gaisbauer's avatar Gottfried Gaisbauer

added one newline in the beginning for banknotes greater and equal than 10

parent 3c5c3aef
......@@ -236,20 +236,35 @@ class GivecoinPrinter:
# split the private key into four parts and print them row for row
def print_to_banknote_and_eject(self, privkey):
if type < 10:
if self.args.bold:
prespace = r" "
prespace = r" " # 4 spaces
prefix = r"\\x1b\\x45"
postfix = r"\\x1b\\x46"
elif self.args.condensed:
prespace = r" "
prespace = r" " # 8 spaces
prefix = r"\\x1b\\x0f"
postfix = r"\\x12"
else:
prespace = r" "
prespace = r" " # 4 spaces
prefix = r""
postfix = r""
elif type >= 10:
if self.args.bold:
prespace = r" " # 6 spaces
prefix = r"\\x1b\\x45"
postfix = r"\\x1b\\x46"
elif self.args.condensed:
prespace = r" " # 10 spaces
prefix = r"\\x1b\\x0f"
postfix = r"\\x12"
else:
prespace = r" " # 6 spaces
prefix = r""
postfix = r""
pk = dict()
if type < 10:
if self.args.condensed:
pk[0] = prefix + prespace + privkey[:18]
pk[1] = prespace + privkey[18:36]
......@@ -259,6 +274,19 @@ class GivecoinPrinter:
pk[1] = prespace + privkey[13:26]
pk[2] = prespace + privkey[26:39]
pk[3] = prespace + privkey[39:] + postfix
else:
# add one new line in the beginning
if self.args.condensed:
pk[0] = prefix + "\r"
pk[1] = prespace + privkey[:18]
pk[2] = prespace + privkey[18:36]
pk[3] = prespace + " " + privkey[36:] + postfix
else:
pk[0] = prefix + "\r"
pk[0] = prespace + privkey[:13]
pk[1] = prespace + privkey[13:26]
pk[2] = prespace + privkey[26:39]
pk[3] = prespace + privkey[39:] + postfix
print("pk[0]:" + pk[0])
print("pk[1]:" + pk[1])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment