diff --git a/cli/commands.txt b/cli/commands.txt index b534e44..d5c8058 100644 --- a/cli/commands.txt +++ b/cli/commands.txt @@ -14,7 +14,7 @@ Runs the tool with default settings: - Config: `config/config.json` - Output: `data/skipSongs.json` - Verbose: Disabled -- Reports: Not saved +- Reports: **Automatically generated** (including web UI data) ### Verbose Output ```bash @@ -70,28 +70,27 @@ Saves output files to a custom directory instead of the default `data/` folder. ## Report Generation -### Save Detailed Reports -```bash -python cli/main.py --save-reports -``` -Generates comprehensive analysis reports in the output directory: +### Detailed Reports (Always Generated) +Reports are now **automatically generated** every time you run the CLI tool. The `--save-reports` flag is kept for backward compatibility but is no longer required. + +Generated reports include: - `enhanced_summary_report.txt` - Comprehensive analysis - `channel_optimization_report.txt` - Priority optimization suggestions - `duplicate_pattern_report.txt` - Duplicate pattern analysis - `actionable_insights_report.txt` - Recommendations and insights - `detailed_duplicate_analysis.txt` - Specific songs and their duplicates - `analysis_data.json` - Raw analysis data for further processing -- `skip_songs_detailed.json` - Full skip list with metadata +- `skip_songs_detailed.json` - **Web UI data (always generated)** ## Combined Examples ### Full Analysis with Reports ```bash -python cli/main.py --verbose --save-reports +python cli/main.py --verbose ``` Runs complete analysis with: - Verbose output for detailed processing information -- Comprehensive report generation +- **Automatic comprehensive report generation** - Skip list creation ### Custom Configuration with Dry Run @@ -105,12 +104,12 @@ Tests a custom configuration without generating files: ### Custom Input/Output with Reports ```bash -python cli/main.py --input /path/to/songs.json --output-dir ./reports --save-reports +python cli/main.py --input /path/to/songs.json --output-dir ./reports ``` Processes custom input and saves all outputs to reports directory: - Custom input file - Custom output location -- All report files generated +- **All report files automatically generated** ### Minimal Output ```bash diff --git a/cli/main.py b/cli/main.py index c3c2933..35186e4 100644 --- a/cli/main.py +++ b/cli/main.py @@ -22,11 +22,11 @@ def parse_arguments(): formatter_class=argparse.RawDescriptionHelpFormatter, epilog=""" Examples: - python main.py # Run with default settings + python main.py # Run with default settings (generates reports automatically) python main.py --verbose # Enable verbose output python main.py --config custom_config.json # Use custom config python main.py --output-dir ./reports # Save reports to custom directory - python main.py --dry-run # Analyze without generating skip list + python main.py --dry-run # Analyze without generating files """ ) @@ -63,7 +63,7 @@ Examples: parser.add_argument( '--save-reports', action='store_true', - help='Save detailed reports to files' + help='Save detailed reports to files (now always enabled by default)' ) parser.add_argument( @@ -177,8 +177,8 @@ def main(): elif args.dry_run: print("\nDRY RUN MODE: No skip list generated") - # Save detailed reports if requested - if args.save_reports: + # Always generate detailed reports (not just when --save-reports is used) + if not args.dry_run: reports_dir = os.path.join(args.output_dir, 'reports') os.makedirs(reports_dir, exist_ok=True) @@ -229,7 +229,7 @@ def main(): } save_json_file(analysis_data, os.path.join(reports_dir, 'analysis_data.json')) - # Save full skip list data + # Save full skip list data (this is what the web UI needs) save_json_file(skip_songs, os.path.join(reports_dir, 'skip_songs_detailed.json')) print(f"✅ Enhanced reports saved to: {reports_dir}") @@ -240,6 +240,9 @@ def main(): print(f" • actionable_insights_report.txt - Recommendations and insights") print(f" • detailed_duplicate_analysis.txt - Specific songs and their duplicates") print(f" • analysis_data.json - Raw analysis data for further processing") + print(f" • skip_songs_detailed.json - Web UI data (always generated)") + elif args.dry_run: + print("\nDRY RUN MODE: No reports generated") print("\n" + "=" * 60) print("Analysis complete!")