AssParser.Lib 1.4.1

dotnet add package AssParser.Lib --version 1.4.1
NuGet\Install-Package AssParser.Lib -Version 1.4.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="AssParser.Lib" Version="1.4.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AssParser.Lib --version 1.4.1
#r "nuget: AssParser.Lib, 1.4.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 AssParser.Lib as a Cake Addin
#addin nuget:?package=AssParser.Lib&version=1.4.1

// Install AssParser.Lib as a Cake Tool
#tool nuget:?package=AssParser.Lib&version=1.4.1

AssParser · Publish to nuget All test

Parse ASS(SubStation Alpha Subtitles) file faster. No Regex. All managed code.

Basic Parse

AssSubtitleModel assfile = Lib.AssParser.ParseAssFile(@"path/to/your/assfile").Result;

# Or async way

AssSubtitleModel assfile = await Lib.AssParser.ParseAssFile(@"path/to/your/assfile");

List used fonted

AssSubtitleModel assfile = Lib.AssParser.ParseAssFile(@"path/to/your/assfile").Result;
FontDetail[] fonts = assfile.UsedFonts();

Where FontDetail is defined as

public class FontDetail : IEquatable<FontDetail?>
{
    public string FontName = "";
    public string UsedChar = "";
    public int Bold;
    public bool IsItalic;

    public override bool Equals(object? obj)
    {
        return Equals(obj as FontDetail);
    }

    public bool Equals(FontDetail? other)
    {
        return other is not null &&
               FontName == other.FontName &&
               Bold == other.Bold &&
               IsItalic == other.IsItalic;
    }

    public override int GetHashCode()
    {
        return HashCode.Combine(FontName, Bold, IsItalic);
    }

    public static bool operator ==(FontDetail? left, FontDetail? right)
    {
        return EqualityComparer<FontDetail>.Default.Equals(left, right);
    }

    public static bool operator !=(FontDetail? left, FontDetail? right)
    {
        return !(left == right);
    }
}

Get extra section

AssSubtitleModel assfile = Lib.AssParser.ParseAssFile(Path.Combine("UUEncodeTest", "1.ass")).Result;
string fontsData = assfile.UnknownSections["[Fonts]"];

Decode & Encode UUEncode

byte[] data = UUEncode.Decode(fontsData, out var crlf);
string encoded = UUEncode.Eecode(data, crlf)
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.

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.4.1 164 10/8/2023
1.4.0 126 10/8/2023
1.3.0 116 9/12/2023
1.2.3 129 9/11/2023
1.2.2 106 9/5/2023
1.2.1 137 9/3/2023
1.2.0 125 8/26/2023
1.1.0-rc1 131 8/11/2023
1.0.0 168 8/1/2023
1.0.0-rc2 115 8/1/2023
1.0.0-alpha 113 8/1/2023