| 14 | ) |
| 15 | |
| 16 | func printUsage() { |
| 17 | fmt.Println("Usage: go run main-testsummarize.go [--help] [--mode MODE] <filename>") |
| 18 | fmt.Println("Examples:") |
| 19 | fmt.Println(" go run main-testsummarize.go README.md") |
| 20 | fmt.Println(" go run main-testsummarize.go --mode useful /path/to/image.png") |
| 21 | fmt.Println(" go run main-testsummarize.go -m publiccode document.pdf") |
| 22 | fmt.Println("") |
| 23 | fmt.Println("Supported file types:") |
| 24 | fmt.Println(" - Text files (up to 200KB)") |
| 25 | fmt.Println(" - Images (up to 7MB)") |
| 26 | fmt.Println(" - PDFs (up to 5MB)") |
| 27 | fmt.Println("") |
| 28 | fmt.Println("Flags:") |
| 29 | fmt.Println(" --mode, -m Summarization mode (default: quick)") |
| 30 | fmt.Println(" Options: quick, useful, publiccode, htmlcontent, htmlfull") |
| 31 | fmt.Println("") |
| 32 | fmt.Println("Environment variables:") |
| 33 | fmt.Println(" GOOGLE_APIKEY (required)") |
| 34 | } |
| 35 | |
| 36 | func main() { |
| 37 | var showHelp bool |