Newline for more clarity. Index in 3rd brackets.

This commit is contained in:
Arun Prakash Jana 2016-04-23 03:01:38 +05:30
parent 5358a230aa
commit 0d08254cf1
No known key found for this signature in database
GPG Key ID: C0A712ED95043DCB

6
buku
View File

@ -520,13 +520,11 @@ def searchdb(cur, keywords):
for row in resultset:
results.append(row[1])
count += 1
print("\x1B[1m\x1B[93m%d. \x1B[0m\x1B[92m%s\x1B[0m (%d)\n\t%s\n\t\x1B[91m[TAGS]\x1B[0m %s" % (count, row[1], row[0], row[2], row[3][1:-1]))
print("\x1B[1m\x1B[93m%d. \x1B[0m\x1B[92m%s\x1B[0m [%d]\n\t%s\n\t\x1B[91m[TAGS]\x1B[0m %s\n" % (count, row[1], row[0], row[2], row[3][1:-1]))
if count == 0:
return
print("")
while True:
try:
nav = input("Result number to open: ")
@ -629,7 +627,7 @@ def printdb(cur, index, empty=False):
if jsonOutput == False:
if showOpt == 0:
for row in resultset:
print("\x1B[1m\x1B[93m%s. \x1B[0m\x1B[92m%s\x1B[0m\n\t%s\n\t\x1B[91m[TAGS]\x1B[0m %s" % (row[0], row[1], row[2], row[3][1:-1]))
print("\x1B[1m\x1B[93m%s. \x1B[0m\x1B[92m%s\x1B[0m\n\t%s\n\t\x1B[91m[TAGS]\x1B[0m %s\n" % (row[0], row[1], row[2], row[3][1:-1]))
elif showOpt == 1:
for row in resultset:
print("%s %s" % (row[0], row[1]))