~thecashewtrader/cliclip

8eae9f7315ceae50c7a0b2af48add5e870711d38 — thecashewtrader 7 months ago 2519554
add auto generation of .md file
2 files changed, 7 insertions(+), 0 deletions(-)

M README.md
M cliclip.sh
M README.md => README.md +2 -0
@@ 5,6 5,7 @@
- Process an online video (using `yt-dlp`)
- Automatically extract and add subtitles (Using OpenAI Whisper or YouTube transcripts)
- Automatically add intro and outro
- Generate a `.md` file with metadata (Can be used as a place to store the description of the clip, if you intend to post to multiple platforms)

# Installation



@@ 36,3 37,4 @@ Simply run `cliclip` and follow the prompts. When prompted for output, don't add
- `yt-dlp`
- [autosub](https://github.com/agermanidis/autosub)
- [youtube-transcript-api](https://github.com/jdepoix/youtube-transcript-api)
- [pup](https://github.com/ericchiang/pup) (For extracting video title)

M cliclip.sh => cliclip.sh +5 -0
@@ 33,6 33,8 @@ do
            subtitle_file=""
            source_file="$(prompt_file)"

			echo "Original video: $source_file" >> "$output.md"

            echo "Select Subtitle Choice:"
            select subtitle_choice in "Provide File" "OpenAI Whisper";
            do


@@ 59,6 61,9 @@ do
            read -p "Start: " start
            read -p "End: " end

			title=$(curl -L "$url" |  pup 'title text{}')
			echo "Original video: [$title]($url) ($start to $end)" >> "$output.md"

            echo "Select Subtitle Choice:"
            select subtitle_choice in "Provide File" "Try To Obtain From YouTube" "OpenAI Whisper";
            do