#!/usr/bin/env python3 """ Quick script to get Google Drive links for your RAG files """ from rag_news_manager import initialize_rag_system, get_rag_stats def get_drive_links(): """Get direct Google Drive links""" print("šŸ”— Getting Google Drive Links...") # Initialize RAG system if not initialize_rag_system(): print("āŒ Failed to initialize RAG system") return # Get statistics (includes folder and file IDs) stats = get_rag_stats() if not stats: print("āŒ Could not get RAG statistics") return print(f"\nšŸ“Š RAG System Statistics:") print(f" Total entries: {stats['total_entries']}") print(f" Real news: {stats['real_count']}") print(f" Fake news: {stats['fake_count']}") print(f" Average confidence: {stats['avg_confidence']:.1%}") print(f"\nšŸ”— Google Drive Links:") if stats['folder_id']: folder_url = f"https://drive.google.com/drive/folders/{stats['folder_id']}" print(f"šŸ“ RAG Folder: {folder_url}") print(f" (Click to open in browser)") if stats['file_id']: file_url = f"https://drive.google.com/file/d/{stats['file_id']}/view" print(f"šŸ“„ RAG File: {file_url}") print(f" (Click to view the JSON data)") print(f"\nšŸ’” Tips:") print(f" - Use the folder link to browse all RAG files") print(f" - Use the file link to view the raw JSON data") print(f" - Run 'python view_rag_news.py' for a better interface") if __name__ == "__main__": get_drive_links()