aboutsummaryrefslogtreecommitdiff
path: root/cmd/xlsx/main.go
diff options
context:
space:
mode:
authorleshe4ka46 <alex9102naid1@ya.ru>2025-10-19 14:47:59 +0300
committerleshe4ka46 <alex9102naid1@ya.ru>2025-10-19 14:47:59 +0300
commite17a425dfb3382310fb5863f516dacdca9f44956 (patch)
tree7babb3048d0eb20aa1e68e9b29c2acfa794ab96f /cmd/xlsx/main.go
parent091963a50c3bb2926f559f01c49e8f5bd03d2bfd (diff)
fuck the unipdf licencing
Diffstat (limited to 'cmd/xlsx/main.go')
-rw-r--r--cmd/xlsx/main.go47
1 files changed, 24 insertions, 23 deletions
diff --git a/cmd/xlsx/main.go b/cmd/xlsx/main.go
index 053cf66..4ccb01e 100644
--- a/cmd/xlsx/main.go
+++ b/cmd/xlsx/main.go
@@ -3,35 +3,21 @@ package main
import (
"airlines/pkg/adapters/xlsx"
"fmt"
- "io/ioutil"
+ "os"
)
-func readXLSX(path string) {
- tickets, err := xlsx.UnmarshallXlsxFile("/home/alex/ds-data/YourBoardingPassDotAero/YourBoardingPassDotAero-2017-11-30.xlsx")
- if err != nil {
- panic(err)
- }
- for _, ticket := range tickets {
- u, err := ticket.ToUser()
- if err != nil {
- panic(err)
- }
- f, err := ticket.ToFlight()
- if err != nil {
- panic(err)
- }
- c, err := ticket.ToCard()
- if err != nil {
- panic(err)
- }
- fmt.Printf("%+v %+v %+v\n", u, f, c)
- }
-}
+// func readXLSX(path string) {
+// tickets, err := xlsx.UnmarshallXlsxFile("/home/alex/ds-data/YourBoardingPassDotAero/YourBoardingPassDotAero-2017-11-30.xlsx")
+// if err != nil {
+// panic(err)
+// }
+
+// }
func main() {
tickets := make([]xlsx.Ticket, 0)
baseDir := "/home/alex/ds-data/YourBoardingPassDotAero/"
- items, _ := ioutil.ReadDir(baseDir)
+ items, _ := os.ReadDir(baseDir)
for _, item := range items {
if !item.IsDir() {
fmt.Println("Processing file:", item.Name())
@@ -43,4 +29,19 @@ func main() {
}
}
+ // for _, ticket := range tickets {
+ // u, err := ticket.ToUser()
+ // if err != nil {
+ // panic(err)
+ // }
+ // f, err := ticket.ToFlight()
+ // if err != nil {
+ // panic(err)
+ // }
+ // c, err := ticket.ToCard()
+ // if err != nil {
+ // panic(err)
+ // }
+ // fmt.Printf("%+v %+v %+v\n", u, f, c)
+ // }
}