├── .gitignore ├── README.md ├── WebUI ├── index.html └── script.js ├── __pycache__ ├── main.cpython-39.pyc ├── restAPI.cpython-310.pyc └── restAPI.cpython-39.pyc ├── assets ├── savedImages.png ├── steps.png └── steps2.png ├── main.py ├── requirements.txt └── restAPI.py /.gitignore: -------------------------------------------------------------------------------- 1 | /audio.mp3 2 | /segments -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Youtube2Blog 2 | 3 | Transform your YouTube content into engaging blog posts effortlessly with our AI-powered Youtube to Blog conversion tool. Optimize your reach and unlock the potential of SEO for your videos. Get started now! 🚀 #AI #SEO #YouTube2Blog" 4 | 5 | ### Features ⭐️ 6 | 7 | - Convert any Youtube or Drive Videos 📹 8 | - Has Suggestions over images 🌠 9 | - Provides a Medium Blog Like editor 📝 10 | 11 | ## If you like it Please Gimme some stars ⭐️ so i can have some motive to do more !! 🥺 12 | 13 | Here is how you can do it ! 14 | 15 | ### Step 1 - Enter the Youtube URL 16 | 17 |  18 | 19 | ### Step 2 - Edit the content that apears in the Editor 20 | 21 |  22 | 23 | ### Step 3 - Click on any Image You want to use and Finally Copy and Paste it in Medium or Any Blog app 24 | 25 |  26 | 27 | ## Installation 28 | 29 | 1. Clone this repository: 30 | 31 | ``` 32 | git clone https://github.com/badboysm890/Youtube2Blog.git 33 | ``` 34 | 35 | 2. Navigate to the project directory: 36 | 37 | ``` 38 | cd Youtube2Blog 39 | ``` 40 | 41 | 3. Install the required packages: 42 | 43 | ``` 44 | pip install -r requirements.txt 45 | ``` 46 | 47 | ## Project Structure 48 | 49 | The project consists of the following files: 50 | 51 | 1. `main.py` - This has the base code for the Youtube Download to Conversion. 52 | 2. `restAPI.py.py` - This is the FASTAPI server which takes care of the web interface. 53 | 3. `/WebUI` - This will be Web UI files use any web server you want preferably live server vscode. 54 | 55 | ## Usage 56 | 57 | Step 1 58 | 59 | Once every thing has been installed, you have two more prerequisites those are FFMPEG and Youtube-dl 60 | 61 | ``` 62 | pip install --upgrade youtube-dl 63 | ``` 64 | 65 | For Mac 66 | ``` 67 | brew install ffmpeg 68 | ``` 69 | 70 | For Linux 71 | ``` 72 | sudo apt install ffmpeg 73 | ``` 74 | 75 | For example converting a youtube to blog: 76 | ``` 77 | python3 main.py --params https://youtu.be/SJeBRW1QQMA --name Test.txt 78 | ``` 79 | 80 | 81 | Step 2 82 | 83 | 84 | ## Contributing 85 | 86 | We welcome contributions to this project. Please follow these guidelines: 87 | 88 | 1. Create a fork of the repository. 89 | 2. Create a new branch with a descriptive name. 90 | 3. Commit your changes to your branch. 91 | 4. Create a pull request, explaining your changes and the motivation behind them. 92 | 93 | ## License 94 | 95 | Nothing Like that Just Have Fun 96 | 97 | ## Todo 98 | 99 | - Add Automation to have sceduled post to medium 100 | - Use Stable Diffusion to Blog and add more related images 101 | - Make it more fast and accurate paragraphs 102 | -------------------------------------------------------------------------------- /WebUI/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |"+result.text+ "
" 85 | 86 | with open(name, "w") as f: 87 | f.write(orginal_text) 88 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | aiohttp 2 | aiosignal 3 | async-generator==1.10 4 | async-timeout 5 | attrs 6 | brotlipy 7 | certifi==2022.12.7 8 | cffi 9 | charset-normalizer 10 | click 11 | colorama 12 | cryptography 13 | dataclasses 14 | datasets==2.8.0 15 | dill 16 | exceptiongroup==1.1.0 17 | filelock 18 | frozenlist 19 | fsspec 20 | h11==0.14.0 21 | huggingface-hub==0.12.0 22 | idna 23 | importlib-metadata 24 | joblib 25 | multidict 26 | multiprocess 27 | numpy 28 | outcome==1.2.0 29 | packaging 30 | pandas==1.5.3 31 | Pillow==9.4.0 32 | pyarrow==10.0.1 33 | pycparser 34 | pydub==0.25.1 35 | pyOpenSSL 36 | PySocks 37 | python-dateutil 38 | pytz 39 | PyYAML 40 | regex 41 | requests 42 | responses==0.18.0 43 | sacremoses==0.0.43 44 | selenium==4.8.0 45 | six 46 | sniffio==1.3.0 47 | sortedcontainers==2.4.0 48 | sounddevice==0.4.5 49 | tokenizers 50 | torch 51 | tqdm 52 | transformers 53 | trio==0.22.0 54 | trio-websocket==0.9.2 55 | typing_extensions 56 | urllib3 57 | whisper==1.1.10 58 | wsproto==1.2.0 59 | xxhash 60 | yarl 61 | zipp 62 | -------------------------------------------------------------------------------- /restAPI.py: -------------------------------------------------------------------------------- 1 | from __future__ import unicode_literals 2 | from fastapi import Body, FastAPI, Request 3 | from fastapi.middleware.cors import CORSMiddleware 4 | import re 5 | import os 6 | 7 | app = FastAPI() 8 | 9 | 10 | 11 | origins = [ 12 | "http://localhost", 13 | "http://127.0.0.1:5500", 14 | ] 15 | 16 | app.add_middleware( 17 | CORSMiddleware, 18 | allow_origins=origins, 19 | allow_credentials=True, 20 | allow_methods=["*"], 21 | allow_headers=["*"], 22 | ) 23 | 24 | @app.post("/") 25 | async def check_image(request: Request): 26 | request = await request.json() 27 | print(request) 28 | url = request["url"] 29 | textName = re.sub(r"[^a-zA-Z0-9]+", ' ', url) 30 | textName = textName.replace(" ", "_") 31 | textName = textName + ".txt" 32 | os.system("python main.py --params " + request["url"] + " --name " + textName) 33 | with open(textName, "r") as f: 34 | text = f.read() 35 | os.remove(textName) 36 | return {"text": text} --------------------------------------------------------------------------------