README: Українська
These scripts automate the reception, processing, and publication of images from NOAA satellites (18, 19) using predict, rtl_fm, sox, noaa-apt, ImageMagick, and the Mastodon API via Python.
$HOME/
├── get_tle.sh # Download TLE data for weather satellites
├── noaa_scheduler.sh # Schedule recording, processing, and image publishing
├── process_image.sh # Convert audio file to image
├── post_image.sh # Wrapper for poster.py
├── move_processed_files.sh # Move processed files
|
├── Recordings/ # Directory for processed audio files
├── Pictures/ # Directory for processed images
|
├── noaa-apt/ # Binary and resources for noaa-apt image decoder
│ └── noaa-apt # Binary file for noaa-apt image decoder
│ └── res/ # Resources for noaa-apt image decoder
|
└── python-mastodon/
└── poster.py # Python script for posting images to Mastodon
Fetches TLE data for NOAA satellites.
bash get_tle.shIdentifies the best pass of NOAA 18 or NOAA 19 and uses at to schedule:
- signal recording (
rtl_fm+sox) - processing (
process_image.sh) - publishing (
post_image.sh)
bash noaa_scheduler.sh- Decodes image using
noaa-apt - Converts PNG to JPG and deletes the PNG
- Activates Python
venv - Runs
poster.py
- Moves processed files:
.wavto~/Recordings.jpgto~/Pictures
Required packages:
predictrtl_fm(RTL-SDR)soxnoaa-aptimagemagickatwget- Python 3 +
venv+Mastodon.py
# Update TLE data
bash get_tle.sh
# Schedule recording, processing, and image publishing
bash noaa_scheduler.sh0 5 * * * bash /home/ctl/noaa_scheduler.sh
0 3 */2 * * bash /home/ctl/get_tle.shIn this case, get_tle.sh runs every 2 days at 3 AM.
noaa_scheduler.sh runs daily at 5 AM.
- Jobs are scheduled via
at. Ensure the atd service is active:sudo systemctl enable atd && sudo systemctl start atd - Scripts are located in the
$HOMEdirectory - Scripts operate in
~/noaa-apt/and~/python-mastodon/
За допомогою цих скриптів можна автоматизувати прийом, обробку та публікацію зображень з супутників NOAA (18, 19), використовуючи predict, rtl_fm, sox, noaa-apt, ImageMagick, та Mastodon API через Python.
$HOME/
├── get_tle.sh # Завантаження TLE для погодних супутників
├── noaa_scheduler.sh # Планування запису, обробки, та публікації зображення
├── process_image.sh # Обробка аудіофайлу в зображення
├── post_image.sh # Враппер для poster.py
├── move_processed_files.sh # Переміщення оброблених файлів
|
├── Recordings/ # Директорія для оброблених аудіофайлів
├── Pictures/ # Директорія для оброблених зображень
|
├── noaa-apt/ # Бінарник і ресурси noaa-apt image decoder
│ └── noaa-apt # Бінарний файл noaa-apt image decoder
│ └── res/ # Ресурси noaa-apt image decoder
|
└── python-mastodon/
└── poster.py # Python-скрипт для публікації зображень у Mastodon
Отримує TLE-дані для супутників NOAA.
bash get_tle.shВизначає кращий прохід NOAA 18 або NOAA 19, та через at планує:
- запис сигналу (
rtl_fm+sox) - обробку (
process_image.sh) - публікацію (
post_image.sh)
bash noaa_scheduler.sh- Декодує зображення через
noaa-apt - Конвертує PNG у JPG, та видаляє PNG
- Активує Python
venv - Запускає
poster.py
- Переміщує оброблені файли:
.wavу~/Recordings.jpgу~/Pictures
Потрібні пакети:
predictrtl_fm(RTL-SDR)soxnoaa-aptimagemagickatwget- Python 3 +
venv+Mastodon.py
# Оновлення TLE
bash get_tle.sh
# Планування запису, обробки, та публікації зображення
bash noaa_scheduler.sh0 5 * * * bash /home/ctl/noaa_scheduler.sh
0 3 */2 * * bash /home/ctl/get_tle.shВ даному випадку get_tle.sh запускається кожні 2 дня о третій ночі.
noaa_scheduler.sh запускається кожний день о п'ятій ранку.
- Завдання плануються через
at. Необхідно активувати сервіс atd:sudo systemctl enable atd && sudo systemctl start atd - Скрипти знаходяться у
$HOMEдиректорії - Скрипти працюють в
~/noaa-apt/та~/python-mastodon/