A client-side web application that analyzes GitHub repositories to extract STL file structures and generates organized JSON catalogs for 3D printing projects.
- 🔍 Repository Analysis: Automatically scans GitHub repositories for STL and STLs folders
- 📁 Hierarchical Structure: Maintains folder hierarchy in the generated JSON
- 🎯 Smart Detection: Finds STL folders at root level and one level deep
- 📋 Copy to Clipboard: Easy JSON export functionality
- 🎨 Modern UI: Clean, responsive interface with loading states
- ⚡ Fast Processing: Efficient GitHub API integration
- Enter a GitHub repository URL (e.g.,
https://github.com/PrintersForAnts/Micron) - Click "Go" to analyze the repository
- The app will:
- Search for STL/STLs folders in the repository
- Recursively scan for STL files and subfolders
- Generate a JSON structure where:
- Keys are folder names
- Values are arrays containing file names and subfolder objects
- Subfolders are represented as objects within the parent folder's array
For a repository with this structure:
STLs/
├── Frame/
│ ├── corner_bracket.stl
│ └── side_panel.stl
├── Electronics/
│ └── fan_mount.stl
└── hotend_mount.stl
The generated JSON would be:
{
"STLs": [
"hotend_mount.stl",
{
"Frame": [
"corner_bracket.stl",
"side_panel.stl"
]
},
{
"Electronics": [
"fan_mount.stl"
]
}
]
}- Python 3 (for local development server) or any HTTP server
- Modern web browser with JavaScript enabled
-
Clone or download this repository
-
Start a local HTTP server:
# Option 1: Using Python (recommended) python3 -m http.server 3000 # Option 2: Using npm script npm start # Option 3: Use any other HTTP server of your choice
-
Open your browser and navigate to
http://localhost:3000
- Client-side only: No backend server required
- Direct GitHub API: Calls GitHub's public API directly from the browser
- CORS-friendly: GitHub API supports cross-origin requests for public repositories
- No authentication needed: Works with public repositories without API keys
- None: Pure client-side JavaScript with no external dependencies
- Fetch API: Built-in browser API for HTTP requests to GitHub
- GitHub API: Direct integration using public endpoints
- Uses GitHub's public API (no authentication required for public repos)
- Direct browser-to-GitHub communication (CORS enabled)
- Handles rate limiting and error responses
- Supports repositories with complex folder structures
- First searches for STL folders in the repository root
- If none found, searches one level deep in subdirectories
- Recursively processes found STL folders to build the complete structure
- Filters for .stl files and STL-related folder names
The application handles various error scenarios:
- Invalid GitHub URLs
- Repository not found (404)
- API rate limiting (403)
- Network connectivity issues
- Empty repositories or no STL files found
MIT License - feel free to use this project for your own 3D printing needs!
Contributions are welcome! Feel free to submit issues, feature requests, or pull requests.
Built for the 3D printing community 🖨️