rebrand: hdm slides → uni slides (dhbw + hdm), make-targets mit hdm-/dhbw- prefix, dhbw_deploy_path typo fix

This commit is contained in:
2026-05-04 20:05:50 +02:00
parent 841a7ced76
commit 3c938b4b1c
4 changed files with 192 additions and 132 deletions

View File

@@ -1,11 +1,12 @@
# CLAUDE.md - Agent Guidelines for HdM Slides
# CLAUDE.md - Agent Guidelines for Uni Slides (DHBW + HdM)
This project builds presentation decks for Marp, supporting multiple courses.
## Courses
- **223015b** - Dateiformate, Schnittstellen, Speichermedien (6 Kapitel)
- **223015c** - Internettechnologien (3 Kapitel)
- **223015b** - Dateiformate, Schnittstellen, Speichermedien (HdM, 6 Kapitel)
- **223015c** - Internettechnologien (HdM, 3 Kapitel)
- **dhbw** - Technik I Grundlagen IT (DHBW, 4 Kapitel)
## Agent Restrictions
@@ -25,8 +26,9 @@ Slide files in `slides/*/*.md` are main content files:
```
slides/
├── 223015b/ # Dateiformate course
── 223015c/ # Internettechnik course
├── 223015b/ # HdM: Dateiformate
── 223015c/ # HdM: Internettechnik
└── dhbw/ # DHBW: Technik I
scripts/ # Shared scripts
themes/ # Custom Marp themes
build/ # Generated output (gitignored)
@@ -35,16 +37,18 @@ build/ # Generated output (gitignored)
## Build Commands
```bash
make dev # Marp live server all courses (port 1312, HMR)
make dev-b # Marp live server 223015b (port 1313, HMR)
make dev-c # Marp live server 223015c (port 1314, HMR)
make build # Build all courses
make build-b # Build 223015b only
make build-c # Build 223015c only
make html # HTML only
make pdf # PDF only
make klausur # Extract klausur slides → slides/*/klausur.md
make deploy # Deploy all (ASK FIRST!)
make hdm-dev # HdM live server all (port 1312)
make hdm-dev-b # HdM 223015b only (port 1313)
make hdm-dev-c # HdM 223015c only (port 1314)
make dhbw-dev # DHBW live server (port 1315)
make hdm-build # Build all HdM courses
make dhbw-build # Build DHBW course
make hdm-html # HTML only (HdM)
make hdm-pdf # PDF only (HdM)
make hdm-klausur # Extract klausur slides → slides/*/klausurfolien.md
make hdm-deploy # Deploy HdM (ASK FIRST!)
make dhbw-deploy # Deploy DHBW (ASK FIRST!)
make deploy # Deploy all (ASK FIRST!)
```
## Nix Flake Commands

218
Makefile
View File

@@ -1,70 +1,93 @@
# HdM Slides - Unified Makefile
# Supports multiple courses: 223015b (Dateiformate) and 223015c (Internettechnik)
# Uni Slides - Unified Makefile
# DHBW + HdM courses
.PHONY: help dev dev-b dev-c build build-b build-c pdf html klausur clean install deploy qr optimize-images
.PHONY: help dev hdm-dev hdm-dev-b hdm-dev-c dhbw-dev \
build hdm-build hdm-build-b hdm-build-c dhbw-build \
html hdm-html hdm-html-b hdm-html-c \
pdf hdm-pdf hdm-pdf-b hdm-pdf-c \
klausur hdm-klausur hdm-klausur-b hdm-klausur-c \
qr qr-slides optimize-images clean install deploy deploy-index
# Course configuration
COURSES = 223015b 223015c
COURSE_HDM = 223015b 223015c
COURSE_DHBW = dhbw
SLIDES_DIR = slides
# Course-specific settings
# HdM course settings
223015b_NAME = Dateiformate, Schnittstellen, Speichermedien
223015b_KAPITEL = 00-intro 01-grundlagen-text-audio 02-bild-audio-video 03-speichermedien-schnittstellen 04-distribution-apis-zukunft 05-vertiefung-offene-fragen klausurfolien klausurfragen
223015b_DEPLOY_PATH = /home/tengo/html/hdm/223015b
223015c_NAME = Internettechnologien
223015c_KAPITEL = 01-geschichte-grundlagen-html 02-netzwerke-protokolle-css 03-interaktivitaet-javascript klausurfolien klausurfragen
223015c_DEPLOY_PATH = /home/tengo/html/hdm/223015c
# DHBW course settings
dhbw_NAME = Technik I Grundlagen IT
dhbw_KAPITEL = 01_web_eng 02_css_extended 03_nodejs_basics 04_nodejs_advanced
# Deploy paths
HDM_DEPLOY_PATH = /home/tengo/html/hdm
DHBW_DEPLOY_PATH = /home/tengo/html/dhbw
DEPLOY_HOST = tengo@tuttle.uberspace.de
# Default target
help:
@echo "HdM Slides - Unified Build System"
@echo "Uni Slides - DHBW + HdM Build System"
@echo ""
@echo "Courses:"
@echo "HdM Courses:"
@echo " 223015b - Dateiformate, Schnittstellen, Speichermedien"
@echo " 223015c - Internettechnologien"
@echo ""
@echo "Development:"
@echo " make dev - Marp live server all courses (port 1312, HMR)"
@echo " make dev-b - Marp live server 223015b (port 1313, HMR)"
@echo " make dev-c - Marp live server 223015c (port 1314, HMR)"
@echo "DHBW Courses:"
@echo " dhbw - Technik I Grundlagen IT"
@echo ""
@echo "Build:"
@echo " make build - Build all courses"
@echo " make build-b - Build 223015b only"
@echo " make build-c - Build 223015c only"
@echo " make pdf - Export all to PDF"
@echo " make html - Export all to HTML"
@echo " make klausur - Extract klausurfolien slides"
@echo "Development:"
@echo " make hdm-dev - Live server all HdM courses (port 1312, HMR)"
@echo " make hdm-dev-b - 223015b only (port 1313, HMR)"
@echo " make hdm-dev-c - 223015c only (port 1314, HMR)"
@echo " make dhbw-dev - DHBW live server (port 1315, HMR)"
@echo ""
@echo "Build (HdM):"
@echo " make hdm-build - Build all HdM courses"
@echo " make hdm-build-b - Build 223015b only"
@echo " make hdm-build-c - Build 223015c only"
@echo " make hdm-html - HTML only all HdM"
@echo " make hdm-pdf - PDF only all HdM"
@echo ""
@echo "Build (DHBW):"
@echo " make dhbw-build - Build DHBW course"
@echo ""
@echo "Klausur (HdM):"
@echo " make hdm-klausur - Extract klausurfolien all HdM"
@echo " make hdm-klausur-b - 223015b only"
@echo " make hdm-klausur-c - 223015c only"
@echo ""
@echo "Tools:"
@echo " make qr URL=... - Generate QR code for URL"
@echo " make qr URL=... - Generate QR code"
@echo " make qr-slides COURSE=223015b - QR for course URL"
@echo " make optimize-images COURSE=223015b - Resize images"
@echo ""
@echo "Deploy:"
@echo " make deploy - Deploy all courses"
@echo " make deploy-b - Deploy 223015b only"
@echo " make deploy-c - Deploy 223015c only"
@echo " make deploy - Deploy all courses"
@echo " make hdm-deploy - Deploy all HdM courses"
@echo " make dhbw-deploy - Deploy DHBW course"
@echo ""
@echo "Other:"
@echo " make clean - Remove generated files"
@echo " make install - Install dependencies"
@echo " make clean - Remove generated files"
# Ensure build directories exist
build/.exists:
@mkdir -p build/223015b build/223015c
@mkdir -p build/223015b build/223015c build/dhbw
@touch $@
# Development server (Marp live server with HMR)
dev:
# Development servers (HdM)
hdm-dev:
@./scripts/dev-server.sh
dev-b:
hdm-dev-b:
@./scripts/dev-server.sh 223015b 1313
dev-c:
hdm-dev-c:
@./scripts/dev-server.sh 223015c 1314
dev-kill:
@@ -72,8 +95,12 @@ dev-kill:
@-fuser -k 1313/tcp 2>/dev/null || true
@-fuser -k 1314/tcp 2>/dev/null || true
# Build functions
define build_course
# DHBW dev (using HdM dev-server for now)
dhbw-dev:
@./scripts/dev-server.sh dhbw 1315
# HdM build functions
define hdm_build_course
@echo "Building $(1)..."
@mkdir -p build/$(1)
@cp -r $(SLIDES_DIR)/$(1)/assets build/$(1)/ 2>/dev/null || true
@@ -88,17 +115,35 @@ define build_course
@./scripts/generate-index.sh $(1) build/$(1)
endef
build-b: build/.exists
$(call build_course,223015b)
hdm-build-b: build/.exists
$(call hdm_build_course,223015b)
build-c: build/.exists
$(call build_course,223015c)
hdm-build-c: build/.exists
$(call hdm_build_course,223015c)
build: build-b build-c
@echo "All courses built!"
hdm-build: hdm-build-b hdm-build-c
@echo "All HdM courses built!"
# HTML only builds
define html_course
# DHBW build function
define dhbw_build_course
@echo "Building $(1)..."
@mkdir -p build/$(1)
@cp -r $(SLIDES_DIR)/$(1)/assets build/$(1)/ 2>/dev/null || true
@for f in $($(1)_KAPITEL); do \
if [ -f "$(SLIDES_DIR)/$(1)/$$f.md" ]; then \
echo " Building $$f..."; \
npx @marp-team/marp-cli $(SLIDES_DIR)/$(1)/$$f.md -o build/$(1)/$$f.html; \
npx @marp-team/marp-cli $(SLIDES_DIR)/$(1)/$$f.md --pdf --allow-local-files -o build/$(1)/$$f.pdf; \
fi \
done
@./scripts/generate-index.sh $(1) build/$(1)
endef
dhbw-build: build/.exists
$(call dhbw_build_course,dhbw)
# HdM HTML only
define hdm_html_course
@echo "Building HTML for $(1)..."
@mkdir -p build/$(1)
@cp -r $(SLIDES_DIR)/$(1)/assets build/$(1)/ 2>/dev/null || true
@@ -112,16 +157,16 @@ define html_course
@./scripts/generate-index.sh $(1) build/$(1)
endef
html-b: build/.exists
$(call html_course,223015b)
hdm-html-b: build/.exists
$(call hdm_html_course,223015b)
html-c: build/.exists
$(call html_course,223015c)
hdm-html-c: build/.exists
$(call hdm_html_course,223015c)
html: html-b html-c
hdm-html: hdm-html-b hdm-html-c
# PDF only builds
define pdf_course
# HdM PDF only
define hdm_pdf_course
@echo "Building PDFs for $(1)..."
@mkdir -p build/$(1)
@for f in $($(1)_KAPITEL); do \
@@ -132,25 +177,32 @@ define pdf_course
done
endef
pdf-b: build/.exists
$(call pdf_course,223015b)
hdm-pdf-b: build/.exists
$(call hdm_pdf_course,223015b)
pdf-c: build/.exists
$(call pdf_course,223015c)
hdm-pdf-c: build/.exists
$(call hdm_pdf_course,223015c)
pdf: pdf-b pdf-c
hdm-pdf: hdm-pdf-b hdm-pdf-c
# Klausur slide extraction
klausur-b:
# Legacy aliases (no prefix)
build: hdm-build
html: hdm-html
pdf: hdm-pdf
# Klausur extraction (HdM)
hdm-klausur-b:
@./scripts/extract-klausur.sh 223015b
klausur-c:
hdm-klausur-c:
@./scripts/extract-klausur.sh 223015c
klausur: klausur-b klausur-c
@echo "Klausurfolien slides extracted for all courses!"
hdm-klausur: hdm-klausur-b hdm-klausur-c
@echo "Klausurfolien slides extracted for all HdM courses!"
# QR Code generation (uses nix-shell)
klausur: hdm-klausur
# QR Code generation
qr:
ifndef URL
@echo "Usage: make qr URL=https://example.com"
@@ -160,7 +212,6 @@ else
@echo "Generated: $(or $(OUTPUT),qr-code.png)"
endif
# QR code for a slide deck URL
qr-slides:
ifndef COURSE
@echo "Usage: make qr-slides COURSE=223015b"
@@ -183,38 +234,51 @@ else
@echo "Done! Originals in assets-original/"
endif
# Root index for /hdm/
HDM_DEPLOY_PATH = /home/tengo/html/hdm
# Root index
build-index: build/.exists
@echo "Building root index..."
@mkdir -p build
@./scripts/generate-root-index.sh
# Deploy
define deploy_course
# Deploy (HdM)
define hdm_deploy_course
@echo "Deploying $(1)..."
scp build/$(1)/*.html $(DEPLOY_HOST):$($(1)_DEPLOY_PATH)/
scp build/$(1)/*.pdf $(DEPLOY_HOST):$($(1)_DEPLOY_PATH)/ 2>/dev/null || true
scp build/$(1)/*.svg $(DEPLOY_HOST):$($(1)_DEPLOY_PATH)/ 2>/dev/null || true
scp -r build/$(1)/assets/ $(DEPLOY_HOST):$($(1)_DEPLOY_PATH)/
scp -r build/$(1)/materials/ $(DEPLOY_HOST):$($(1)_DEPLOY_PATH)/ 2>/dev/null || true
scp build/$(1)/*.html $(DEPLOY_HOST):$(HDM_DEPLOY_PATH)/$(1)/
scp build/$(1)/*.pdf $(DEPLOY_HOST):$(HDM_DEPLOY_PATH)/$(1)/ 2>/dev/null || true
scp build/$(1)/*.svg $(DEPLOY_HOST):$(HDM_DEPLOY_PATH)/$(1)/ 2>/dev/null || true
scp -r build/$(1)/assets/ $(DEPLOY_HOST):$(HDM_DEPLOY_PATH)/$(1)/ 2>/dev/null || true
scp -r build/$(1)/materials/ $(DEPLOY_HOST):$(HDM_DEPLOY_PATH)/$(1)/ 2>/dev/null || true
@echo "$(1) deployed!"
endef
deploy-b: build-b
$(call deploy_course,223015b)
hdm-deploy-b: hdm-build-b
$(call hdm_deploy_course,223015b)
deploy-c: build-c
$(call deploy_course,223015c)
hdm-deploy-c: hdm-build-c
$(call hdm_deploy_course,223015c)
hdm-deploy: hdm-build hdm-deploy-b hdm-deploy-c
@echo "All HdM courses deployed!"
# Deploy (DHBW)
define dhbw_deploy_course
@echo "Deploying $(1)..."
scp build/$(1)/*.html $(DEPLOY_HOST):$(DHBW_DEPLOY_PATH)/$(1)/
scp build/$(1)/*.pdf $(DEPLOY_HOST):$(DHBW_DEPLOY_PATH)/$(1)/ 2>/dev/null || true
scp build/$(1)/*.svg $(DEPLOY_HOST):$(DHBW_DEPLOY_PATH)/$(1)/ 2>/dev/null || true
scp -r build/$(1)/assets/ $(DEPLOY_HOST):$(DHBW_DEPLOY_PATH)/$(1)/ 2>/dev/null || true
@echo "$(1) deployed!"
endef
dhbw-deploy: dhbw-build
$(call dhbw_deploy_course,dhbw)
deploy-index: build-index
@echo "Deploying root index..."
scp build/index.html $(DEPLOY_HOST):$(HDM_DEPLOY_PATH)/
scp build/qr-root.svg $(DEPLOY_HOST):$(HDM_DEPLOY_PATH)/ 2>/dev/null || true
scp build/index.html $(DEPLOY_HOST):$(HDM_DEPLOY_PATH)/ 2>/dev/null || true
@echo "Root index deployed!"
deploy: build-index deploy-b deploy-c deploy-index
deploy: build-index hdm-deploy dhbw-deploy deploy-index
@echo "All courses deployed!"
# Clean

View File

@@ -1,25 +1,22 @@
# HdM Slides
# Uni Slides - DHBW + HdM
Presentation slides for HdM Stuttgart courses, built with [Marp](https://marp.app/).
Combined presentation slides for DHBW and HdM Stuttgart courses, built with [Marp](https://marp.app/).
## Courses
| Code | Title | Kapitel |
|------|-------|---------|
| 223015b | Dateiformate, Schnittstellen, Speichermedien | 6 |
| 223015c | Internettechnologien | 3 |
| Code | Title | Origin |
|------|-------|--------|
| 223015b | Dateiformate, Schnittstellen, Speichermedien | HdM |
| 223015c | Internettechnologien | HdM |
| dhbw | Technik I Grundlagen IT | DHBW |
## Project Structure
```
slides/
├── 223015b/ # Dateiformate course
│ ├── 00-intro.md
│ ├── 01-grundlagen-text-audio.md
│ └── ...
└── 223015c/ # Internettechnik course
├── 01-geschichte-grundlagen-html.md
└── ...
├── 223015b/ # HdM: Dateiformate
├── 223015c/ # HdM: Internettechnik
├── dhbw/ # DHBW slides (TBD)
scripts/ # Build scripts
build/ # Generated output (gitignored)
```
@@ -27,54 +24,49 @@ build/ # Generated output (gitignored)
## Development
```bash
# Start development server (hot reload)
make dev # Single server for all courses (port 3000)
# Access individual courses:
# 223015b: http://localhost:3000/223015b/
# 223015c: http://localhost:3000/223015c/
make hdm-dev # Live server all HdM courses (port 1312, HMR)
make hdm-dev-b # 223015b only (port 1313, HMR)
make hdm-dev-c # 223015c only (port 1314, HMR)
make dhbw-dev # DHBW (not yet configured)
```
## Build
```bash
make build # Build all (HTML + PDF)
make build-b # Build 223015b only
make build-c # Build 223015c only
make html # HTML only
make pdf # PDF only
make hdm-build # Build all HdM courses (HTML + PDF)
make hdm-build-b # 223015b only
make hdm-build-c # 223015c only
make hdm-html # HTML only all HdM
make hdm-pdf # PDF only all HdM
```
## Klausur Folien
Extract exam-relevant slides (marked with `<!-- _class: klausur -->`) into a single file:
Extract exam slides (`<!-- _class: klausur -->`) into single file:
```bash
make klausur # Extract all courses
make klausur-b # 223015b only
make klausur-c # 223015c only
make hdm-klausur # All HdM courses
make hdm-klausur-b # 223015b only
make hdm-klausur-c # 223015c only
```
Output: `slides/<course>/klausurfolien.md`
The generated file includes:
- A title slide per kapitel for orientation
- All slides marked with `<!-- _class: klausur -->`
## Tools
```bash
make qr URL=https://example.com # Generate QR code
make qr-slides COURSE=223015b # QR for course URL
make optimize-images COURSE=223015b # Resize images
make qr URL=https://example.com # Generate QR code
make qr-slides COURSE=223015b # QR for course URL
make optimize-images COURSE=223015b # Resize images
```
## Deploy
```bash
make deploy # Deploy all courses
make deploy-b # Deploy 223015b only
make deploy-c # Deploy 223015c only
make hdm-deploy # Deploy all HdM courses
make hdm-deploy-b # 223015b only
make hdm-deploy-c # 223015c only
make deploy # Full deploy (all courses)
```
## Marking Slides as Klausur-Relevant

View File

@@ -1,5 +1,5 @@
{
description = "HdM Slides - Marp presentation builder";
description = "Uni Slides - DHBW + HdM Marp presentation builder";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
@@ -19,7 +19,7 @@
];
shellHook = ''
echo "HdM Slides - run 'make' for available commands"
echo "Uni Slides - run 'make' for available commands"
'';
};
}