| Crates.io | m3u_parser |
| lib.rs | m3u_parser |
| version | 0.1.3 |
| created_at | 2023-05-22 13:35:56.08048+00 |
| updated_at | 2025-03-23 04:09:21.022184+00 |
| description | A library for parsing and manipulating M3U files |
| homepage | |
| repository | |
| max_upload_size | |
| id | 870685 |
| size | 75,871 |
A library for parsing and manipulating M3U playlists.
Add the m3u_parser crate to your Cargo.toml file:
[dependencies]
m3u_parser = "0.1.2"
Import the M3uParser struct and use it to parse M3U playlists:
use m3u_parser::M3uParser;
#[tokio::main]
async fn main() {
let mut parser = M3uParser::new(None);
parser.parse_m3u("path/to/playlist.m3u", false, true).await;
// Perform operations on the parsed stream information
}
For more examples and detailed documentation, see the API documentation.
Parse an M3U playlist file and print the stream information:
use m3u_parser::M3uParser;
#[tokio::main]
async fn main() {
let mut parser = M3uParser::new(None);
parser.parse_m3u("path/to/playlist.m3u", false, true).await;
for stream_info in parser.streams_info {
println!("{:?}", stream_info);
}
}
Golang: go-m3u-parserPython: m3u-parserTypescript: ts-m3u-parser👤 Pawan Paudel
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Give a ⭐️ if this project helped you!
Copyright © 2023 Pawan Paudel.