Skip to content

Commit 273cbb0

Browse files
committed
site fix
1 parent 52abc91 commit 273cbb0

File tree

12 files changed

+2287
-1081
lines changed

12 files changed

+2287
-1081
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,112 @@
1414
**[View the interactive showcase website β†’](https://bigBrodyG.github.io/JavaProjects/)**
1515

1616
All projects are automatically compiled and run with each commit. The website displays source code, build status, and program output.
17+
18+
---
19+
20+
## πŸš€ Automatic Documentation Generator
21+
22+
This repository includes an **automatic documentation generator** that scans all Java projects and creates a beautiful interactive showcase website.
23+
24+
### ✨ Features
25+
26+
- πŸ” **Auto-discovery**: Automatically finds all Java projects in the workspace
27+
- πŸ—οΈ **Auto-compilation**: Compiles and runs each project to capture output
28+
- πŸ“ **HTML Generation**: Creates individual interactive pages for each project
29+
- 🎨 **Beautiful UI**: Modern dark theme with syntax highlighting
30+
- ▢️ **Run in Browser**: Execute code with animated output display
31+
- πŸ“Š **Index Page**: Auto-generated overview of all projects
32+
33+
### 🎯 How It Works
34+
35+
#### When you create a new Java project:
36+
37+
1. Create a new directory (e.g., `MyNewProject/`)
38+
2. Add the standard structure:
39+
```
40+
MyNewProject/
41+
β”œβ”€β”€ src/
42+
β”‚ └── MyNewProject.java (with main method)
43+
β”œβ”€β”€ bin/
44+
└── lib/
45+
```
46+
47+
3. Run the generator:
48+
```bash
49+
./generate-docs.py
50+
```
51+
or
52+
```bash
53+
python3 generate-docs.py
54+
```
55+
56+
4. **That's it!** Your project is automatically:
57+
- βœ… Compiled and tested
58+
- βœ… Added to the website with its own page
59+
- βœ… Listed on the index page
60+
- βœ… Output captured and displayed
61+
62+
### πŸ“ Project Structure
63+
64+
Each Java project should follow this structure:
65+
66+
```
67+
ProjectName/
68+
β”œβ”€β”€ src/ # Source files
69+
β”‚ └── *.java # Your Java files (one must have main method)
70+
β”œβ”€β”€ bin/ # Compiled classes (auto-generated)
71+
β”œβ”€β”€ lib/ # External libraries (optional)
72+
└── README.md # Project documentation (optional)
73+
```
74+
75+
### 🎨 Project Types
76+
77+
The generator automatically categorizes projects:
78+
79+
- **πŸ“š Teoria (Theory)**: Basic concepts, classes (e.g., Cerchio, Punto, Rettangolo, Libro)
80+
- **πŸ”¬ Laboratorio (Lab)**: Practical exercises (e.g., mergeArray, vocalcount, OggettoCD)
81+
82+
### πŸ”§ Manual Customization
83+
84+
If you want to customize project descriptions or types, edit the script:
85+
86+
```python
87+
# In generate-docs.py
88+
89+
def generate_project_description(project: Dict) -> str:
90+
descriptions = {
91+
'yourproject': 'Your custom description here',
92+
# Add more...
93+
}
94+
```
95+
96+
### πŸ“¦ Generated Files
97+
98+
After running the generator, you'll find in `docs/`:
99+
100+
```
101+
docs/
102+
β”œβ”€β”€ index.html # Main showcase page
103+
β”œβ”€β”€ projectname.html # Individual project page
104+
β”œβ”€β”€ projectname-output.txt # Captured output
105+
└── ...
106+
```
107+
108+
### 🌐 View the Showcase
109+
110+
Open `docs/index.html` in your browser to see all your projects!
111+
112+
### πŸ› οΈ Requirements
113+
114+
- Python 3.6+
115+
- Java JDK (javac and java commands available)
116+
- No additional Python packages required (uses only standard library)
117+
118+
### πŸ’‘ Quick Start
119+
120+
1. Create a new Java project in the workspace
121+
2. Run `./generate-docs.py`
122+
3. Open `docs/index.html` in browser
123+
4. Enjoy! πŸŽ‰
124+
125+
---

0 commit comments

Comments
Β (0)