aytackayin / youtube-to-blog
YouTube to Blog Laravel package with Chrome Extension API integration for Filament
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/aytackayin/youtube-to-blog
Requires
- php: ^8.2
- filament/filament: ^4.0
- illuminate/support: ^11.0|^12.0
Requires (Dev)
- orchestra/testbench: ^9.0
README
A comprehensive Laravel/Filament package that converts YouTube videos into blog posts via a Chrome extension, automatically downloading the video to the gallery.
v1.0.0 Features:
- Background video downloading (Queue worker)
- Automatically running worker (Special trigger for Windows)
- Instant status tracking with Chrome Extension (Polling)
- "Human-like" downloading capabilities (YouTube 403 bypass)
Requirements
- Laravel 11+ or Laravel 12
- Filament 4.x
- yt-dlp: Must be installed on the server.
- PHP Queue Worker: Required for background processes (The package automatically triggers locally).
Installation
1. Install the Package
(After publishing on Packagist):
composer require aytackayin/youtube-to-blog
During development with composer.json repositories setting:
"repositories": [ { "type": "path", "url": "./packages/aytackayin/youtube-to-blog" } ]
2. Run Migrations
php artisan migrate
3. Publish Config File
php artisan vendor:publish --tag=youtube-to-blog-config
4. yt-dlp Installation (Important!)
yt-dlp must be installed on the server for the video download feature to work.
Windows:
- Download
yt-dlp.exe. - Place it in a folder in your project (e.g.,
extensions/youtube-to-blog/). - Add the path to your
.envfile:
YT_DLP_PATH="C:/laragon/www/project/extensions/youtube-to-blog/yt-dlp.exe"
Linux:
- Install via terminal:
sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp sudo chmod a+rx /usr/local/bin/yt-dlp
- Configure
.env:YT_DLP_PATH="/usr/local/bin/yt-dlp"
5. Chrome Extension Installation
This package comes with a Chrome Extension.
- Download the Package: Download the
youtube-to-blog-extension.zipfile from this repository. - Unzip: Extract the files to a folder.
- Install on Chrome:
- Go to
chrome://extensionsin Chrome. - Enable Developer mode in the top right.
- Click Load unpacked and select the folder you extracted.
- Go to
- Configure:
- Click the extension icon.
- Site URL:
https://your-site.com(orhttp://localhost/project) - API Key: Enter the Chrome Token generated from your profile page.
Usage
- Go to YouTube: Open any video.
- "Save as Blog" Button: Click the button added below the video or the extension icon.
- Select Category: Select a category from the popup and click "Save".
- Process Tracking:
- The extension will first say "Saved".
- The video starts downloading in the background (Depends on server load).
- When the video is downloaded, the Extension gives a "Completed" notification.
- A system notification also appears in the Panel.
Model Settings
Add the trait to App\Models\User model:
use Aytackayin\YoutubeToBlog\Traits\HasYouTubeApiToken; class User extends Authenticatable { use HasYouTubeApiToken; }
Add the API key management component to your Filament profile page:
use Aytackayin\YoutubeToBlog\Filament\Components\YouTubeApiKeyComponent; YouTubeApiKeyComponent::getTab(),
Configuration
You can change the Model classes and file path settings via config/youtube-to-blog.php.
return [ 'disk' => 'attachments', // Disk where files will be uploaded 'video_download_enabled' => true, 'yt_dlp_path' => env('YT_DLP_PATH'), // ... ];
License
MIT License