mcwaddams-site/src/content/docs/explanation/fallbacks.mdx

32 lines
819 B
Text
Raw Normal View History

---
title: Fallback Strategy
description: How mcwaddams tries multiple methods to extract your documents.
---
import { Aside } from '@astrojs/starlight/components';
# Fallback Strategy
> *"We fixed the glitch."*
When the primary extraction method fails, mcwaddams automatically tries alternatives.
## Fallback Chain
| Format | Primary | Fallback |
|--------|---------|----------|
| `.docx` | python-docx | mammoth |
| `.doc` | olefile | textract |
| `.xlsx` | openpyxl | pandas |
| `.xls` | xlrd | pandas |
## The Philosophy
1. **Try the best method first** — Usually works
2. **Fall back gracefully** — Alternative parsers step in
3. **Never silently fail** — Always return content or a clear error
<Aside type="note">
See [Architecture](/explanation/architecture/) for implementation details.
</Aside>