Skip to main content

Certainly! I'll help you update the README.md file for the caption2text project. Based on the current content and the project structure, I'll provide an expanded version of the README that includes more information about the project, its usage, and other relevant details.

Here's an updated version of the README.md:

# caption2text

A lightweight Python module that converts VTT and SRT caption files into plain text transcripts.

## Features

- Convert WebVTT (.vtt) files to plain text transcripts
- Convert SubRip (.srt) files to plain text transcripts
- Easy-to-use Python API
- Command-line interface (CLI) for quick conversions

## Installation

You can install caption2text using pip:

```bash
pip install caption2text

Usage

Python API

from caption2text import vtt_to_transcript, srt_to_transcript

# Convert VTT file to transcript
vtt_transcript = vtt_to_transcript('path/to/your/file.vtt')
print(vtt_transcript)

# Convert SRT file to transcript
srt_transcript = srt_to_transcript('path/to/your/file.srt')
print(srt_transcript)

Command-line Interface

# Convert VTT file
caption2text convert path/to/your/file.vtt

# Convert SRT file
caption2text convert path/to/your/file.srt

# Specify output file
caption2text convert path/to/your/file.vtt -o output.txt

Development

To set up the development environment:

  1. Clone the repository
  2. Create a virtual environment: python -m venv venv
  3. Activate the virtual environment:
    • On Windows: venv\Scripts\activate
    • On macOS and Linux: source venv/bin/activate
  4. Install development dependencies: pip install -e .[dev]

Running Tests

To run the tests, use the following command:

python -m unittest discover tests

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

If you encounter any problems or have any questions, please open an issue on the GitHub repository.


This updated README.md provides a more comprehensive overview of the project, including installation instructions, usage examples for both the Python API and command-line interface, development setup, testing instructions, license information, and contribution guidelines.

You can further customize this README by adding more specific details about your project, such as:

1. Requirements or dependencies
2. More detailed examples or use cases
3. Troubleshooting section
4. Changelog or version history
5. Acknowledgements or credits

Let me know if you'd like to make any changes or additions to this updated README.

Metadata

Release files for caption2text 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for caption2text 0.1.2
File Size Uploaded
caption2text-0.1.2.tar.gz 5.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for caption2text 0.1.2
File Interpreter ABI Platform
caption2text-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 11.5 kB

Release files / caption2text-0.1.2.tar.gz

Download URL caption2text-0.1.2.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
37d00bea944b39808cd2bdb9577bf5a11a4f7b799f5ccc0279721433cc415cd9
BLAKE2b-256 checksum
How to use checksums
8a31de797f33db05958642aebe74bdeb182c0f2662a49696fc86df964e1e9d72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.6

Release files / caption2text-0.1.2-py3-none-any.whl

Download URL caption2text-0.1.2-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b4c91e8fd08f688ed604d2f37541f9f2aa02107400a3973db740cd50ad07bbee
BLAKE2b-256 checksum
How to use checksums
5cb16418649a6ed191ba5a85c9962cd8cce4bcd7d9b368623e50d40fead720d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.6

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page