iss-tracker-cli 0.1.0__tar.gz → 0.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,27 @@
1
+ Metadata-Version: 2.4
2
+ Name: iss-tracker-cli
3
+ Version: 0.1.1
4
+ Summary: CLI tool to track ISS position
5
+ Requires-Python: >=3.8
6
+ Description-Content-Type: text/markdown
7
+ Requires-Dist: requests
8
+
9
+ ISS Position Tracker (CLI)
10
+ A simple cli python tool for tracking the position of the International Space Station (ISS) in real time as well as how many people are currently in space!
11
+
12
+ Run the program named 'iss-tracker' using python (in the directory where the module) and run use the desired commands, exits gracefully with Ctrl + C.
13
+
14
+
15
+ Available commands:
16
+ help - Lists all commands.
17
+ track {parameter}
18
+ {-t} - Returns position data for the ISS until interupted.
19
+ {[num]} - Returns position data for the ISS [num] times.
20
+ people - Returns the number of people that are currently in space.
21
+
22
+ Notes:
23
+ -Requires an internet connection
24
+ -API response speed and success may vary
25
+ -Continuous tracking (-t) runs until manually stopped (Ctrl + C)
26
+
27
+ (this project uses the public open notify API)
@@ -0,0 +1,19 @@
1
+ ISS Position Tracker (CLI)
2
+ A simple cli python tool for tracking the position of the International Space Station (ISS) in real time as well as how many people are currently in space!
3
+
4
+ Run the program named 'iss-tracker' using python (in the directory where the module) and run use the desired commands, exits gracefully with Ctrl + C.
5
+
6
+
7
+ Available commands:
8
+ help - Lists all commands.
9
+ track {parameter}
10
+ {-t} - Returns position data for the ISS until interupted.
11
+ {[num]} - Returns position data for the ISS [num] times.
12
+ people - Returns the number of people that are currently in space.
13
+
14
+ Notes:
15
+ -Requires an internet connection
16
+ -API response speed and success may vary
17
+ -Continuous tracking (-t) runs until manually stopped (Ctrl + C)
18
+
19
+ (this project uses the public open notify API)
@@ -2,6 +2,7 @@ import requests
2
2
  import time
3
3
 
4
4
 
5
+ #gets the number of people in space
5
6
  def getPeopData():
6
7
  api = "http://api.open-notify.org/astros.json"
7
8
  try:
@@ -14,7 +15,7 @@ def getPeopData():
14
15
 
15
16
  return num
16
17
 
17
-
18
+ #gets postion data of the ISS
18
19
  def getPosData():
19
20
  api = "http://api.open-notify.org/iss-now.json"
20
21
  try:
@@ -28,16 +29,16 @@ def getPosData():
28
29
 
29
30
  return (lat, lon)
30
31
 
31
-
32
+ #help command
32
33
  def help():
33
34
  return '''command list:
34
- help - Lists all commands.
35
+ help - Lists all commands.
35
36
  track {parameter}
36
- {-t} - Returns position data for the ISS until interupted.
37
- {[num]} - Returns position data for the ISS [num] times.
38
- people - Returns the number of people that are currently in space.'''
39
-
37
+ {-t} - Returns position data for the ISS until interupted.
38
+ {[num]} - Returns position data for the ISS [num] times.
39
+ people - Returns the number of people that are currently in space.'''
40
40
 
41
+ #track command
41
42
  def track(par):
42
43
  if par == "-t":
43
44
  print("\n!Displaying Position Data for infinite requests.\n")
@@ -63,14 +64,13 @@ def track(par):
63
64
  except TypeError as e:
64
65
  print("Error: Incorrect parammeters")
65
66
 
66
-
67
+ #people command
67
68
  def people():
68
69
  data = getPeopData()
69
70
  if data != None:
70
71
  print(f"\nThere are currently {data} people in space!\n")
71
72
 
72
-
73
- #Main Programme
73
+ #main Program
74
74
  def main():
75
75
  print('''\033[34m
76
76
  ooo
@@ -92,20 +92,18 @@ def main():
92
92
 
93
93
  while True:
94
94
  try:
95
- command = input(">").lstrip()
95
+ command = input(">").split()
96
96
 
97
97
  #help command
98
- if command.strip() == "help":
98
+ if len(command) == 1 and command[0] == "help":
99
99
  print(help())
100
100
 
101
101
  #track command
102
- elif command[:5] == "track":
103
- par = command[5:].strip()
104
- if par == "":
105
- par = 1
102
+ elif len(command) in (1,2) and command[0] == "track":
103
+ par = command[1] if len(command) > 1 and command[1] else 1
106
104
  track(par)
107
105
 
108
- elif command.strip() == "people":
106
+ elif len(command) == 1 and command[0] == "people":
109
107
  people()
110
108
 
111
109
  #invalid command
@@ -115,5 +113,6 @@ def main():
115
113
  print("\nExiting...\n")
116
114
  break
117
115
 
116
+
118
117
  if __name__ == "__main__":
119
118
  main()
@@ -0,0 +1,27 @@
1
+ Metadata-Version: 2.4
2
+ Name: iss-tracker-cli
3
+ Version: 0.1.1
4
+ Summary: CLI tool to track ISS position
5
+ Requires-Python: >=3.8
6
+ Description-Content-Type: text/markdown
7
+ Requires-Dist: requests
8
+
9
+ ISS Position Tracker (CLI)
10
+ A simple cli python tool for tracking the position of the International Space Station (ISS) in real time as well as how many people are currently in space!
11
+
12
+ Run the program named 'iss-tracker' using python (in the directory where the module) and run use the desired commands, exits gracefully with Ctrl + C.
13
+
14
+
15
+ Available commands:
16
+ help - Lists all commands.
17
+ track {parameter}
18
+ {-t} - Returns position data for the ISS until interupted.
19
+ {[num]} - Returns position data for the ISS [num] times.
20
+ people - Returns the number of people that are currently in space.
21
+
22
+ Notes:
23
+ -Requires an internet connection
24
+ -API response speed and success may vary
25
+ -Continuous tracking (-t) runs until manually stopped (Ctrl + C)
26
+
27
+ (this project uses the public open notify API)
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "iss-tracker-cli"
7
- version = "0.1.0"
7
+ version = "0.1.1"
8
8
  description = "CLI tool to track ISS position"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -1,21 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: iss-tracker-cli
3
- Version: 0.1.0
4
- Summary: CLI tool to track ISS position
5
- Requires-Python: >=3.8
6
- Description-Content-Type: text/markdown
7
- Requires-Dist: requests
8
-
9
- Simple cli tool for tracking the position of the ISS in real time!
10
-
11
- commands include:
12
- help - Lists all commands.
13
- track {parameter}
14
- {-t} - Returns position data for the ISS until interupted.
15
- {[num]} - Returns position data for the ISS [num] times.
16
- people - Returns the number of people that are currently in space.
17
-
18
- Hope you like it! :)
19
-
20
-
21
- (this project uses open notify API)
@@ -1,13 +0,0 @@
1
- Simple cli tool for tracking the position of the ISS in real time!
2
-
3
- commands include:
4
- help - Lists all commands.
5
- track {parameter}
6
- {-t} - Returns position data for the ISS until interupted.
7
- {[num]} - Returns position data for the ISS [num] times.
8
- people - Returns the number of people that are currently in space.
9
-
10
- Hope you like it! :)
11
-
12
-
13
- (this project uses open notify API)
@@ -1,21 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: iss-tracker-cli
3
- Version: 0.1.0
4
- Summary: CLI tool to track ISS position
5
- Requires-Python: >=3.8
6
- Description-Content-Type: text/markdown
7
- Requires-Dist: requests
8
-
9
- Simple cli tool for tracking the position of the ISS in real time!
10
-
11
- commands include:
12
- help - Lists all commands.
13
- track {parameter}
14
- {-t} - Returns position data for the ISS until interupted.
15
- {[num]} - Returns position data for the ISS [num] times.
16
- people - Returns the number of people that are currently in space.
17
-
18
- Hope you like it! :)
19
-
20
-
21
- (this project uses open notify API)