File Types

Hister can index local files from configured directories and from explicit imports. Directory indexing is controlled by the indexer.directories configuration.

Local File Indexing

File typeExtensionsIndexed contentTitle source
PDF.pdfExtracted plain text from all readable pages.File path fallback
DOCX.docxParagraph text.DOCX metadata title when present, otherwise file path fallback
Markdown.md, .markdownRendered Markdown text.First H1 heading when present, otherwise file path fallback
Org mode.orgRendered Org text.Org TITLE value when present, otherwise file path fallback
Plain textAny file with valid UTF 8 textFull file contents.File path fallback

Files that do not match a specialized handler are treated as plain text. Binary files are skipped.

Directory Filters

The filetypes setting on a watched directory is an extension filter. Use names without the leading dot.

indexer:
  directories:
    - path: '~/Documents'
      filetypes: ['pdf', 'docx', 'md', 'txt']

If filetypes is omitted, Hister considers every file that passes the other directory rules. Specialized handlers run first, then valid UTF 8 text files are indexed as plain text.

Other directory rules still apply:

RuleBehavior
include_hiddenHidden files and directories are skipped unless this is enabled.
excludesMatching paths are skipped.
patternsWhen set, only matching files are considered.
indexer.max_file_size_mbFiles above the configured size limit are skipped.
sensitive_content_patternsMatching files are rejected unless the indexing path explicitly allows sensitive content.

Import Formats

The hister import command accepts these file formats:

File typeExtensionsBehavior
Hister JSON export.jsonImports documents previously written by hister export.
7z archive.7zImports a compressed Hister JSON export.
Saved HTML page.html, .htmExtracts the original page URL from HTML metadata and indexes the page.

When importing a directory, Hister reads matching .json, .7z, .html, and .htm files directly inside that directory in filename order.