feat: init tle_parser options

This commit is contained in:
angelina-tsuboi
2023-05-05 18:11:31 -07:00
parent b3023c440e
commit 16d72f7b4e
2 changed files with 35 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ import (
"fmt"
"bufio"
"os"
"github.com/TwiN/go-color"
)
type struct TLE {
@@ -30,10 +31,32 @@ type struct TLE {
func TLEParser(){
fmt.Println("Parsing TLE")
}
func TLETextFile(){
fmt.Print("\n ENTER INPUT > ")
var path string
file, err := os.Open(path)
if err != nil {
fmt.Println(color.Ize(color.Red, " [!] INVALID TEXT FILE"))
}
scanner := bufio.NewScanner(file)
scanner.Split(bufio.ScanLines)
var txtlines []string
for scanner.Scan() {
txtlines = append(txtlines, scanner.Text())
}
file.Close()
for _, eachline := range txtlines {
fmt.Println(eachline)
}
}
func TLEPlainString(string input){

11
txt/tle_parser.txt Normal file
View File

@@ -0,0 +1,11 @@
[ 1 ] Parse Text File
[ 2 ] Parse Raw String
[ 3 ] Back to Main Menu
[ 0 ] Exit SatIntel
=================================================================================================================================