Parses files into text content for ingestion.
Supports multiple file formats including plain text, markdown, and PDF.
PDF Support
PDF parsing is handled by a configurable parser. The default uses
pdftotext from the Poppler library. See Arcana.FileParser.PDF for
implementing custom PDF parsers.
Default Parser (Poppler)
The default PDF parser requires pdftotext to be installed:
# macOS
brew install poppler
# Ubuntu/Debian
apt-get install poppler-utils
# Fedora
dnf install poppler-utilsCustom PDF Parser
Configure a custom parser in config.exs:
config :arcana, pdf_parser: MyApp.PDFParserSee Arcana.FileParser.PDF for the behaviour specification.
Summary
Functions
Parses a file and extracts text content.
Checks if PDF support is available.
Returns list of supported file extensions.
Functions
Parses a file and extracts text content.
Returns {:ok, text} on success, or {:error, reason} on failure.
Checks if PDF support is available.
For the default Poppler parser, this checks if pdftotext is installed.
Custom parsers may have different availability requirements.
Examples
iex> Arcana.Parser.pdf_support_available?()
true # or false if parser not available
Returns list of supported file extensions.