Commit f7879bc013

f7879bc01321df006d9c95b9bd02f6bc50d6ebb1

parent: 1bb1d52305

Unsigned

Wraient <wraient.911@gmail.com> · 2024-10-19 18:23 UTC

serperate stuff

Layout: unified · split

internal/curd.go +13 −15
@@ -3,26 +3,24 @@ package internal
3import ( 3import (
4 "encoding/json" 4 "encoding/json"
5 "fmt" 5 "fmt"
6 "io/ioutil"
6 "os" 7 "os"
7 "runtime" 8 "runtime"
9 "strings"
8 "time" 10 "time"
9 // "log"
10) 11)
11 12
12type curdConfig struct { 13func GetTokenFromFile(filePath string) (string, error) {
13 player string 14 // Read the token from the file
14 historyFile string 15 data, err := ioutil.ReadFile(filePath)
15 subs_language string 16 if err != nil {
16 sub_or_dub string 17 return "", fmt.Errorf("failed to read token from file: %w", err)
17 percentageToMarkComplete int 18 }
18 nextEpisodePrompt bool 19
19 skipOp bool 20 // Convert the byte slice to a string and remove any surrounding whitespace or newlines
20 skipEd bool 21 token := strings.TrimSpace(string(data))
21 skipFiller bool 22
22 skipRecap bool 23 return token, nil
23 scoreOnCompletion bool
24 saveMpvSpeed bool
25 discordPresence bool
26} 24}
27 25
28// LogData logs the input data into a specified log file with the format [LOG] time lineNumber: logData 26// LogData logs the input data into a specified log file with the format [LOG] time lineNumber: logData