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

214
Makefile
View File

@@ -1,70 +1,93 @@
# HdM Slides - Unified Makefile # Uni Slides - Unified Makefile
# Supports multiple courses: 223015b (Dateiformate) and 223015c (Internettechnik) # 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 # Course configuration
COURSES = 223015b 223015c COURSE_HDM = 223015b 223015c
COURSE_DHBW = dhbw
SLIDES_DIR = slides SLIDES_DIR = slides
# Course-specific settings # HdM course settings
223015b_NAME = Dateiformate, Schnittstellen, Speichermedien 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_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_NAME = Internettechnologien
223015c_KAPITEL = 01-geschichte-grundlagen-html 02-netzwerke-protokolle-css 03-interaktivitaet-javascript klausurfolien klausurfragen 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 DEPLOY_HOST = tengo@tuttle.uberspace.de
# Default target # Default target
help: help:
@echo "HdM Slides - Unified Build System" @echo "Uni Slides - DHBW + HdM Build System"
@echo "" @echo ""
@echo "Courses:" @echo "HdM Courses:"
@echo " 223015b - Dateiformate, Schnittstellen, Speichermedien" @echo " 223015b - Dateiformate, Schnittstellen, Speichermedien"
@echo " 223015c - Internettechnologien" @echo " 223015c - Internettechnologien"
@echo "" @echo ""
@echo "Development:" @echo "DHBW Courses:"
@echo " make dev - Marp live server all courses (port 1312, HMR)" @echo " dhbw - Technik I Grundlagen IT"
@echo " make dev-b - Marp live server 223015b (port 1313, HMR)"
@echo " make dev-c - Marp live server 223015c (port 1314, HMR)"
@echo "" @echo ""
@echo "Build:" @echo "Development:"
@echo " make build - Build all courses" @echo " make hdm-dev - Live server all HdM courses (port 1312, HMR)"
@echo " make build-b - Build 223015b only" @echo " make hdm-dev-b - 223015b only (port 1313, HMR)"
@echo " make build-c - Build 223015c only" @echo " make hdm-dev-c - 223015c only (port 1314, HMR)"
@echo " make pdf - Export all to PDF" @echo " make dhbw-dev - DHBW live server (port 1315, HMR)"
@echo " make html - Export all to HTML" @echo ""
@echo " make klausur - Extract klausurfolien slides" @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 ""
@echo "Tools:" @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 " make optimize-images COURSE=223015b - Resize images"
@echo "" @echo ""
@echo "Deploy:" @echo "Deploy:"
@echo " make deploy - Deploy all courses" @echo " make deploy - Deploy all courses"
@echo " make deploy-b - Deploy 223015b only" @echo " make hdm-deploy - Deploy all HdM courses"
@echo " make deploy-c - Deploy 223015c only" @echo " make dhbw-deploy - Deploy DHBW course"
@echo "" @echo ""
@echo "Other:" @echo "Other:"
@echo " make clean - Remove generated files" @echo " make clean - Remove generated files"
@echo " make install - Install dependencies"
# Ensure build directories exist # Ensure build directories exist
build/.exists: build/.exists:
@mkdir -p build/223015b build/223015c @mkdir -p build/223015b build/223015c build/dhbw
@touch $@ @touch $@
# Development server (Marp live server with HMR) # Development servers (HdM)
dev: hdm-dev:
@./scripts/dev-server.sh @./scripts/dev-server.sh
dev-b: hdm-dev-b:
@./scripts/dev-server.sh 223015b 1313 @./scripts/dev-server.sh 223015b 1313
dev-c: hdm-dev-c:
@./scripts/dev-server.sh 223015c 1314 @./scripts/dev-server.sh 223015c 1314
dev-kill: dev-kill:
@@ -72,8 +95,12 @@ dev-kill:
@-fuser -k 1313/tcp 2>/dev/null || true @-fuser -k 1313/tcp 2>/dev/null || true
@-fuser -k 1314/tcp 2>/dev/null || true @-fuser -k 1314/tcp 2>/dev/null || true
# Build functions # DHBW dev (using HdM dev-server for now)
define build_course dhbw-dev:
@./scripts/dev-server.sh dhbw 1315
# HdM build functions
define hdm_build_course
@echo "Building $(1)..." @echo "Building $(1)..."
@mkdir -p build/$(1) @mkdir -p build/$(1)
@cp -r $(SLIDES_DIR)/$(1)/assets build/$(1)/ 2>/dev/null || true @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) @./scripts/generate-index.sh $(1) build/$(1)
endef endef
build-b: build/.exists hdm-build-b: build/.exists
$(call build_course,223015b) $(call hdm_build_course,223015b)
build-c: build/.exists hdm-build-c: build/.exists
$(call build_course,223015c) $(call hdm_build_course,223015c)
build: build-b build-c hdm-build: hdm-build-b hdm-build-c
@echo "All courses built!" @echo "All HdM courses built!"
# HTML only builds # DHBW build function
define html_course 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)..." @echo "Building HTML for $(1)..."
@mkdir -p build/$(1) @mkdir -p build/$(1)
@cp -r $(SLIDES_DIR)/$(1)/assets build/$(1)/ 2>/dev/null || true @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) @./scripts/generate-index.sh $(1) build/$(1)
endef endef
html-b: build/.exists hdm-html-b: build/.exists
$(call html_course,223015b) $(call hdm_html_course,223015b)
html-c: build/.exists hdm-html-c: build/.exists
$(call html_course,223015c) $(call hdm_html_course,223015c)
html: html-b html-c hdm-html: hdm-html-b hdm-html-c
# PDF only builds # HdM PDF only
define pdf_course define hdm_pdf_course
@echo "Building PDFs for $(1)..." @echo "Building PDFs for $(1)..."
@mkdir -p build/$(1) @mkdir -p build/$(1)
@for f in $($(1)_KAPITEL); do \ @for f in $($(1)_KAPITEL); do \
@@ -132,25 +177,32 @@ define pdf_course
done done
endef endef
pdf-b: build/.exists hdm-pdf-b: build/.exists
$(call pdf_course,223015b) $(call hdm_pdf_course,223015b)
pdf-c: build/.exists hdm-pdf-c: build/.exists
$(call pdf_course,223015c) $(call hdm_pdf_course,223015c)
pdf: pdf-b pdf-c hdm-pdf: hdm-pdf-b hdm-pdf-c
# Klausur slide extraction # Legacy aliases (no prefix)
klausur-b: build: hdm-build
html: hdm-html
pdf: hdm-pdf
# Klausur extraction (HdM)
hdm-klausur-b:
@./scripts/extract-klausur.sh 223015b @./scripts/extract-klausur.sh 223015b
klausur-c: hdm-klausur-c:
@./scripts/extract-klausur.sh 223015c @./scripts/extract-klausur.sh 223015c
klausur: klausur-b klausur-c hdm-klausur: hdm-klausur-b hdm-klausur-c
@echo "Klausurfolien slides extracted for all courses!" @echo "Klausurfolien slides extracted for all HdM courses!"
# QR Code generation (uses nix-shell) klausur: hdm-klausur
# QR Code generation
qr: qr:
ifndef URL ifndef URL
@echo "Usage: make qr URL=https://example.com" @echo "Usage: make qr URL=https://example.com"
@@ -160,7 +212,6 @@ else
@echo "Generated: $(or $(OUTPUT),qr-code.png)" @echo "Generated: $(or $(OUTPUT),qr-code.png)"
endif endif
# QR code for a slide deck URL
qr-slides: qr-slides:
ifndef COURSE ifndef COURSE
@echo "Usage: make qr-slides COURSE=223015b" @echo "Usage: make qr-slides COURSE=223015b"
@@ -183,38 +234,51 @@ else
@echo "Done! Originals in assets-original/" @echo "Done! Originals in assets-original/"
endif endif
# Root index for /hdm/ # Root index
HDM_DEPLOY_PATH = /home/tengo/html/hdm
build-index: build/.exists build-index: build/.exists
@echo "Building root index..." @echo "Building root index..."
@mkdir -p build @mkdir -p build
@./scripts/generate-root-index.sh @./scripts/generate-root-index.sh
# Deploy # Deploy (HdM)
define deploy_course define hdm_deploy_course
@echo "Deploying $(1)..." @echo "Deploying $(1)..."
scp build/$(1)/*.html $(DEPLOY_HOST):$($(1)_DEPLOY_PATH)/ scp build/$(1)/*.html $(DEPLOY_HOST):$(HDM_DEPLOY_PATH)/$(1)/
scp build/$(1)/*.pdf $(DEPLOY_HOST):$($(1)_DEPLOY_PATH)/ 2>/dev/null || true scp build/$(1)/*.pdf $(DEPLOY_HOST):$(HDM_DEPLOY_PATH)/$(1)/ 2>/dev/null || true
scp build/$(1)/*.svg $(DEPLOY_HOST):$($(1)_DEPLOY_PATH)/ 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):$($(1)_DEPLOY_PATH)/ scp -r build/$(1)/assets/ $(DEPLOY_HOST):$(HDM_DEPLOY_PATH)/$(1)/ 2>/dev/null || true
scp -r build/$(1)/materials/ $(DEPLOY_HOST):$($(1)_DEPLOY_PATH)/ 2>/dev/null || true scp -r build/$(1)/materials/ $(DEPLOY_HOST):$(HDM_DEPLOY_PATH)/$(1)/ 2>/dev/null || true
@echo "$(1) deployed!" @echo "$(1) deployed!"
endef endef
deploy-b: build-b hdm-deploy-b: hdm-build-b
$(call deploy_course,223015b) $(call hdm_deploy_course,223015b)
deploy-c: build-c hdm-deploy-c: hdm-build-c
$(call deploy_course,223015c) $(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 deploy-index: build-index
@echo "Deploying root index..." @echo "Deploying root index..."
scp build/index.html $(DEPLOY_HOST):$(HDM_DEPLOY_PATH)/ scp build/index.html $(DEPLOY_HOST):$(HDM_DEPLOY_PATH)/ 2>/dev/null || true
scp build/qr-root.svg $(DEPLOY_HOST):$(HDM_DEPLOY_PATH)/ 2>/dev/null || true
@echo "Root index deployed!" @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!" @echo "All courses deployed!"
# Clean # 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 ## Courses
| Code | Title | Kapitel | | Code | Title | Origin |
|------|-------|---------| |------|-------|--------|
| 223015b | Dateiformate, Schnittstellen, Speichermedien | 6 | | 223015b | Dateiformate, Schnittstellen, Speichermedien | HdM |
| 223015c | Internettechnologien | 3 | | 223015c | Internettechnologien | HdM |
| dhbw | Technik I Grundlagen IT | DHBW |
## Project Structure ## Project Structure
``` ```
slides/ slides/
├── 223015b/ # Dateiformate course ├── 223015b/ # HdM: Dateiformate
│ ├── 00-intro.md ├── 223015c/ # HdM: Internettechnik
│ ├── 01-grundlagen-text-audio.md ├── dhbw/ # DHBW slides (TBD)
│ └── ...
└── 223015c/ # Internettechnik course
├── 01-geschichte-grundlagen-html.md
└── ...
scripts/ # Build scripts scripts/ # Build scripts
build/ # Generated output (gitignored) build/ # Generated output (gitignored)
``` ```
@@ -27,40 +24,34 @@ build/ # Generated output (gitignored)
## Development ## Development
```bash ```bash
# Start development server (hot reload) make hdm-dev # Live server all HdM courses (port 1312, HMR)
make dev # Single server for all courses (port 3000) make hdm-dev-b # 223015b only (port 1313, HMR)
make hdm-dev-c # 223015c only (port 1314, HMR)
# Access individual courses: make dhbw-dev # DHBW (not yet configured)
# 223015b: http://localhost:3000/223015b/
# 223015c: http://localhost:3000/223015c/
``` ```
## Build ## Build
```bash ```bash
make build # Build all (HTML + PDF) make hdm-build # Build all HdM courses (HTML + PDF)
make build-b # Build 223015b only make hdm-build-b # 223015b only
make build-c # Build 223015c only make hdm-build-c # 223015c only
make html # HTML only make hdm-html # HTML only all HdM
make pdf # PDF only make hdm-pdf # PDF only all HdM
``` ```
## Klausur Folien ## Klausur Folien
Extract exam-relevant slides (marked with `<!-- _class: klausur -->`) into a single file: Extract exam slides (`<!-- _class: klausur -->`) into single file:
```bash ```bash
make klausur # Extract all courses make hdm-klausur # All HdM courses
make klausur-b # 223015b only make hdm-klausur-b # 223015b only
make klausur-c # 223015c only make hdm-klausur-c # 223015c only
``` ```
Output: `slides/<course>/klausurfolien.md` Output: `slides/<course>/klausurfolien.md`
The generated file includes:
- A title slide per kapitel for orientation
- All slides marked with `<!-- _class: klausur -->`
## Tools ## Tools
```bash ```bash
@@ -72,9 +63,10 @@ make optimize-images COURSE=223015b # Resize images
## Deploy ## Deploy
```bash ```bash
make deploy # Deploy all courses make hdm-deploy # Deploy all HdM courses
make deploy-b # Deploy 223015b only make hdm-deploy-b # 223015b only
make deploy-c # Deploy 223015c only make hdm-deploy-c # 223015c only
make deploy # Full deploy (all courses)
``` ```
## Marking Slides as Klausur-Relevant ## 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 = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
@@ -19,7 +19,7 @@
]; ];
shellHook = '' shellHook = ''
echo "HdM Slides - run 'make' for available commands" echo "Uni Slides - run 'make' for available commands"
''; '';
}; };
} }