System dependency checker for PhoenixKit.
Probes for the external programs PhoenixKit shells out to (ImageMagick,
FFmpeg, Poppler); external_tools/0 lists them all. Results are cached
to avoid repeated system calls.
Summary
Functions
Check if FFmpeg is installed and available.
Check if FFmpeg is installed (cached version).
Check if ImageMagick is installed and available.
Check if ImageMagick is installed (cached version).
Check if Poppler (pdftoppm/pdfinfo) is installed and available.
Check if Poppler is installed (cached version).
Clear the dependency check cache.
Every external program PhoenixKit uses, each with its detected status:
{:ok, version} (the bare version number, or the first line of the
version output when no number is found) or {:error, :not_installed}.
Types
Functions
Check if FFmpeg is installed and available.
Returns:
{:ok, version}- FFmpeg is installed with version string{:error, :not_installed}- FFmpeg not found{:error, reason}- Other error occurred
Check if FFmpeg is installed (cached version).
Returns the cached result if available, otherwise probes system.
Check if ImageMagick is installed and available.
Returns:
{:ok, version}- ImageMagick is installed with version string{:error, :not_installed}- ImageMagick not found{:error, reason}- Other error occurred
Check if ImageMagick is installed (cached version).
Returns the cached result if available, otherwise probes system.
Check if Poppler (pdftoppm/pdfinfo) is installed and available.
Returns:
{:ok, version}- Poppler is installed with version string{:error, :not_installed}- Poppler not found{:error, reason}- Other error occurred
Check if Poppler is installed (cached version).
Returns the cached result if available, otherwise probes system.
Clear the dependency check cache.
Useful for testing or when you know system dependencies have changed.
@spec external_tools() :: [tool()]
Every external program PhoenixKit uses, each with its detected status:
{:ok, version} (the bare version number, or the first line of the
version output when no number is found) or {:error, :not_installed}.
Cached like the single checks; clear_cache/0 forces a fresh probe.