Merge pull request 'fixup! Dont embed python, but use python -m guessit.' (#2) from rewrite into master

Reviewed-on: #2
steino 2023-05-25 06:08:01 +00:00
commit 6bb6523048
3 changed files with 8 additions and 9 deletions

View File

@ -1,9 +1,9 @@
# guessit-go # guessit-go
``` ``` go
python3 -m pip install -U nuitka guessit, err := New(GuessitConfig{
Pip: true,
})
git clone https://github.com/guessit-io/guessit.git match := guessit.Guessit("Treme.1x03.Right.Place,.Wrong.Time.HDTV.XviD-NoTV.avi")
nuitka3 --output-filename=guessit /path/to/guessit
``` ```

View File

@ -44,7 +44,7 @@ type Match struct {
} }
func (g GuessitConfig) PipInstall() (err error) { func (g GuessitConfig) PipInstall() (err error) {
args := []string{"-m", "pip", "install", "guessit3"} args := []string{"-m", "pip", "install", "guessit"}
cmd := exec.Command(g.Python, args...) cmd := exec.Command(g.Python, args...)
cmdout, err := cmd.Output() cmdout, err := cmd.Output()

View File

@ -7,8 +7,7 @@ import (
) )
func TestGuessit(t *testing.T) { func TestGuessit(t *testing.T) {
g, err := New(GuessitConfig{ guessit, err := New(GuessitConfig{
Git: false,
Pip: true, Pip: true,
}) })
@ -27,6 +26,6 @@ func TestGuessit(t *testing.T) {
} }
for _, s := range ss { for _, s := range ss {
fmt.Println(g.Guessit(s, "--excludes=season")) fmt.Println(guessit.Guessit(s)) //, "--excludes=season"))
} }
} }