kopia lustrzana https://github.com/browsh-org/browsh
Extra loggina and README updates
rodzic
802a61204d
commit
70d3f45f60
|
@ -38,10 +38,10 @@ a text-based web in your terminal.
|
|||
|
||||
## Installation
|
||||
|
||||
Download a binary from the [releases](https://github.com/tombh/texttop/releases) (~2MB).
|
||||
Download a binary from the [releases](https://github.com/tombh/texttop/releases) (~2-6MB).
|
||||
You will need to have Firefox >=57 aleady installed.
|
||||
|
||||
Or download and run the Docker image (~800MB) with:
|
||||
Or download and run the Docker image (~230MB) with:
|
||||
`docker run -it tombh/texttop`
|
||||
|
||||
## Usage
|
||||
|
|
|
@ -46,6 +46,7 @@ func setupLogging() {
|
|||
Shutdown(err)
|
||||
}
|
||||
logfile = fmt.Sprintf(filepath.Join(dir, "debug.log"))
|
||||
fmt.Println("Logging to: " + logfile)
|
||||
if _, err := os.Stat(logfile); err == nil {
|
||||
os.Truncate(logfile, 0)
|
||||
}
|
||||
|
@ -148,8 +149,8 @@ func Shell(command string) string {
|
|||
parts = parts[1:len(parts)]
|
||||
out, err := exec.Command(head, parts...).CombinedOutput()
|
||||
if err != nil {
|
||||
fmt.Printf(
|
||||
"Browsh tried to run `%s` but failed with: %s", command, string(out))
|
||||
Log(fmt.Sprintf(
|
||||
"Browsh tried to run `%s` but failed with: %s", command, string(out)))
|
||||
Shutdown(err)
|
||||
}
|
||||
return stripWhitespace(string(out))
|
||||
|
|
|
@ -242,8 +242,7 @@ func beginTimeLimit() {
|
|||
message := fmt.Sprintf("Browsh will close in %d seconds...", warningLength)
|
||||
sendMessageToWebExtension("/status," + message)
|
||||
time.Sleep(time.Duration(warningLength) * time.Second)
|
||||
quitFirefox()
|
||||
Shutdown(errors.New("normal"))
|
||||
quitBrowsh()
|
||||
}
|
||||
|
||||
// Note that everything executed in and from this function is not covered by the integration
|
||||
|
|
Ładowanie…
Reference in New Issue