Skip to content

Latest commit

 

History

History
67 lines (55 loc) · 8.2 KB

index.md

File metadata and controls

67 lines (55 loc) · 8.2 KB

subkt / myaa.subkt.ass

Package myaa.subkt.ass

Facilities for parsing ASS files. The main point of interest is ASSFile, which implements the actual parsing of raw ASS files. Also provided are extensions for converting java.awt.Color, java.time.Duration and kotlin.Boolean to and from ASS format.

Types

Name Summary
AegisubProjectGarbageSection class AegisubProjectGarbageSection : KeyValSection
Represents an Aegisub project garbage section.
ASSFile class ASSFile
Represents an ASS file. If provided, will parse the given file.
ASSSerializer interface ASSSerializer<T>
Collisions enum class Collisions
CollisionsSerializer class CollisionsSerializer : ASSSerializer<Collisions>
ColorMatrix data class ColorMatrix
ColorMatrixSerializer class ColorMatrixSerializer : ASSSerializer<ColorMatrix>
EventLine class EventLine : MapLine<EventLine>
A line in an EventSection. Its associated accessor is EventLineAccessor.
EventLineAccessor sealed class EventLineAccessor<T> : LineAccessor<T, EventLine>
A type-safe accessor for EventLine.
EventSection class EventSection : FormatSection<EventLine>
Represents an events section, containing a list of EventLine lines.
FormatSection abstract class FormatSection<T : MapLine<T>> : Section
Represents a section containing a sequence of lines, starting with a Format line specifying the order of the fields on each line.
KeyValLine class KeyValLine : Line
Corresponds to a raw ASS line represented textually as Type: Value, with the value unparsed.
KeyValSection open class KeyValSection : Section
Represents a generic key-value section such as ScriptInfoSection and AegisubProjectGarbageSection, where each line is given in in a Key: Value format, and each key is unique.
Line abstract class Line : Serializable
A basic line with a type.
LineAccessor sealed class LineAccessor<T, L : MapLine<L>> : Serializable
Provides type-safe parametric access into a MapLine.
MapLine abstract class MapLine<L : MapLine<L>> : Line, MutableMap<String, Any>
A line in a FormatSection. The fields contained in this object can be accessed in three ways:
ScaledBorderAndShadowSerializer class ScaledBorderAndShadowSerializer : ASSSerializer<Boolean>
ScriptInfoSection class ScriptInfoSection : KeyValSection
Represents a script info section.
Section abstract class Section : Serializable
Represents a section in an ASS file, textually represented as a section name in square brackets followed by zero or more lines in a Type: Value format.
StyleLine class StyleLine : MapLine<StyleLine>
A line in a StyleSection. Its associated accessor is StyleLineAccessor.
StyleLineAccessor sealed class StyleLineAccessor<T> : LineAccessor<T, StyleLine>
A type-safe accessor for StyleLine.
StyleSection class StyleSection : FormatSection<StyleLine>
Represents a styles section, containing a list of StyleLine lines.
TimerSerializer class TimerSerializer : ASSSerializer<Double>
WrapStyle enum class WrapStyle
WrapStyleSerializer class WrapStyleSerializer : ASSSerializer<WrapStyle>

Annotations

Name Summary
CustomSerializer annotation class CustomSerializer
KeyValField annotation class KeyValField
Annotates a property in a KeyValSection with the corresponding ASS key.
LineField annotation class LineField
Annotates a property in a MapLine with the name of the corresponding ASS field.

Type Aliases

Name Summary
ExtraData typealias ExtraData = Map<Int, Pair<String, String>>

Extensions for External Classes

Name Summary
java.awt.Color
java.time.Duration
kotlin.Boolean
kotlin.String

Functions

Name Summary
deserializeAss fun <T : Any> deserializeAss(s: String, klass: KClass<T>): T?
Return the given ASS string deserialized to the given type T, or null if the string could not be deserialized.
serializeAss fun serializeAss(v: Any): String
Serializes the given value as a string in ASS format.