Skip to content

Commit

Permalink
Normal output on stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
pepa65 committed Sep 7, 2023
1 parent 818e73d commit af8bd3d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![GitHub](https://img.shields.io/github/license/pepa65/m2m.svg)](LICENSE)
# m2m - Move from POP3 to Maildir

* **v1.6.0**
* **v1.6.1**
* Just pull mails from POP3 servers (TLS can be disabled) and put them in
local Maildirs. Proxies and Onion entry servers are supported.
* RFC6856 compliant (UTF8 before anything) so works with Courier as well.
Expand All @@ -28,14 +28,13 @@

## Run
* Usage: `m2m [ -v|--verbose | -q|--quiet | -h|--help ]`
* Flag `-v`/`--verbose`: Output a more detailed log of actions.
* Flag `-q`/`--quiet`: Output only fatal errors.
* Default (no flag): Output a minimal report (nothing on no mails).
* All output is on `stderr`.
* Flag `-v`/`--verbose`: Output a more detailed log of actions to `stderr`.
* Flag `-q`/`--quiet`: Output only fatal errors to `stderr`.
* Nno flag: Output a minimal report to `stdout` (nothing on no mails).

## Help
```
m2m v1.6.0 - Move from POP3 to Maildir
m2m v1.6.1 - Move from POP3 to Maildir
* Downloading emails from POP3 servers and moving them into Maildir folders.
* Repo: github.com/pepa65/m2m
* Usage: m2m [ -v|--verbose | -q|--quiet | -h|--help ]
Expand Down
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"gopkg.in/yaml.v2"
)

const version = "1.6.0"
const version = "1.6.1"

type Config struct {
Username string
Expand Down Expand Up @@ -107,7 +107,7 @@ func main() { // IO:self
if n > 0 {
mails = true
}
if errormsg != "" {
if errormsg != "" && verbose == 2 {
log.Print(errormsg)
}
}
Expand All @@ -117,7 +117,7 @@ func main() { // IO:self
for account, n := range accounts {
logline += account+": "+n+" "
}
fmt.Fprintf(os.Stderr, "%s(%.3fs) ", logline, duration)
fmt.Printf("%s(%.3fs) ", logline, duration)
} else if verbose == 2 {
log.Printf("Running time: %fs", duration)
}
Expand Down

0 comments on commit af8bd3d

Please sign in to comment.