Install
openclaw skills install dbf-processorProcess DBF (dBase) files - read, write, convert to CSV/Excel, filter/query data, validate structure, and edit/append records. Use this when users mention DBF files, dBase, FoxPro, or need to work with .dbf files.
openclaw skills install dbf-processorProcess DBF (dBase/FoxPro) files with comprehensive read/write capabilities.
Install required Python packages:
pip install dbfread dbf pandas openpyxl
All executable code is located in the scripts/ directory:
| Script | Purpose |
|---|---|
read_dbf.py | Read and display DBF file metadata and sample records |
dbf_to_csv.py | Convert DBF file to CSV format |
dbf_to_excel.py | Convert DBF file to Excel format |
filter_dbf.py | Filter and query records from a DBF file |
validate_dbf.py | Validate DBF file structure and integrity |
create_dbf.py | Create a new DBF file with specified structure |
edit_dbf.py | Edit existing records or append new ones |
security_utils.py | Security utilities for safe file handling |
Input: User asks to read or inspect a DBF file Action:
scripts/read_dbf.py scriptExample:
python scripts/read_dbf.py path/to/file.dbf utf-8 5
Input: User wants to convert DBF to CSV
Action: Use scripts/dbf_to_csv.py
Example:
python scripts/dbf_to_csv.py input.dbf output.csv utf-8
Input: User wants to convert DBF to Excel
Action: Use scripts/dbf_to_excel.py
Example:
python scripts/dbf_to_excel.py input.dbf output.xlsx utf-8
Input: User wants to filter or query specific records
Action: Use scripts/filter_dbf.py
Example:
# Equals comparison
python scripts/filter_dbf.py data.dbf STATUS ACTIVE equals utf-8
# Contains comparison
python scripts/filter_dbf.py data.dbf NAME "John" contains utf-8
Input: User wants to check DBF file integrity or schema
Action: Use scripts/validate_dbf.py
Example:
python scripts/validate_dbf.py file.dbf utf-8
Input: User wants to create a new DBF file or write data
Action: Use scripts/create_dbf.py
Example:
python scripts/create_dbf.py output.dbf 'NAME C(50)' 'AGE N(3,0)' 'EMAIL C(100)' 'ACTIVE L'
Input: User wants to modify existing records or add new ones
Action: Use scripts/edit_dbf.py
Example:
# Append a single record
python scripts/edit_dbf.py existing.dbf append "New Name" 30 "email@example.com" True
# Append from JSON file
python scripts/edit_dbf.py existing.dbf append_json records.json
DBF files often use specific encodings. Common encodings to try:
'utf-8' - Standard UTF-8'latin-1' - Western European'cp1252' - Windows Latin-1'gbk' - Chinese simplified'cp850' - DOS Latin-1If you encounter encoding errors, try different encodings.
When working with DBF files, always follow these security guidelines:
security_utils.py for safe file path handlingexec() or eval() with data from DBF filesSee scripts/security_utils.py for security utilities and examples.
When the user asks about DBF files:
scripts/ directory