Skip to content

Commit ce41911

Browse files
committed
Last Sync: 2025-06-27 12:22 (Mobile)
1 parent b7f045c commit ce41911

File tree

7 files changed

+12
-3
lines changed

7 files changed

+12
-3
lines changed

main.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1+
import sys
2+
from mods.get_keps import get_keps
13
from mods.gui import start_gui
24

35
if __name__ == "__main__":
4-
start_gui()
6+
if len(sys.argv) > 1:
7+
if sys.argv[1] == '--force-dl':
8+
f_p = get_keps('amateur', 'csv', force_dl=True)
9+
print(f"File downloaded to: {f_p}")
10+
else: print("Not an option.")
11+
else:
12+
start_gui()
1.53 KB
Binary file not shown.
4.1 KB
Binary file not shown.

mods/__pycache__/gui.cpython-313.pyc

7.5 KB
Binary file not shown.
1.34 KB
Binary file not shown.

mods/get_keps.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def get_keps(sat_group:str, file_format:str, force_dl=False, max_days=7.0):
77
"""get_keps(sat_group: str -> Satellite group,
88
file_format: str -> Format of the downloaded data,
99
max_days: float -> Maximum amount of days before redownloading file (Default: 7.0)"""
10-
data_dir = "data\\keps"
10+
data_dir = os.path.join('.', 'data', 'keps')
1111
s_group = sat_group
1212
kep_format = file_format
1313
file_name = f"{s_group}.{kep_format}"
@@ -19,6 +19,7 @@ def get_keps(sat_group:str, file_format:str, force_dl=False, max_days=7.0):
1919
url_opt = f"?GROUP={s_group}&FORMAT={kep_format}"
2020
url = url_base + url_opt
2121
if not load.exists(file_path) or load.days_old(file_path) >= m_days or force_dl:
22+
if force_dl: print("Downloading...")
2223
load.download(url, filename=file_path)
2324
return file_path
2425

mods/import_sat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def import_satellites():
1010
"Downlink" : Downlink Frequency,
1111
"Mode" : Transmitter Mode } ], ...
1212
"""
13-
data_dir = "data\\"
13+
data_dir = os.path.join('.', 'data')
1414
sat_info = []
1515
with open(os.path.join(data_dir,'satinfo.txt'), "rt", encoding="utf-8") as info:
1616
info_list = info.read().split("\n")

0 commit comments

Comments
 (0)