Merge pull request #55 from kerel-fs/pr/update_tle_status_messages

update_tle: Add status messages on stdout
pull/56/head
Cees Bassa 2019-12-07 14:27:29 +01:00 committed by GitHub
commit f0578de10c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -34,7 +34,7 @@ if __name__ == '__main__':
now = datetime.datetime.utcnow()
time = now.strftime("%Y%m%d_%H%M%S")
# Get Space Track TLEs
print('Get Space Track TLEs')
catalog_tle = os.path.join(tle_path, 'catalog.tle')
st = SpaceTrackClient(identity=cfg.get('Credentials', 'st-username'),
password=cfg.get('Credentials', 'st-password'))
@ -57,7 +57,7 @@ if __name__ == '__main__':
copyfile(catalog_tle, os.path.join(tle_path, time + '_catalog.txt'))
# Get classified TLEs
print('Get classified TLEs')
resp = urlopen("http://www.prismnet.com/~mmccants/tles/classfd.zip")
zipfile = ZipFile(BytesIO(resp.read()))
zipfile.extractall(path=tle_path)
@ -74,7 +74,7 @@ if __name__ == '__main__':
copyfile(classfd_tle, os.path.join(tle_path, time + '_classfd.txt'))
# Get int TLEs
print('Get int TLEs')
resp = urlopen("http://www.prismnet.com/~mmccants/tles/inttles.zip")
zipfile = ZipFile(BytesIO(resp.read()))
zipfile.extractall(path=tle_path)
@ -91,7 +91,7 @@ if __name__ == '__main__':
copyfile(int_tle, os.path.join(tle_path, time + '_inttles.txt'))
# Create bulk catalog
print('Create bulk catalog')
catalogs = [catalog_tle, classfd_tle]
with open(os.path.join(tle_path, 'bulk.tle'), 'w') as outfile:
for fname in catalogs: