This document demonstrates how SmartOrderReader processes invoice images.
ACME Corporation
Invoice #: INV-2024-001
Invoice Date: January 15, 2024
Bill To: John Doe
Amount: $250.00
XYZ Company
Order Number: ORD_2024.567/A
Order Date: 2024-03-20
Customer: Jane Smith
Total: $1,500.00
ABC Services
Order: 12345ABC
Date: 12/25/2023
Service: Premium Support
Cost: $99.99
When processing these invoices, SmartOrderReader would extract:
+-------------------+-------------------+------------------+
| Image File Name | Order Number | Order Date |
+===================+===================+==================+
| invoice1.jpg | INV-2024-001 | January 15, 2024 |
+-------------------+-------------------+------------------+
| invoice2.png | ORD_2024.567/A | 2024-03-20 |
+-------------------+-------------------+------------------+
| invoice3.jpg | 12345ABC | 12/25/2023 |
+-------------------+-------------------+------------------+
Image File Name,Order Number,Order Date
invoice1.jpg,INV-2024-001,January 15, 2024
invoice2.png,ORD_2024.567/A,2024-03-20
invoice3.jpg,12345ABC,12/25/2023
python order_reader.py invoice1.jpg invoice2.png invoice3.jpgpython order_reader.py *.jpg --output my_invoices.csvpython order_reader.py urdu_invoice.png --lang eng+urd- Multiple Order Number Formats: INV-2024-001, ORD_2024.567/A, 12345ABC
- Multiple Date Formats: January 15, 2024 (full month), 2024-03-20 (ISO), 12/25/2023 (slash)
- Case Preservation: Order numbers maintain their original case
- Special Characters: Support for underscores, dots, slashes in order numbers
- Clean Output: Both table and CSV formats for easy viewing and import
- Batch Processing: Process multiple images in one command
Run the test suite to verify all functionality:
python test_order_reader.pyAll 30 tests should pass, covering:
- Order number extraction patterns
- Date extraction patterns
- Output formatting
- Edge cases and error handling
- Special character support
- Case preservation