========================================================================
BARC Amateur Radio Software Update Checker
Belize Amateur Radio Club (https://barc.bz/software)
========================================================================
v261203

1. OVERVIEW
-----------
This Python script checks the latest available versions of popular amateur
radio software (SmartSDR, WSJT-X, WSJT-Z, JTDX-VU, Fldigi, GridTracker,
N1MM Logger+, Decodium, AetherSDR, Aurora, AutoFT8, SDC, and many more)
against the curated software list maintained by BARC (barc.bz/software)
and optionally compares them with the versions installed on your Windows
10/11 PC.

When running "-local", any program not currently installed on your PC
automatically displays its official download or project URL so you can
install it right away.

When outdated local programs are detected ("-updatelocal"), the script
generates a ready-to-run "download_updates.bat" batch file to download
available Windows installers (.exe / .msi / .zip) and launch them
sequentially upon your confirmation.

No external Python packages are required - it runs using Python's built-in
standard library only.

2. FILES INCLUDED
-----------------
- software.py        Main Python script (rename if desired)
- software.txt       Curated list of amateur radio software & sources
- email.ini          Optional template for download folder, email & GitHub
- README.txt         This instruction file

3. REQUIREMENTS
---------------
- Windows 10 or Windows 11 (for local PC checks and download batch)
- Python 3.8 or newer (https://www.python.org/downloads/)
  (During Python installation, check "Add Python to PATH".)

4. USAGE (COMMAND LINE)
-----------------------
Open Command Prompt (cmd) or PowerShell in the folder containing the files
and run one of the following commands:

  python software.py
      Displays this help and all available command-line options.

  python software.py -updatelocal -nomail
      Recommended for checking your own PC: lists only the programs
      installed on your PC that have a newer version available, creates
      "download_updates.bat", and asks if you want to run it right away.

  python software.py -updatelocal -noinput
      Recommended for Windows Task Scheduler: checks your PC, creates
      "download_updates.bat", sends the email report, and exits cleanly
      without waiting for keyboard input.

  python software.py -local -nomail
      Shows all listed programs along with the version currently installed
      on your Windows PC, and displays direct download/website links for
      any software not yet installed.

  python software.py -all -nomail
      Fetches and displays the complete current online status of all
      programs in software.txt.

  python software.py -update -nomail
      Checks online sources and displays only newly released updates.

5. AUTOMATIC DOWNLOAD & INSTALL BATCH (-updatelocal)
----------------------------------------------------
Whenever "-updatelocal" finds outdated software on your PC, it creates
"download_updates.bat" (in your configured download folder or the current
script directory):

- Direct Windows installers (.exe / .msi) and archives (.zip) are
  downloaded automatically via Windows built-in curl.exe.
- If a developer only provides a web download page (no direct file link),
  the batch script automatically opens that download page in your browser.
- Once all downloads complete, you are prompted "Install now? [Y/J/N]:".
  Pressing "Y" or "J" verifies each downloaded file:
  * Standard installers (.exe / .msi) are launched one by one.
  * ZIP archives (.zip) open in your default archive manager.
  * Standalone portable executables (marked with "| portable" in
    software.txt or containing "portable" in the filename) are highlighted
    directly in Windows Explorer so you can copy them to your folder
    without blocking the batch script.
- Note: When running via Windows Task Scheduler, pass "-noinput" (or run
  with "pythonw.exe") so the script creates "download_updates.bat" and
  exits immediately without waiting for any interactive prompt.

6. CUSTOMIZING LOCAL PATHS & PORTABLE APPS (software.txt)
---------------------------------------------------------
Standard Windows installers are detected automatically via the Windows
Registry and Start Menu.

If you use portable / ZIP-extracted software (such as WSJT-X, WSJT-Z,
JTDX-VU, or FT8FLOW) or user-profile installations (such as AutoFT8), you
can specify or adjust the file path at the end of the corresponding line
in "software.txt" (including Windows environment variables like %USERNAME%):

  github | WSJT-X  | 3.3.0-beta8 | WSJTX/wsjtx | C:\wsjt\wsjtx\bin\wsjtx.exe
  web    | AutoFT8 | 1.1.18      | https://autoft8.com | New\s+Version\s+(\d+\.\d+\.\d+) | C:\Users\%USERNAME%\AppData\Local\Programs\Hamilton Auto FT8\Hamilton Auto FT8.exe

For standalone portable .exe apps without an installer (such as OpsLog or
Ferrite), append "| portable" at the end of the line so the batch script
opens Windows Explorer with the downloaded file selected instead of
launching it as a setup:

  github | Opslog  | 0.51.64 | GregTroar/OpsLog | C:\opslog.0.51.64\OpsLog.exe | portable


7. OPTIONAL: DOWNLOAD FOLDER, EMAIL ALERTS & GITHUB TOKEN
---------------------------------------------------------
By default, downloads are saved in the script directory and results are
printed to the console without sending emails. To customize this:

1. Rename "email.ini.example" to "email.ini".
2. Optional: Set your preferred download directory under [DOWNLOAD]:
     [DOWNLOAD]
     path = C:\Downloads\HamSoftware
3. Optional: Enter your SMTP server, port (587 or 465), sender, password,
   and receiver address(es) under [SMTP] for automated email alerts.
   You can send reports to multiple recipients by separating the email
   addresses with commas (e.g., receiver = user1@example.com, user2@example.com).
4. Optional: Add a free GitHub Personal Access Token under [GITHUB] to
   increase the GitHub API rate limit from 60 to 5,000 requests per hour.
5. Run the script without the "-nomail" flag to enable email delivery.

8. DISCLAIMER
-------------
Provided free of charge by the Belize Amateur Radio Club (BARC) for the
amateur radio community. Always download software updates from the official
developer repositories and websites listed in software.txt.
========================================================================
