Skip to content

Commit

Permalink
preparing for merge with ezra-branch
Browse files Browse the repository at this point in the history
  • Loading branch information
benleem committed Oct 1, 2024
1 parent 255dce7 commit f4baa19
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions cmd/transcribe.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ import (
"bytes"
"fmt"
"os"
"time"

"github.com/benleem/prattl/pysrc"
"github.com/briandowns/spinner"
"github.com/spf13/cobra"
)

Expand All @@ -34,16 +32,17 @@ var transcribeCmd = &cobra.Command{
}

func transcribe(fp string) (string, error) {
fileBytes, err := os.ReadFile(fp)

s := spinner.New(spinner.CharSets[35], 100*time.Millisecond, spinner.WithWriter(os.Stderr))
s.Prefix = "transcribing: "
s.Suffix = "\n"
s.Start()
// s := spinner.New(spinner.CharSets[35], 100*time.Millisecond, spinner.WithWriter(os.Stderr))
// s.Prefix = "transcribing: "
// s.Suffix = "\n"
// s.Start()
// defer s.Stop()

fileBytes, err := os.ReadFile(fp)
if err != nil {
return "", err
}

program, err := pysrc.ReturnFile("transcribe.py")
if err != nil {
return "", err
Expand Down Expand Up @@ -74,7 +73,6 @@ func transcribe(fp string) (string, error) {
if err = cmd.Wait(); err != nil {
return "", fmt.Errorf("error waiting for command: " + err.Error())
}
s.Stop()
output := out.String()
return output, nil
}

0 comments on commit f4baa19

Please sign in to comment.