mirror of
https://github.com/ANG13T/SatIntel.git
synced 2026-03-12 21:22:58 -07:00
feat: init tle_parser options
This commit is contained in:
@@ -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
11
txt/tle_parser.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
|
||||
[ 1 ] Parse Text File
|
||||
|
||||
[ 2 ] Parse Raw String
|
||||
|
||||
[ 3 ] Back to Main Menu
|
||||
|
||||
[ 0 ] Exit SatIntel
|
||||
|
||||
=================================================================================================================================
|
||||
Reference in New Issue
Block a user