Skip to content

Commit da2ffc9

Browse files
authored
Develop (#1)
* first commit * black code * settings added * readme completed * workflow test * codecov status * readme updated * fix pytube bug * fix imports
1 parent 04d57bf commit da2ffc9

File tree

18 files changed

+973
-152
lines changed

18 files changed

+973
-152
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,10 @@ permissions:
1818
env:
1919
PLUGIN_JSON: "0.0.1"
2020
TAG_EXISTS: false
21-
PLUGIN_NAME: "my_plugin"
21+
PLUGIN_NAME: "youtube_to_text"
2222

2323
jobs:
24-
# This will be deleted by setup.py
25-
check:
26-
runs-on: ubuntu-latest
27-
outputs:
28-
plugin_name: ${{ steps.init.outputs.plugin_name }}
29-
steps:
30-
- name: Get plugin name
31-
id: init
32-
run: |
33-
echo "plugin_name=${{ env.PLUGIN_NAME }}" >> $GITHUB_OUTPUT
34-
35-
# This is the end of the removed section
3624
release:
37-
# This will be deleted by setup.py
38-
needs: check
39-
if: startsWith(needs.check.outputs.plugin_name, 'MY_PLUGIN') == false
40-
# This is the end of the removed section
4125
runs-on: ubuntu-latest
4226
steps:
4327
- name: Checkout

.github/workflows/test.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Python package
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: [3.11]
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
- name: Install dependencies
20+
run: |
21+
pip install -r requirements.txt
22+
pip install -r requirements/tests.txt
23+
- name: Check with black and ruff
24+
run: |
25+
python3 -m black .
26+
python3 -m ruff check --fix .
27+
- name: Test with coverage
28+
run: |
29+
python -m pytest --cache-clear --cov=youtube2text --cov-report=xml
30+
- name: Upload coverage reports to Codecov
31+
uses: codecov/codecov-action@v4.0.1
32+
with:
33+
token: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,5 @@ cython_debug/
153153

154154
# Cheshire Cat Plugin settings
155155
settings.json
156+
157+
media/

README.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
1-
# My plugin
1+
# Youtube 2 Text
22

3-
[![awesome plugin](https://custom-icon-badges.demolab.com/static/v1?label=&message=awesome+plugin&color=383938&style=for-the-badge&logo=cheshire_cat_ai)](https://)
4-
[![Awesome plugin](https://custom-icon-badges.demolab.com/static/v1?label=&message=Awesome+plugin&color=000000&style=for-the-badge&logo=cheshire_cat_ai)](https://)
5-
[![awesome plugin](https://custom-icon-badges.demolab.com/static/v1?label=&message=awesome+plugin&color=F4F4F5&style=for-the-badge&logo=cheshire_cat_black)](https://)
3+
[![Awesome plugin](https://custom-icon-badges.demolab.com/static/v1?label=&message=Awesome+plugin&color=000000&style=for-the-badge&logo=cheshire_cat_ai)](https://)
64

7-
Write here all the useful information about your plugin.
5+
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
6+
[![codecov](https://codecov.io/gh/rafleze/youtube2text/branch/main/graph/badge.svg?token=A229TF8PLG)](https://codecov.io/gh/rafleze/youtube2text)
87

9-
This repository is the template to automate the release of official Cheshire Cat AI plugins.
8+
## Description
9+
Youtube 2 Text is a plugin that automatically transcribes the content of YouTube videos. It operates simply put a link to the video and the desired language code into the [Cheshire Cat AI](https://github.com/cheshire-cat-ai) conversational form.
1010

11-
## Usage
11+
[![Youtube 2 Text](https://github.com/rafleze/youtube2text/blob/develop/transcribercat.png?raw=true)](https://)
1212

13-
1. Create a new repository clicking on the `Use this template` button.
14-
2. Clone your new repo directly in the Cat's `plugins` folder.
15-
3. Run the `setup.py` script:
16-
```bash
17-
python setup.py
18-
```
19-
The script will prompt you to write the name of your plugin and make an initial setup setting the name in the files.
13+
## Requirements
14+
- Cheshire Cat AI version 1.6.1 or higher
2015

21-
4. Start developing!
16+
## Installation
17+
To install the plugin, clone the repository into the `plugins` directory of Cheshire Cat AI
2218

23-
> **Important**
24-
> A new release of your plugin is triggered every time you set a new `version` in the `plugin.json` file.
25-
> Please, remember to set it correctly every time you want to release an update.
19+
## Usage
20+
To use the plugin:
21+
1. Start Cheshire Cat AI.
22+
2. Ask the Cheshire Cat AI to transcribe a YouTube video.
23+
2. Enter the YouTube video link and the language code for transcription.
24+
3. The Cheshire Cat AI conversational form will handle the transcription process.
25+
26+
## Contributing
27+
There are no specific instructions for contributing to the project. Users interested in improving the plugin can open an issue or a pull request on the GitHub repository.
2628

__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)