Skip to content

BlueBirdBack/caption2text

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages