Signed-off-by: mbrucedogs <mbrucedogs@gmail.com>
This commit is contained in:
parent
598798d9de
commit
391408e4d4
@ -14,7 +14,7 @@ Runs the tool with default settings:
|
|||||||
- Config: `config/config.json`
|
- Config: `config/config.json`
|
||||||
- Output: `data/skipSongs.json`
|
- Output: `data/skipSongs.json`
|
||||||
- Verbose: Disabled
|
- Verbose: Disabled
|
||||||
- Reports: Not saved
|
- Reports: **Automatically generated** (including web UI data)
|
||||||
|
|
||||||
### Verbose Output
|
### Verbose Output
|
||||||
```bash
|
```bash
|
||||||
@ -70,28 +70,27 @@ Saves output files to a custom directory instead of the default `data/` folder.
|
|||||||
|
|
||||||
## Report Generation
|
## Report Generation
|
||||||
|
|
||||||
### Save Detailed Reports
|
### Detailed Reports (Always Generated)
|
||||||
```bash
|
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.
|
||||||
python cli/main.py --save-reports
|
|
||||||
```
|
Generated reports include:
|
||||||
Generates comprehensive analysis reports in the output directory:
|
|
||||||
- `enhanced_summary_report.txt` - Comprehensive analysis
|
- `enhanced_summary_report.txt` - Comprehensive analysis
|
||||||
- `channel_optimization_report.txt` - Priority optimization suggestions
|
- `channel_optimization_report.txt` - Priority optimization suggestions
|
||||||
- `duplicate_pattern_report.txt` - Duplicate pattern analysis
|
- `duplicate_pattern_report.txt` - Duplicate pattern analysis
|
||||||
- `actionable_insights_report.txt` - Recommendations and insights
|
- `actionable_insights_report.txt` - Recommendations and insights
|
||||||
- `detailed_duplicate_analysis.txt` - Specific songs and their duplicates
|
- `detailed_duplicate_analysis.txt` - Specific songs and their duplicates
|
||||||
- `analysis_data.json` - Raw analysis data for further processing
|
- `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
|
## Combined Examples
|
||||||
|
|
||||||
### Full Analysis with Reports
|
### Full Analysis with Reports
|
||||||
```bash
|
```bash
|
||||||
python cli/main.py --verbose --save-reports
|
python cli/main.py --verbose
|
||||||
```
|
```
|
||||||
Runs complete analysis with:
|
Runs complete analysis with:
|
||||||
- Verbose output for detailed processing information
|
- Verbose output for detailed processing information
|
||||||
- Comprehensive report generation
|
- **Automatic comprehensive report generation**
|
||||||
- Skip list creation
|
- Skip list creation
|
||||||
|
|
||||||
### Custom Configuration with Dry Run
|
### Custom Configuration with Dry Run
|
||||||
@ -105,12 +104,12 @@ Tests a custom configuration without generating files:
|
|||||||
|
|
||||||
### Custom Input/Output with Reports
|
### Custom Input/Output with Reports
|
||||||
```bash
|
```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:
|
Processes custom input and saves all outputs to reports directory:
|
||||||
- Custom input file
|
- Custom input file
|
||||||
- Custom output location
|
- Custom output location
|
||||||
- All report files generated
|
- **All report files automatically generated**
|
||||||
|
|
||||||
### Minimal Output
|
### Minimal Output
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
15
cli/main.py
15
cli/main.py
@ -22,11 +22,11 @@ def parse_arguments():
|
|||||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||||
epilog="""
|
epilog="""
|
||||||
Examples:
|
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 --verbose # Enable verbose output
|
||||||
python main.py --config custom_config.json # Use custom config
|
python main.py --config custom_config.json # Use custom config
|
||||||
python main.py --output-dir ./reports # Save reports to custom directory
|
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(
|
parser.add_argument(
|
||||||
'--save-reports',
|
'--save-reports',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
help='Save detailed reports to files'
|
help='Save detailed reports to files (now always enabled by default)'
|
||||||
)
|
)
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
@ -177,8 +177,8 @@ def main():
|
|||||||
elif args.dry_run:
|
elif args.dry_run:
|
||||||
print("\nDRY RUN MODE: No skip list generated")
|
print("\nDRY RUN MODE: No skip list generated")
|
||||||
|
|
||||||
# Save detailed reports if requested
|
# Always generate detailed reports (not just when --save-reports is used)
|
||||||
if args.save_reports:
|
if not args.dry_run:
|
||||||
reports_dir = os.path.join(args.output_dir, 'reports')
|
reports_dir = os.path.join(args.output_dir, 'reports')
|
||||||
os.makedirs(reports_dir, exist_ok=True)
|
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_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'))
|
save_json_file(skip_songs, os.path.join(reports_dir, 'skip_songs_detailed.json'))
|
||||||
|
|
||||||
print(f"✅ Enhanced reports saved to: {reports_dir}")
|
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" • actionable_insights_report.txt - Recommendations and insights")
|
||||||
print(f" • detailed_duplicate_analysis.txt - Specific songs and their duplicates")
|
print(f" • detailed_duplicate_analysis.txt - Specific songs and their duplicates")
|
||||||
print(f" • analysis_data.json - Raw analysis data for further processing")
|
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("\n" + "=" * 60)
|
||||||
print("Analysis complete!")
|
print("Analysis complete!")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user