Skip to content

Commit

Permalink
Develop (#1)
Browse files Browse the repository at this point in the history
* first commit
* black code
* settings added
* readme completed
* workflow test
* codecov status
* readme updated
* fix pytube bug
* fix imports
  • Loading branch information
rafleze authored May 7, 2024
1 parent 04d57bf commit da2ffc9
Show file tree
Hide file tree
Showing 18 changed files with 973 additions and 152 deletions.
18 changes: 1 addition & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,10 @@ permissions:
env:
PLUGIN_JSON: "0.0.1"
TAG_EXISTS: false
PLUGIN_NAME: "my_plugin"
PLUGIN_NAME: "youtube_to_text"

jobs:
# This will be deleted by setup.py
check:
runs-on: ubuntu-latest
outputs:
plugin_name: ${{ steps.init.outputs.plugin_name }}
steps:
- name: Get plugin name
id: init
run: |
echo "plugin_name=${{ env.PLUGIN_NAME }}" >> $GITHUB_OUTPUT
# This is the end of the removed section
release:
# This will be deleted by setup.py
needs: check
if: startsWith(needs.check.outputs.plugin_name, 'MY_PLUGIN') == false
# This is the end of the removed section
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Python package

on: [push]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.11]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -r requirements/tests.txt
- name: Check with black and ruff
run: |
python3 -m black .
python3 -m ruff check --fix .
- name: Test with coverage
run: |
python -m pytest --cache-clear --cov=youtube2text --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,5 @@ cython_debug/

# Cheshire Cat Plugin settings
settings.json

media/
38 changes: 20 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
# My plugin
# Youtube 2 Text

[![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://)
[![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://)
[![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://)
[![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://)

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

This repository is the template to automate the release of official Cheshire Cat AI plugins.
## Description
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.

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

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

4. Start developing!
## Installation
To install the plugin, clone the repository into the `plugins` directory of Cheshire Cat AI

> **Important**
> A new release of your plugin is triggered every time you set a new `version` in the `plugin.json` file.
> Please, remember to set it correctly every time you want to release an update.
## Usage
To use the plugin:
1. Start Cheshire Cat AI.
2. Ask the Cheshire Cat AI to transcribe a YouTube video.
2. Enter the YouTube video link and the language code for transcription.
3. The Cheshire Cat AI conversational form will handle the transcription process.

## Contributing
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.

Empty file added __init__.py
Empty file.
Loading

0 comments on commit da2ffc9

Please sign in to comment.