Tool als pip-Paket.
This commit is contained in:
parent
5a43b5129c
commit
950bcf516c
28
README.md
28
README.md
@ -3,14 +3,20 @@
|
||||
GitHub Classroom Ersatz für selbst-gehostete Gitea-Instanzen.
|
||||
Unterstützt **Einzel-Assignments** (ein Repo pro Student) und **Gruppen-Assignments** (ein Repo pro Gruppe mit eigenem Gitea-Team).
|
||||
|
||||
**Hinweis:** Dieses Tool wurde durch KI erstellt.
|
||||
**Hinweis:** Dieses Tool wurde mit KI erstellt.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
python -m venv venv
|
||||
source venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
pip install gitea-classroom
|
||||
```
|
||||
|
||||
Oder lokal aus dem Quellcode:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/…/gitea-classroom
|
||||
cd gitea-classroom
|
||||
pip install -e .
|
||||
```
|
||||
|
||||
## Konfiguration
|
||||
@ -61,7 +67,7 @@ Gruppenname (`group`) wird Teil des Repo-Namens: `proj01-team-a`
|
||||
### `add-students` — Studenten zur Organisation hinzufügen
|
||||
|
||||
```bash
|
||||
python classroom.py add-students --org info2-ss25 --csv students.csv
|
||||
gitea-classroom add-students --org info2-ss25 --csv students.csv
|
||||
```
|
||||
|
||||
Fügt alle Nutzer aus der CSV dem `students`-Team der Org hinzu.
|
||||
@ -72,7 +78,7 @@ Die Gitea-Accounts müssen vorher existieren.
|
||||
### `create-assignment` — Einzel-Assignment erstellen
|
||||
|
||||
```bash
|
||||
python classroom.py create-assignment \
|
||||
gitea-classroom create-assignment \
|
||||
--org info2-ss25 \
|
||||
--assignment ueb01 \
|
||||
--template uebung01-template \
|
||||
@ -105,7 +111,7 @@ info2-ss25/
|
||||
### `create-group-assignment` — Gruppen-Assignment erstellen
|
||||
|
||||
```bash
|
||||
python classroom.py create-group-assignment \
|
||||
gitea-classroom create-group-assignment \
|
||||
--org info2-ss25 \
|
||||
--assignment proj01 \
|
||||
--template projekt-template \
|
||||
@ -138,7 +144,7 @@ info2-ss25/
|
||||
### `list-submissions` — Abgaben einsehen (Übersicht)
|
||||
|
||||
```bash
|
||||
python classroom.py list-submissions --org info2-ss25 --assignment ueb01
|
||||
gitea-classroom list-submissions --org info2-ss25 --assignment ueb01
|
||||
```
|
||||
|
||||
Zeigt den letzten Commit je Repo in einer kompakten Tabelle.
|
||||
@ -149,7 +155,7 @@ Funktioniert für Einzel- und Gruppen-Assignments.
|
||||
### `list-group-submissions` — Abgaben einsehen (Detailansicht)
|
||||
|
||||
```bash
|
||||
python classroom.py list-group-submissions --org info2-ss25 --assignment proj01
|
||||
gitea-classroom list-group-submissions --org info2-ss25 --assignment proj01
|
||||
```
|
||||
|
||||
Zeigt die letzten 5 Commits je Gruppen-Repo.
|
||||
@ -159,7 +165,7 @@ Zeigt die letzten 5 Commits je Gruppen-Repo.
|
||||
### `clone-submissions` — Abgaben lokal klonen
|
||||
|
||||
```bash
|
||||
python classroom.py clone-submissions \
|
||||
gitea-classroom clone-submissions \
|
||||
--org info2-ss25 \
|
||||
--assignment ueb01 \
|
||||
--dir ./abgaben
|
||||
@ -179,7 +185,7 @@ Bei erneutem Aufruf wird `git pull` auf bereits geklonte Repos ausgeführt.
|
||||
### `delete-assignment` — Assignment löschen
|
||||
|
||||
```bash
|
||||
python classroom.py delete-assignment --org info2-ss25 --assignment ueb01
|
||||
gitea-classroom delete-assignment --org info2-ss25 --assignment ueb01
|
||||
```
|
||||
|
||||
Löscht alle Repos und die zugehörigen Gruppen-Teams des Assignments.
|
||||
|
||||
1
gitea_classroom/__init__.py
Normal file
1
gitea_classroom/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
__version__ = "0.1.0"
|
||||
@ -2,29 +2,18 @@
|
||||
"""
|
||||
gitea-classroom — GitHub Classroom Ersatz für Gitea
|
||||
====================================================
|
||||
Voraussetzungen:
|
||||
pip install py-gitea requests
|
||||
|
||||
Konfiguration:
|
||||
Umgebungsvariablen setzen oder Werte unten direkt eintragen.
|
||||
export GITEA_URL="https://gitea.meine-uni.de"
|
||||
export GITEA_TOKEN="dein_api_token"
|
||||
|
||||
Befehle (Einzel-Assignments):
|
||||
python classroom.py add-students --org MeinKurs --csv students.csv
|
||||
python classroom.py create-assignment --org MeinKurs --assignment ueb01 --template uebung01-template --csv students.csv
|
||||
python classroom.py list-submissions --org MeinKurs --assignment ueb01
|
||||
python classroom.py delete-assignment --org MeinKurs --assignment ueb01
|
||||
|
||||
Befehle (Gruppen-Assignments):
|
||||
python classroom.py create-group-assignment --org MeinKurs --assignment proj01 --template projekt-template --csv groups.csv
|
||||
python classroom.py list-group-submissions --org MeinKurs --assignment proj01
|
||||
python classroom.py delete-assignment --org MeinKurs --assignment proj01 # (gleicher Befehl)
|
||||
|
||||
Gruppen-CSV Format (groups.csv):
|
||||
group,username
|
||||
team-a,max.mustermann
|
||||
team-a,erika.musterfrau
|
||||
team-b,lena.schmidt
|
||||
team-b,tom.mueller
|
||||
Befehle:
|
||||
gitea-classroom add-students --org MeinKurs --csv students.csv
|
||||
gitea-classroom create-assignment --org MeinKurs --assignment ueb01 --template uebung01-template --csv students.csv
|
||||
gitea-classroom create-group-assignment --org MeinKurs --assignment proj01 --template proj-template --csv groups.csv
|
||||
gitea-classroom list-submissions --org MeinKurs --assignment ueb01
|
||||
gitea-classroom list-group-submissions --org MeinKurs --assignment proj01
|
||||
gitea-classroom clone-submissions --org MeinKurs --assignment ueb01 --dir ./abgaben
|
||||
gitea-classroom delete-assignment --org MeinKurs --assignment ueb01
|
||||
"""
|
||||
|
||||
import argparse
|
||||
21
pyproject.toml
Normal file
21
pyproject.toml
Normal file
@ -0,0 +1,21 @@
|
||||
[build-system]
|
||||
requires = ["setuptools>=68", "wheel"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "gitea-classroom"
|
||||
version = "0.1.0"
|
||||
description = "GitHub Classroom replacement for self-hosted Gitea instances"
|
||||
readme = "README.md"
|
||||
license = { file = "LICENSE" }
|
||||
requires-python = ">=3.10"
|
||||
dependencies = [
|
||||
"py-gitea",
|
||||
"requests>=2.28",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
gitea-classroom = "gitea_classroom.main:main"
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
include = ["gitea_classroom*"]
|
||||
Loading…
x
Reference in New Issue
Block a user