Rezaee.Data.Iranseda 1.0.0-alpha.2.1

This is a prerelease version of Rezaee.Data.Iranseda.
This package has a SemVer 2.0.0 package version: 1.0.0-alpha.2.1+SHA.76fe63297c0e23f41cb4c12b63ac6d8757cbaca2.
dotnet add package Rezaee.Data.Iranseda --version 1.0.0-alpha.2.1
NuGet\Install-Package Rezaee.Data.Iranseda -Version 1.0.0-alpha.2.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Rezaee.Data.Iranseda" Version="1.0.0-alpha.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Rezaee.Data.Iranseda --version 1.0.0-alpha.2.1
#r "nuget: Rezaee.Data.Iranseda, 1.0.0-alpha.2.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Rezaee.Data.Iranseda as a Cake Addin
#addin nuget:?package=Rezaee.Data.Iranseda&version=1.0.0-alpha.2.1&prerelease

// Install Rezaee.Data.Iranseda as a Cake Tool
#tool nuget:?package=Rezaee.Data.Iranseda&version=1.0.0-alpha.2.1&prerelease

Iranseda

A dotnet library for cataloguing and downloading from the national radio archive of Islamic Republic of Iran Broadcasting (IRIB).

CI Status CD Status Nuget License: MIT

Install

Prerequisites

Install Package

There are many ways to install a package, which may vary on different platforms. For example, for Script & Interactive, we act as follows:

#r "nuget: Rezaee.Data.Iranseda, 1.0.0-alpha.2.1"

You'll find more ways on the NuGet package page.

Usage

using Rezaee.Data.Iranseda;
using System.Text.Json;

// Create a new empty catalogue
Catalogue catalogue = new() { Channels = new() };

// Load the Radio Javan channel
Channel radioJavan = catalogue.LoadChannels()!
    .Single(c => c.Name == "جوان");
catalogue.Channels.Add(radioJavan);
radioJavan.Programmes = new();

// Load the Javene-Irani-Salam Programme from the Radio Javan channel completely,
// including all episodes and partitions.
Programme javeneIrani = radioJavan.LoadProgrammes()!
    .Single(p => p.Name == "جوان ایرانی سلام");
radioJavan.Programmes.Add(javeneIrani);

javeneIrani.Episodes = new();
javeneIrani.Episodes.Add(javeneIrani.LoadEpisodes()!.First());
javeneIrani.Episodes.First().Partitions = javeneIrani.Episodes.First().LoadPartitions();

JsonSerializerOptions serializerOptions = new()
{
    WriteIndented = true,
    Encoder = System.Text.Encodings.Web.JavaScriptEncoder.UnsafeRelaxedJsonEscaping
};

string cataloguePath = Path.Combine(Directory.GetCurrentDirectory(), "Catalogue.json");

// Save the catalogue
await catalogue.SaveAsync(
    path: cataloguePath,
    options: serializerOptions);

// Download based on the catalogue
string archiveDirectory = Path.Combine(Directory.GetCurrentDirectory(), "archive");
Directory.CreateDirectory(archiveDirectory);

await catalogue.DownloadAsync(
    directory: archiveDirectory,
    cataloguePath: cataloguePath, // overwrites
    options: serializerOptions,
    preferredMirror: new("http://radio.iranseda.ir/")); // MPEG (mp3)

The name of the project is inspired by the iranseda.ir website, however, it has no formal relation to this site or the Islamic Republic of Iran Broadcasting.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0-alpha.2.1 63 10/1/2022