Compare commits
7 commits
release/0.
...
master
Author | SHA1 | Date | |
---|---|---|---|
bf31991875 | |||
700df6e98f | |||
fbfaeac64f | |||
a7a44a34b2 | |||
baf0a69396 | |||
bf592168c1 | |||
ebfa86e163 |
5 changed files with 41 additions and 12 deletions
24
CHANGELOG.md
24
CHANGELOG.md
|
@ -1,4 +1,20 @@
|
||||||
# 0.5 (2020-07-18)
|
# 0.7 (2021-01-28)
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
* spansh.py: Fleet carriers are now explicitly excluded from the outdated
|
||||||
|
stations list.
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
* explorationtools.py: Searching for a CMDR with public profile, but hidden
|
||||||
|
activity will no longer error out.
|
||||||
|
* explorationtools.py: Searching for a CMDR with public profile, but hidden
|
||||||
|
flight log will no longer error out.
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
# 0.6 (2020-07-18)
|
||||||
|
|
||||||
## Added
|
## Added
|
||||||
|
|
||||||
|
@ -10,6 +26,8 @@
|
||||||
* `spansh.py` old station search now outputs an age in days for the last update
|
* `spansh.py` old station search now outputs an age in days for the last update
|
||||||
instead of a time stamp.
|
instead of a time stamp.
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
# 0.5 (2020-07-01)
|
# 0.5 (2020-07-01)
|
||||||
|
|
||||||
Changed Changelog format. Should be even clearer now at a glance!
|
Changed Changelog format. Should be even clearer now at a glance!
|
||||||
|
@ -22,10 +40,14 @@ See [KeepAChangelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
implemented thing is getting approximate coordinates for a given procedually
|
implemented thing is getting approximate coordinates for a given procedually
|
||||||
generated system name.
|
generated system name.
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
# 0.4.1 (2020-06-18)
|
# 0.4.1 (2020-06-18)
|
||||||
|
|
||||||
* removed accidentally left over debug print code from `spansh.py`
|
* removed accidentally left over debug print code from `spansh.py`
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
# 0.4 (2020-03-09)
|
# 0.4 (2020-03-09)
|
||||||
|
|
||||||
Kind of a big one. Obviously because in addition to EDSM, I can now do some
|
Kind of a big one. Obviously because in addition to EDSM, I can now do some
|
||||||
|
|
|
@ -78,9 +78,6 @@ def outputText():
|
||||||
except SystemNotFoundError as e:
|
except SystemNotFoundError as e:
|
||||||
print(e)
|
print(e)
|
||||||
sys.exit(2)
|
sys.exit(2)
|
||||||
except EdsmApiException as e:
|
|
||||||
print(e)
|
|
||||||
sys.exit(1)
|
|
||||||
nearestCmdr = min(distances,key=distances.get)
|
nearestCmdr = min(distances,key=distances.get)
|
||||||
if shortOutput:
|
if shortOutput:
|
||||||
print('nearest commander: {} ({} ly).'.format(nearestCmdr.name,
|
print('nearest commander: {} ({} ly).'.format(nearestCmdr.name,
|
||||||
|
|
|
@ -22,16 +22,22 @@ def distanceBetween(system1, system2, roundTo=2):
|
||||||
|
|
||||||
def getCommanderPosition(name, apikey):
|
def getCommanderPosition(name, apikey):
|
||||||
coords = Commander(name, apikey).currentPosition
|
coords = Commander(name, apikey).currentPosition
|
||||||
|
ret = "hidden"
|
||||||
|
if coords:
|
||||||
ret = ""
|
ret = ""
|
||||||
for k in coords:
|
for k in coords:
|
||||||
ret += "{}: {}, ".format(k, coords[k])
|
ret += "{}: {}, ".format(k, coords[k])
|
||||||
return ret[:-2]
|
ret = ret[:-2]
|
||||||
|
return ret
|
||||||
|
|
||||||
def getCommanderProfileUrl(name, apikey):
|
def getCommanderProfileUrl(name, apikey):
|
||||||
return Commander(name, apikey).profileUrl
|
return Commander(name, apikey).profileUrl
|
||||||
|
|
||||||
def getCommanderSystem(name, apikey):
|
def getCommanderSystem(name, apikey):
|
||||||
cmdr = Commander(name, apikey)
|
cmdr = Commander(name, apikey)
|
||||||
|
if cmdr.lastActivity is None:
|
||||||
|
return "{}".format(cmdr.currentSystem)
|
||||||
|
else:
|
||||||
return "{} (last seen {})".format(cmdr.currentSystem,
|
return "{} (last seen {})".format(cmdr.currentSystem,
|
||||||
when(cmdr.lastActivity))
|
when(cmdr.lastActivity))
|
||||||
def when(date):
|
def when(date):
|
||||||
|
|
2
pyEDSM
2
pyEDSM
|
@ -1 +1 @@
|
||||||
Subproject commit 36a660f240c7e57cf524fe9640d13e56c7e42e79
|
Subproject commit da044e918fe17cf18d2b2e18d60ce16a168ea70b
|
|
@ -80,7 +80,11 @@ def getOldStationsInSystem(system):
|
||||||
json = querystations(APIURLS["stations"], params)
|
json = querystations(APIURLS["stations"], params)
|
||||||
|
|
||||||
ret = ""
|
ret = ""
|
||||||
for station in json["results"]:
|
# exclude carriers
|
||||||
|
stations = list(filter(lambda station: not station["type"] == "Drake-Class Carrier", json["results"]))
|
||||||
|
if len(stations) == 0:
|
||||||
|
raise NotFoundError()
|
||||||
|
for station in stations:
|
||||||
# systems including the given name as a word will also trigger;
|
# systems including the given name as a word will also trigger;
|
||||||
# looking for e.g. “Mari” will also give you stuff in “Mac Mari”!
|
# looking for e.g. “Mari” will also give you stuff in “Mac Mari”!
|
||||||
if station["system_name"] == system:
|
if station["system_name"] == system:
|
||||||
|
|
Loading…
Reference in a new issue