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

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

parent 3c5c3aef
......@@ -236,29 +236,57 @@ class GivecoinPrinter:
# split the private key into four parts and print them row for row
def print_to_banknote_and_eject(self, privkey):
if self.args.bold:
prespace = r" "
prefix = r"\\x1b\\x45"
postfix = r"\\x1b\\x46"
elif self.args.condensed:
prespace = r" "
prefix = r"\\x1b\\x0f"
postfix = r"\\x12"
else:
prespace = r" "
prefix = r""
postfix = r""
if type < 10:
if self.args.bold:
prespace = r" " # 4 spaces
prefix = r"\\x1b\\x45"
postfix = r"\\x1b\\x46"
elif self.args.condensed:
prespace = r" " # 8 spaces
prefix = r"\\x1b\\x0f"
postfix = r"\\x12"
else:
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 self.args.condensed:
pk[0] = prefix + prespace + privkey[:18]
pk[1] = prespace + privkey[18:36]
pk[2] = prespace + " " + privkey[36:] + postfix
if type < 10:
if self.args.condensed:
pk[0] = prefix + prespace + privkey[:18]
pk[1] = prespace + privkey[18:36]
pk[2] = prespace + " " + privkey[36:] + postfix
else:
pk[0] = prefix + prespace + privkey[:13]
pk[1] = prespace + privkey[13:26]
pk[2] = prespace + privkey[26:39]
pk[3] = prespace + privkey[39:] + postfix
else:
pk[0] = prefix + prespace + privkey[:13]
pk[1] = prespace + privkey[13:26]
pk[2] = prespace + privkey[26:39]
pk[3] = prespace + privkey[39:] + postfix
# 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])
......
Supports Markdown
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