A WordPress child theme built on the Astra theme, designed for a service that generates and manages table forms based on XLSX files. Includes tools for preparing XLSX templates, multilingual support, and an AI-powered chat assistant integration.
- XLSX Template Processing: Convert XLSX files into web-ready formats.
- Multilingual Support: Tools for translating form templates.
- AI Chat Integration: OpenAI-based assistant for user interaction.
- Testing Environment: Flask implementation for local testing.
- Customizable: Built with PHP, JavaScript, HTML, and CSS for easy modifications.
- Prerequisites:
- WordPress installed with the Astra Theme activated.
- PHP 7.4+ .
- Install the Child Theme:
- Upload the
astra-childfolder towp-content/themes/. - Activate the Astra Child theme via WordPress Admin > Appearance > Themes.
- Upload the
- Dependencies:
- Install Python 3.11+ and required libraries (see
requirements.txtfor tools). - For AI integration: Obtain an OpenAI API key.
- Install Python 3.11+ and required libraries (see
- Automated Setup:
- Run
Prepare_xlsx.py(requires Python):python Prepare_xlsx.py --input /path/to/xlsx_files --output ./processed_templates
- Run
- Manual XLSX Processing:
xlsx_to_csv.py: Converts XLSX to CSV.xlsx_csv_to_json.py: Converts XLSX or CSV to JSON(alternative).translate_xlsx.py: Add columns for another languages in xlsx.data_process: Parser for csv made from xlsx.
- Configure your OpenAI API key in
ai.py:OPENAI = "your-api-key-here" # use a .env file
- Run the AI chat module:
python ai.py
A lightweight Flask app is included for form rendering tests:
- Install Flask:
pip install flask
- Run:
flask --app flask_app.py run
- Access forms at
http://localhost:5000.
- Styles: Modify
style.cssor import SCSS files. - Functionality: Extend PHP classes in
inc/. - Templates: Override Astra parent theme files as needed.
This project is not affiliated with Astra or OpenAI. Use third-party tools at your own risk.