feat: continue formatting

This commit is contained in:
angelina-tsuboi
2023-05-07 08:41:08 -07:00
parent 3d00a32555
commit dc170dccca
3 changed files with 65 additions and 52 deletions

32
osint/orbitalelement.go Normal file
View File

@@ -0,0 +1,32 @@
package osint
import (
"io/ioutil"
"fmt"
"github.com/iskaa02/qalam/gradient"
)
func OrbitalElement() {
options, _ := ioutil.ReadFile("txt/orbital_element.txt")
opt,_:=gradient.NewGradient("#1179ef", "cyan")
opt.Print("\n" + string(options))
var selection int = Option(0, 3)
if (selection == 1) {
result := SelectSatellite()
if (result == "") {
return
}
PrintNORADInfo(extractNorad(result), result)
} else if (selection == 2) {
fmt.Print("\n ENTER NORAD ID > ")
var norad string
fmt.Scanln(&norad)
PrintNORADInfo(norad, "UNSPECIFIED")
}
return
}

View File

@@ -4,7 +4,6 @@ import (
"fmt"
"os"
"github.com/TwiN/go-color"
"github.com/iskaa02/qalam/gradient"
"io/ioutil"
"strconv"
"strings"
@@ -19,31 +18,6 @@ type orderBy string
const authURL = "https://www.space-track.org/ajaxauth/login"
const baseurl = "https://www.space-track.org/basicspacedata/query/class"
// Orbital Element Data Display Code
func OrbitalElement() {
options, _ := ioutil.ReadFile("txt/orbital_element.txt")
opt,_:=gradient.NewGradient("#1179ef", "cyan")
opt.Print("\n" + string(options))
var selection int = Option(0, 3)
if (selection == 1) {
result := SelectSatellite()
if (result == "") {
return
}
PrintNORADInfo(extractNorad(result), result)
} else if (selection == 2) {
fmt.Print("\n ENTER NORAD ID > ")
var norad string
fmt.Scanln(&norad)
PrintNORADInfo(norad, "UNSPECIFIED")
}
return
}
func extractNorad(str string) string {
start := strings.Index(str, "(")
@@ -133,32 +107,6 @@ func SelectSatellite() string {
return result
}
// Satellite Position Visualization Code
func SatellitePositionVisualization() {
options, _ := ioutil.ReadFile("txt/orbital_element.txt")
opt,_:=gradient.NewGradient("#1179ef", "cyan")
opt.Print("\n" + string(options))
var selection int = Option(0, 3)
if (selection == 1) {
result := SelectSatellite()
if (result == "") {
return
}
PrintNORADInfo(extractNorad(result), result)
} else if (selection == 2) {
fmt.Print("\n ENTER NORAD ID > ")
var norad string
fmt.Scanln(&norad)
PrintNORADInfo(norad, "UNSPECIFIED")
}
return
}
func GenRowString(intro string, input string) string{
var totalCount int = 4 + len(intro) + len(input) + 2
var useCount = 63 - totalCount

View File

@@ -0,0 +1,33 @@
package osint
import (
"io/ioutil"
"fmt"
"github.com/iskaa02/qalam/gradient"
)
// Satellite Position Visualization Code
func SatellitePositionVisualization() {
options, _ := ioutil.ReadFile("txt/orbital_element.txt")
opt,_:=gradient.NewGradient("#1179ef", "cyan")
opt.Print("\n" + string(options))
var selection int = Option(0, 3)
if (selection == 1) {
result := SelectSatellite()
if (result == "") {
return
}
PrintNORADInfo(extractNorad(result), result)
} else if (selection == 2) {
fmt.Print("\n ENTER NORAD ID > ")
var norad string
fmt.Scanln(&norad)
PrintNORADInfo(norad, "UNSPECIFIED")
}
return
}