update readme and check
This commit is contained in:
@@ -7,10 +7,14 @@ While created for my own use, they are shared here in case others find them usef
|
||||
## Scripts
|
||||
|
||||
- **av1**: (DEPRECATED - use vcmp instead) Recursively compresses video files to AV1/MP4 format with reduced quality/size
|
||||
- **check**: Validates script dependencies and configuration
|
||||
- **e-ink**: Display handler for e-ink displays with image cycling support
|
||||
- **indeel**: File organization tool that watches a directory and sorts incoming files based on content hashes
|
||||
- **mover**: Monitors a source directory and moves files with specified extensions to a destination directory
|
||||
- **pushover**: Sends push notifications via Pushover API
|
||||
- **stats**: HTTP server that provides system statistics (CPU, memory, disk usage, etc.) in JSON format
|
||||
- **stats-collector**: Collects and stores system statistics from multiple hosts
|
||||
- **syncwall**: Downloads and sets wallpaper with pywal integration
|
||||
- **vc**: Video converter using ffmpeg and youtube-dl for local files or YouTube URLs
|
||||
- **vcmp**: Advanced video compression utility with progress tracking and logging
|
||||
|
||||
@@ -28,12 +32,15 @@ source /path/to/repo/scripts/install.sh
|
||||
|
||||
## Requirements
|
||||
|
||||
Use the `check` utility to verify script dependencies are installed:
|
||||
```bash
|
||||
check
|
||||
```
|
||||
|
||||
- ffmpeg
|
||||
- imagemagick
|
||||
- youtube-dl
|
||||
- youtube-dl/yt-dlp
|
||||
- pushover API tokens
|
||||
- Whatever the relevant script errors about
|
||||
|
||||
## Usage
|
||||
|
||||
Each script includes help documentation accessible via `-h` or `--help` flag. See individual script headers for detailed usage instructions.
|
||||
- Python 3.x
|
||||
- Additional Python packages (sqlalchemy, requests)
|
||||
- Optional: RPi.GPIO and spidev for e-ink display support
|
||||
|
||||
@@ -5,7 +5,6 @@ import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import configparser
|
||||
import json
|
||||
from pathlib import Path
|
||||
from typing import Dict, List, Tuple
|
||||
|
||||
@@ -44,12 +43,27 @@ def check_stats_commands() -> List[Tuple[bool, str]]:
|
||||
|
||||
return results
|
||||
|
||||
def check_stats_collector_config() -> List[Tuple[bool, str]]:
|
||||
"""Check if stats collector config exists."""
|
||||
results = []
|
||||
config_home = os.environ.get("XDG_CONFIG_HOME", os.path.expanduser("~/.config"))
|
||||
config_path = Path(config_home) / "stats-collector/config.ini"
|
||||
|
||||
if config_path.exists():
|
||||
results.append((True, "Stats collector config found"))
|
||||
else:
|
||||
results.append((False, f"Stats collector config not found at {config_path}"))
|
||||
return results
|
||||
|
||||
def check_scripts() -> Dict[str, List[Tuple[bool, str]]]:
|
||||
"""Run all checks for each script."""
|
||||
checks = {
|
||||
"av1": [
|
||||
check_command("ffmpeg"),
|
||||
],
|
||||
"e-ink": [
|
||||
check_command("python3"),
|
||||
],
|
||||
"indeel": [
|
||||
check_command("file"),
|
||||
check_command("magick"),
|
||||
@@ -63,7 +77,13 @@ def check_scripts() -> Dict[str, List[Tuple[bool, str]]]:
|
||||
check_env_var("PUSHOVER_USER_TOKEN"),
|
||||
check_command("curl"),
|
||||
],
|
||||
"stats": check_stats_commands(),
|
||||
"stats": [
|
||||
*check_stats_commands(),
|
||||
],
|
||||
"stats-collector": [
|
||||
check_command("python3"),
|
||||
*check_stats_collector_config(),
|
||||
],
|
||||
"syncwall": [
|
||||
check_command("wget"),
|
||||
check_command("wal"),
|
||||
|
||||
Reference in New Issue
Block a user