This project extracts and processes song data from multiple Danish radio stations, organizing tracks by language (Danish and English) and providing cross-station analysis to identify the most popular tracks across Denmark.
Note: This project is being expanded to include a modern desktop application with UI. See the Desktop Application section below for details.
Radio Filter/
├── Scripts/ # All extraction and processing scripts
│ ├── extract_radio_playlists.py # Main script for extracting playlists from all stations
│ ├── radio_playlist_consolidator.py # Script for combining and analyzing all station data
│ └── extract_p3_current_playlist.py # Legacy script for P3 station
├── Outputs/ # All data output files
│ ├── Stations/ # Individual station data
│ │ ├── NOVA/ # NOVA Radio data
│ │ │ ├── Danish/ # Danish tracks from NOVA
│ │ │ ├── English/ # English tracks from NOVA
│ │ │ └── Raw/ # Raw NOVA playlist data
│ │ ├── P3/ # P3 Radio data
│ │ │ ├── Danish/ # Danish tracks from P3
│ │ │ ├── English/ # English tracks from P3
│ │ │ └── Raw/ # Raw P3 playlist data
│ │ ├── TheVoice/ # TheVoice Radio data
│ │ └── ... (other stations) # Similar structure for all stations
│ ├── Combined/ # Combined analysis across all stations
│ │ ├── Danish/ # Combined Danish tracks analysis
│ │ ├── English/ # Combined English tracks analysis
│ │ └── All/ # Complete dataset with all tracks
│ └── Previous_Attempts/ # Archive of previous approaches
└── README.md # This documentation file
-
Extract playlists from all supported stations:
python Scripts/extract_radio_playlists.py -
Extract playlists from specific stations:
python Scripts/extract_radio_playlists.py NOVA P3 TheVoiceSupported stations: NOVA, P3, TheVoice, Radio100, PartyFM, PopFM, RadioGlobus, SkalaFM, P4, RBClassics
After extracting playlists from the desired stations, run the consolidator to generate combined analysis:
python Scripts/radio_playlist_consolidator.py
This will:
- Combine all station data
- Identify tracks played across multiple stations
- Generate rankings by play count
- Output combined files in the Outputs/Combined/ directory
Station-specific output files contain the following columns:
- Track: In format "Artist - Title"
- Repeats: Number of times the track was played in the time period
- Timestamp: When the track was played (if available)
The consolidated output files contain enhanced information:
- Track: In format "Artist - Title"
- Repeats: Total number of plays across all stations
- Stations: List of stations where the track was played
- Station_Count: Number of different stations playing the track
The system currently extracts and analyzes playlists from these Danish radio stations:
- NOVA
- P3
- TheVoice
- Radio100
- PartyFM
- PopFM
- RadioGlobus
- SkalaFM
- P4
- RBClassics (R&B Classics)
The system uses sophisticated language detection to classify tracks as Danish or English:
- Danish-specific character detection (æ, ø, å)
- Word-based language detection
- Context from artist names
- Special case handling for mixed-language titles
Tracks that cannot be confidently classified are listed separately.
Install all required dependencies:
pip install -r requirements.txt
Main dependencies:
- requests: For fetching web content
- beautifulsoup4: For HTML parsing
- html5lib: For robust HTML handling
- pandas: For data manipulation and analysis
- langdetect: For language classification assistance
- deezer-python: For Deezer API integration
- flask: For OAuth authentication handling
The system prepares playlist data for transfer to Deezer using third-party services like Soundiiz or TuneMyMusic:
- CSV Export: Creates properly formatted CSV files for transfer services
- Real Data Only: Uses only actual radio playlist data (never fake or simulated data)
- Language-Separated: Creates separate files for Danish and English tracks
- Prioritized by Popularity: Tracks are ordered by play count and station coverage
- Date-Tagged Files: Includes the current date in filenames for tracking
- Automatic: After running the consolidator, it will ask if you want to prepare CSV files for transfer
- Manual: Run directly anytime after consolidation:
python Scripts/prepare_transfer_csv.py
The script will:
- Create CSV files in the
/Outputs/Transfer/directory - Format files for both Soundiiz and TuneMyMusic services
- Provide instructions for completing the transfer to Deezer
- Go to Soundiiz
- Create a free account and log in
- Go to 'Upload Playlist'
- Select 'Import from a file'
- Upload the
*_Soundiiz.csvfiles - Convert to Deezer
- Go to TuneMyMusic
- Select 'Source: File'
- Upload the
*_TuneMyMusic.csvfiles - Select 'Destination: Deezer'
- Login to your Deezer account
- Start the transfer
The system can automatically send email notifications when new updates are available:
- AppleScript Integration: Uses macOS Mail app to send notifications
- Customizable Notifications: HTML-formatted emails with detailed results
- Automated: Notifications are sent automatically during scheduled updates
Coming Soon: A modern desktop application with intuitive UI is in development.
- Modern UI: Beautiful, user-friendly interface built with Tauri and React/Vue
- Dashboard: Real-time status monitoring and update history
- Playlist Explorer: Browse, search, and filter playlists by language and station
- Manual Controls: Trigger updates on-demand with visual feedback
- M3U Generation: Create playlists compatible with DJ software from radio tracks
- Library Matching: Match radio tracks with your existing music collection
- Settings Management: Configure paths, email notifications, and scheduling
- Frontend: Modern web technologies (React/Vue + Tailwind/DaisyUI)
- Backend: Python API exposing existing radio script functionality
- Framework: Tauri for native desktop integration and packaging
- Database: Local storage for settings and cached data
See the Project Plan for the detailed development roadmap and progress tracking.
Contributions are welcome! Please feel free to submit a Pull Request.