A full-stack application to extract source code from Odoo 18 addons on GitHub.
- 🎨 Modern UI - Beautiful dark mode interface with vibrant gradients and smooth animations
- 📁 Folder Extraction - Extract all files from an Odoo addon folder
- 📄 Specific Files - Extract specific files by path (supports multiple files)
- 🔍 Smart Filtering - Automatically filters for relevant files (
.py,.csv,.xml,.js,.scss) - 📊 Results Table - Display extracted code in a clean, organized table
- 💾 Export Options - Export results to CSV or JSON format
- 📈 Statistics - View total files, characters, and lines extracted
- ✅ Verified - Includes test scripts to ensure reliability
- React 19 with TypeScript
- Vite for fast development
- Axios for API calls
- Lucide React for icons
- Modern CSS with custom design system
- Python 3.9+
- FastAPI for REST API
- BeautifulSoup4 for web scraping
- Requests for HTTP calls
- Pydantic for data validation
cd odoo-code-extractor
npm install
npm run devThe frontend will run on http://localhost:5173
cd backend
pip install -r requirements.txt
uvicorn main:app --reload --port 8000The backend will run on http://localhost:8000
API documentation available at http://localhost:8000/docs
To verify the extraction and filtering logic, you can run the included test script:
# Make sure the backend server is running first
python test_filtering.pyThis script verifies that only files with allowed extensions (.py, .csv, .xml, .js, .scss) are extracted.
- Start both frontend and backend servers
- Open the frontend in your browser
- Enter an Odoo addon folder name (e.g.,
account,sale,stock) - Optionally add specific file paths to extract
- Click "Extract Code"
- View results in the table
- Export to CSV or JSON if needed
Folder Path: account
This will extract all files from the account addon.
File Paths:
models/account_move.py__init__.py__manifest__.py
This will extract only the specified files from the account addon.
Extract code from Odoo repository.
Request Body:
{
"folderPath": "account",
"filePaths": ["models/account_move.py", "__init__.py"]
}Response:
{
"success": true,
"data": [
{
"folderName": "account",
"path": "/addons/account/models/account_move.py",
"fileName": "account_move.py",
"code": "# file content here..."
}
]
}MIT