open-index/open-npm huggingface dataset:
npm package: @plussub/srt-vtt-parser
Description: A dependency free SRT / Vtt subtitle parser, written in Typescript.

Latest version: 2.0.5

# SRT/VTT Parser
A dependency-free SRT/VTT subtitle parser, written in TypeScript.

## Installation

```
npm i @plussub/srt-vtt-parser
```

## Usage

```ts
import fs from 'fs';
import { parse } from '@plussub/srt-vtt-parser';

const { entries } = parse(
  fs
    .readFileSync('transcript.vtt') // or '.srt'
    .toString()
);

entries.forEach(({ from, to, text, id }) => {
  // process transcript entry
});
```

## Examples

SRT (SubRip)
```
00:01:42,821 --> 00:01:44,289
(SIREN WAILING IN DISTANCE)
multiline test

2
00:01:45,365 --> 00:01:48,084
<i>DRIVER: There's 100,000 streets in this city.</i>

3
00:01:49,077 --> 00:01:51,421
You don't need to know the route.
```

VTT
```
WEBVTT

1
00:01:42.821 --> 00:01:44.289
(SIREN WAILING IN DISTANCE)
multiline test

2
00:01:45.365 --> 00:01:48.084
<i>DRIVER: There's 100,000 streets in this city.</i>

3
00:01:49.077 --> 00:01:51.421
You don't need to know the route.
```

Results into
```
{
  "entries": [
    {
      "from": 102821,
      "id": "1",
      "text": "(SIREN WAILING IN DISTANCE)\nmultiline test",
      "to": 104289
    },
    {
      "from": 105365,
      "id": "2",
      "text": "<i>DRIVER: There's 100,000 streets in this city.</i>",
      "to": 108084
    },
    {
      "from": 109077,
      "id": "3",
      "text": "You don't need to know the route.",
      "to": 111421
    }
  ]
}
```

Respect NOTE/ MULTILINE NOTE / STYLE Blocks and inline style but will ignore them for the output.


```
WEBVTT

STYLE
::cue {
  background-image: linear-gradient(to bottom, dimgray, lightgray);
  color: papayawhip;
}
/* Style blocks cannot use blank lines nor "dash dash greater than" */

NOTE comment blocks can be used between style blocks.

00:01:42.821 --> 00:01:44.289
(SIREN WAILING IN DISTANCE)
multiline test

NOTE style blocks cannot appear after the first cue.
this is a multiline note block

some identifier
00:01:45.365 --> 00:01:48.084
<i>DRIVER: There's 100,000 streets in this city.</i>


00:01:49.077 --> 00:01:51.421
You don't need to know the route.
```


Results into
```
{
  "entries": [
    {
      "from": 102821,
      "id": "",
      "text": "(SIREN WAILING IN DISTANCE)\nmultiline test",
      "to": 104289
    },
    {
      "from": 105365,
      "id": "some identifier",
      "text": "<i>DRIVER: There's 100,000 streets in this city.</i>",
      "to": 108084
    },
    {
      "from": 109077,
      "id": "",
      "text": "You don't need to know the route.",
      "to": 111421
    }
  ]
}
```
npm package: @plusui/core
Description: PlusUI Library built with Lit
Author: PlusUI
Latest version: 0.2.10

# Plus UI

Plus UI is a versatile UI library designed to seamlessly work with various JavaScript frameworks, including React, Vue, Angular, and others. It is powered by the Plus UI Design System, offering a collection of rich and functional components for designers and developers.

## Quick Links
- [GitHub Repository](https://github.com/plus-ui/core)
- [Documentation](https://docs.plusui.com/)
- [Figma Designs](https://www.figma.com/@plusui)
- [Discord Community](https://discord.gg/QhXfSnze)
- [Twitter](https://twitter.com/PlusUI_Official)

## Features
- ✔ Multi-framework support
- ✔ Powered by Plus UI Design System
- ✔ Rich and functional components
- ✔ Designer and developer-friendly
- ✔ Fully customizable and accessible
- ✔ Light package size
- ✔ Smart and easy to use
- ✔ Open-source

## Getting Started

### Installation
Clone the project and install dependencies:

```html
git clone https://github.com/plus-ui/core
cd core
npm install
```

### Usage
After installing dependencies, run the development server with:

```html
npm run dev
```

## Contributing
If you wish to contribute to Plus UI, start by forking the repository on GitHub. Clone the forked repo locally and install dependencies:

```html
git clone https://github.com/YOUR_GITHUB_USERNAME/core
cd core
npm install
```

### Development
Run the following command to start the development server:

```html
npm start
```

This will spin up the dev server, and a browser will open automatically.

### Building
To generate a production build, use the following command:

```html
npm run build
```

## Community and Support
For discussions, assistance, or to stay updated, join our community on [Discord](https://discord.gg/QhXfSnze) and follow us on [Twitter](https://twitter.com/PlusUI_Official).

Enjoy using Plus UI in your projects!