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
|
## Scripts
|
||||||
|
|
||||||
- **av1**: (DEPRECATED - use vcmp instead) Recursively compresses video files to AV1/MP4 format with reduced quality/size
|
- **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
|
- **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
|
- **mover**: Monitors a source directory and moves files with specified extensions to a destination directory
|
||||||
- **pushover**: Sends push notifications via Pushover API
|
- **pushover**: Sends push notifications via Pushover API
|
||||||
- **stats**: HTTP server that provides system statistics (CPU, memory, disk usage, etc.) in JSON format
|
- **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
|
- **vc**: Video converter using ffmpeg and youtube-dl for local files or YouTube URLs
|
||||||
- **vcmp**: Advanced video compression utility with progress tracking and logging
|
- **vcmp**: Advanced video compression utility with progress tracking and logging
|
||||||
|
|
||||||
@@ -28,12 +32,15 @@ source /path/to/repo/scripts/install.sh
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
|
Use the `check` utility to verify script dependencies are installed:
|
||||||
|
```bash
|
||||||
|
check
|
||||||
|
```
|
||||||
|
|
||||||
- ffmpeg
|
- ffmpeg
|
||||||
- imagemagick
|
- imagemagick
|
||||||
- youtube-dl
|
- youtube-dl/yt-dlp
|
||||||
- pushover API tokens
|
- pushover API tokens
|
||||||
- Whatever the relevant script errors about
|
- Python 3.x
|
||||||
|
- Additional Python packages (sqlalchemy, requests)
|
||||||
## Usage
|
- Optional: RPi.GPIO and spidev for e-ink display support
|
||||||
|
|
||||||
Each script includes help documentation accessible via `-h` or `--help` flag. See individual script headers for detailed usage instructions.
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import os
|
|||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import configparser
|
import configparser
|
||||||
import json
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Dict, List, Tuple
|
from typing import Dict, List, Tuple
|
||||||
|
|
||||||
@@ -44,12 +43,27 @@ def check_stats_commands() -> List[Tuple[bool, str]]:
|
|||||||
|
|
||||||
return results
|
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]]]:
|
def check_scripts() -> Dict[str, List[Tuple[bool, str]]]:
|
||||||
"""Run all checks for each script."""
|
"""Run all checks for each script."""
|
||||||
checks = {
|
checks = {
|
||||||
"av1": [
|
"av1": [
|
||||||
check_command("ffmpeg"),
|
check_command("ffmpeg"),
|
||||||
],
|
],
|
||||||
|
"e-ink": [
|
||||||
|
check_command("python3"),
|
||||||
|
],
|
||||||
"indeel": [
|
"indeel": [
|
||||||
check_command("file"),
|
check_command("file"),
|
||||||
check_command("magick"),
|
check_command("magick"),
|
||||||
@@ -63,7 +77,13 @@ def check_scripts() -> Dict[str, List[Tuple[bool, str]]]:
|
|||||||
check_env_var("PUSHOVER_USER_TOKEN"),
|
check_env_var("PUSHOVER_USER_TOKEN"),
|
||||||
check_command("curl"),
|
check_command("curl"),
|
||||||
],
|
],
|
||||||
"stats": check_stats_commands(),
|
"stats": [
|
||||||
|
*check_stats_commands(),
|
||||||
|
],
|
||||||
|
"stats-collector": [
|
||||||
|
check_command("python3"),
|
||||||
|
*check_stats_collector_config(),
|
||||||
|
],
|
||||||
"syncwall": [
|
"syncwall": [
|
||||||
check_command("wget"),
|
check_command("wget"),
|
||||||
check_command("wal"),
|
check_command("wal"),
|
||||||
|
|||||||
Reference in New Issue
Block a user