Skip to content

Commit b0af925

Browse files
committed
gasa clean up
1 parent 0185314 commit b0af925

20 files changed

Lines changed: 279 additions & 6712 deletions

β€Ž.github/scripts/README.mdβ€Ž

Lines changed: 41 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,63 @@
1-
# πŸ€– Java Projects Site Automation
1+
# πŸ€– Java Projects Automation
22

3-
This directory contains scripts to automatically build and maintain the Java projects showcase website.
3+
This repository automatically builds and showcases Java projects on GitHub Pages.
44

5-
## πŸ“ Scripts Overview
5+
## οΏ½ How It Works
66

7-
### 1. `generate-site.py` - Main Site Generator
8-
Generates the complete static website with all project pages.
7+
When you push to the `main` branch, GitHub Actions automatically:
98

10-
**Usage:**
9+
1. **Detects** all Java projects (any folder with a `src/` directory containing `.java` files)
10+
2. **Compiles** each project using `javac`
11+
3. **Runs** the compiled programs and captures their output
12+
4. **Generates** a beautiful HTML showcase website
13+
5. **Deploys** to GitHub Pages automatically
14+
15+
## ✨ Adding a New Project
16+
17+
Simply create a new folder with your project:
18+
19+
```
20+
YourProject/
21+
β”œβ”€β”€ src/
22+
β”‚ β”œβ”€β”€ MainClass.java
23+
β”‚ └── OtherClasses.java
24+
└── README.md (optional)
25+
```
26+
27+
Then commit and push:
1128
```bash
12-
cd /path/to/JavaProjects
13-
python3 .github/scripts/generate-site.py
29+
git add .
30+
git commit -m "Add new project: YourProject"
31+
git push
1432
```
1533

16-
**What it does:**
17-
- Reads project configurations from the `projects` list
18-
- Generates individual HTML pages for each project
19-
- Creates an index page with project cards
20-
- Applies consistent styling and interactive features
34+
**That's it!** GitHub Actions handles everything automatically.
2135

22-
### 2. `auto-add-project.py` - Automatic Project Detection πŸ†•
23-
**The smart way!** Automatically detects new Java projects and adds them to the website.
36+
## πŸ› οΈ Local Scripts
37+
38+
### 1. `generate-site.py` - Site Generator
39+
Generates the complete static website with all project pages.
2440

2541
**Usage:**
2642
```bash
27-
# From project root
28-
python3 .github/scripts/auto-add-project.py
29-
30-
# Or use the convenient wrapper
31-
.github/scripts/auto-add.fish
43+
python3 .github/scripts/generate-site.py
3244
```
3345

34-
**What it does:**
35-
1. πŸ” Scans the workspace for Java projects (directories with `src/` folders)
36-
2. πŸ“‹ Compares with existing projects already in the website
37-
3. βš™οΈ Compiles and runs each new project
38-
4. πŸ“€ Captures the output
39-
5. πŸ’Ύ Saves output and compile logs to `docs/`
40-
6. πŸ“ Adds project configuration to `generate-site.py`
41-
7. πŸ”„ Regenerates the entire website
42-
8. ✨ Done! Your new project is live on the site
43-
44-
**Interactive prompts:**
45-
- Asks whether each project is `teoria` or `laboratorio`
46-
- Shows compilation output and any errors
47-
- Provides clear feedback at each step
48-
49-
### 3. `auto-add.fish` - Convenient Wrapper
50-
A fish shell wrapper that makes running the auto-add script even easier.
46+
### 2. `auto-add-project.py` - Local Project Detection (Optional)
47+
For testing locally before pushing. Automatically detects new projects and adds them.
5148

5249
**Usage:**
5350
```bash
54-
# From anywhere in the project
55-
./.github/scripts/auto-add.fish
51+
python3 .github/scripts/auto-add-project.py
5652
```
5753

58-
## 🎯 Quick Start Guide
59-
60-
### Adding a New Project Automatically
61-
62-
1. **Create your Java project** with this structure:
63-
```
64-
MyNewProject/
65-
β”œβ”€β”€ src/
66-
β”‚ β”œβ”€β”€ MyClass.java
67-
β”‚ └── TestMyClass.java (with main method)
68-
β”œβ”€β”€ bin/
69-
└── lib/
70-
```
71-
72-
2. **Run the auto-add script:**
73-
```bash
74-
cd JavaProjects
75-
python3 .github/scripts/auto-add-project.py
76-
```
77-
78-
3. **Follow the prompts:**
79-
- The script will detect your new project
80-
- It will compile and run it
81-
- You'll be asked if it's `teoria` or `laboratorio`
82-
- The website will be automatically regenerated
54+
**What it does:**
55+
1. πŸ” Scans for Java projects
56+
2. βš™οΈ Compiles and runs each new project
57+
3. πŸ“ Adds project configuration to `generate-site.py`
58+
4. πŸ”„ Regenerates the website
8359

84-
4. **That's it!** πŸŽ‰
85-
- Your project page is at `docs/mynewproject.html`
86-
- It's added to the index page
87-
- Output is saved to `docs/mynewproject-output.txt`
60+
**Note:** This is mainly for local testing. The GitHub workflow handles everything automatically when you push.
8861

8962
## πŸ“¦ Project Structure Requirements
9063

β€Ž.github/scripts/aliases.fishβ€Ž

Lines changed: 0 additions & 43 deletions
This file was deleted.

β€Ž.github/scripts/auto-add.fishβ€Ž

Lines changed: 0 additions & 11 deletions
This file was deleted.

β€Ž.github/scripts/auto-add.shβ€Ž

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
Β (0)