Video to Text Rendering: A Simple AI Pipeline

Here’s a powerful one-liner that converts any video into a concise text summary using modern AI tools: #!/bin/sh yt-dlp -x --audio-format mp3 "$1" -o "audio.mp3" && \ whisper "audio.mp3" --model medium --output_format txt --output_dir . && \ cat audio.txt | ollama run mistral "Summarize the following text, removing any fluff and focusing on key points: ${cat}" > summary.txt && \ rm audio.mp3 audio.txt && cat summary.txt How It Works The pipeline combines three powerful tools: yt-dlp: A robust video downloader that handles YouTube, Vimeo, and many other platforms. It extracts just the audio track to minimize processing time. ...

October 12, 2024 · 2 min · 268 words

Running Backup Scripts on Boot and Wake with systemd

If you’re running automated backups on a laptop, traditional schedulers like cron or fcron might not be ideal. Your machine isn’t always on, and you might want to trigger backups specifically when the system starts up or wakes from sleep. Here’s how to use systemd to run your backup script at these key moments. The systemd Service File Create /etc/systemd/system/backup.service: [Unit] Description=Run backup script at boot and wake-up After=multi-user.target suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target [Service] Type=oneshot User=yourusername Group=yourgroup ExecStart=/path/to/backup-script.sh [Install] WantedBy=multi-user.target suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target The User and Group directives ensure the script runs as your user instead of root. This is important for: ...

July 31, 2024 · 2 min · 301 words

Getting Started with Ansible for Linux System Administration

Getting Started with Ansible for Linux System Administration System administration can be tedious and time-consuming, especially when managing multiple remote servers. Ansible provides a powerful solution for automating these tasks, making server management more efficient and less error-prone. Here’s how to set up Ansible and create your first playbooks for managing Linux servers. Key Concepts Ansible: An automation tool that uses YAML for defining configurations, making it human-readable and easy to manage. It operates over SSH, requiring no agents on remote systems. ...

April 2, 2024 · 3 min · 615 words