eve-bookmark-convert/eve-scanning.py

74 lines
1.5 KiB
Python
Raw Normal View History

2024-01-10 12:33:23 -05:00
import datetime
import pyperclip
def instructions():
print('''
1. == To home wormhole
2. == Wormhole away from home
3. == Combat Site Data or Relic site.
4. == Anons of interest
L == Low Sec
H == High Sec
N == Null Sec
J == Jspace (wormholes)
''')
today = datetime.date.today()
print("\t", today.strftime('%d-%b-%y'))
print()
contents = []
line = ' '
splitContents = []
#grab input
while True:
try:
line = input()
if line == '':
break
else:
contents.append(line)
except EOFError:
break
#Split the lines by tab
for line in contents:
splitContents.append(line.split('\t'))
#put system name to frot of list
for line in range(len(splitContents)):
try:
splitContents[line].insert(0, splitContents[line].pop(3))
except:
break
#Alphabetize
splitContents.sort()
#print out
2024-01-10 12:51:35 -05:00
prettyPrint = ""
2024-01-10 12:33:23 -05:00
print ("```")
2024-01-10 12:51:35 -05:00
prettyPrint += "```\n"
2024-01-10 12:33:23 -05:00
instructions()
2024-01-10 12:51:35 -05:00
prettyPrint += instructions()
2024-01-10 12:33:23 -05:00
last = "nullnope"
for line in range(len(splitContents)):
try:
if last != splitContents[line][0]:
print(splitContents[line][0])
2024-01-10 12:51:35 -05:00
prettyPrint += str(splitContents[line][0])
prettyPrint += "\n"
2024-01-10 12:33:23 -05:00
last = splitContents[line][0]
2024-01-10 12:51:35 -05:00
print("\t", splitContents[line][1])
prettyPrint += "\t"
prettyPrint += str(splitContents[line][1])
prettyPrint += "\n"
2024-01-10 12:33:23 -05:00
except:
break
print ("```")
2024-01-10 12:51:35 -05:00
prettyPrint += ("```")
#pyperclip.copy(prettyPrint.join(" "))
print(prettyPrint)