From 830ff430639484204be8c07aac605598ef6c6244 Mon Sep 17 00:00:00 2001 From: Steve White Date: Fri, 24 Jan 2025 10:14:07 -0600 Subject: [PATCH] Updated usage to describe and link search criteria --- main.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/main.go b/main.go index 5e2b59e..aedcddd 100644 --- a/main.go +++ b/main.go @@ -25,22 +25,23 @@ func main() { fmt.Fprintf(os.Stderr, " ArXiv query flags:\n") fmt.Fprintf(os.Stderr, " -start string\n\tStart date in YYYYMMDD format\n") fmt.Fprintf(os.Stderr, " -end string\n\tEnd date in YYYYMMDD format\n") - fmt.Fprintf(os.Stderr, " -search string\n\tarXiv category/search query (e.g., 'cs.AI', 'physics.comp-ph')\n") + fmt.Fprintf(os.Stderr, " -search string\n\tarXiv category/search query (e.g., 'cat:cs.AI', 'au:kording')\n") + fmt.Fprintf(os.Stderr, " * see arXiv API docs for search types https://info.arxiv.org/help/api/user-manual.html#51-details-of-query-construction)\n") fmt.Fprintf(os.Stderr, " -max-results int\n\tMaximum number of papers to retrieve (default: 100, max: 2000)\n\n") fmt.Fprintf(os.Stderr, " OR\n\n") fmt.Fprintf(os.Stderr, " Input JSON flag:\n") fmt.Fprintf(os.Stderr, " -input-json string\n\tPath to input JSON file (bypasses arXiv fetch)\n\n") fmt.Fprintf(os.Stderr, "Optional flags:\n") - fmt.Fprintf(os.Stderr, " -output string\n\tOutput markdown file path (default: papers.md or auto-dated format when using arXiv query)\n") + fmt.Fprintf(os.Stderr, " -output string\n\tOutput markdown file path (default: auto-dated format when using arXiv query)\n") fmt.Fprintf(os.Stderr, " -model string\n\tLLM model to use (default: nvidia/llama-3.1-nemotron-70b-instruct)\n\n") fmt.Fprintf(os.Stderr, "Environment variables:\n") fmt.Fprintf(os.Stderr, " OPENROUTER_API_KEY\tRequired for LLM processing\n\n") fmt.Fprintf(os.Stderr, "Examples:\n") fmt.Fprintf(os.Stderr, " Fetch from arXiv:\n") fmt.Fprintf(os.Stderr, " %s -start 20240101 -end 20240131 -search cs.AI -criteria criteria.txt\n", os.Args[0]) - fmt.Fprintf(os.Stderr, " (Outputs: 20240101-20240131-cs.AI-papers.md)\n\n") + fmt.Fprintf(os.Stderr, " Outputs: 20240101-20240131-cs.AI-papers.json/.md\n\n") fmt.Fprintf(os.Stderr, " Use existing JSON:\n") - fmt.Fprintf(os.Stderr, " %s -input-json papers.json -criteria new-criteria.txt -output custom-name.md\n", os.Args[0]) + fmt.Fprintf(os.Stderr, " %s -input-json 20240101-20240131-cs.AI-papers.json -criteria new-criteria.txt -output custom-name.md\n", os.Args[0]) } // CLI flags @@ -218,7 +219,7 @@ func main() { if err := llmProcessor.ProcessPapers(ctx, tempInput.Name(), tempOutput.Name(), *criteriaFile, 1*time.Second); err != nil { log.Fatalf("LLM processing failed: %v", err) } - log.Printf("LLM processing complete, results saved to %s", tempOutput) + log.Printf("LLM processing complete, results saved to %s", tempOutput.Name()) // Generate markdown log.Printf("Generating markdown output")