feat: implement core parser and Forgejo API client
Implementiert: - YAML Front Matter Extractor mit parse/remove/has Funktionen - AMB Metadata Extractor für Schema.org-konforme Metadaten - Core Parser mit unified/remark Pipeline - parseMarkdownFile für lokale Dateien - parseMarkdownString für Strings - extractHeadings, extractLinks, extractImages Utilities - Forgejo API Client - getFileContent, listDirectory, listPosts - getPostContent, getAllPosts - Volle API-Integration mit Token-Auth - Public API in src/index.js - 3 Beispiele (parse-forgejo, list-all-posts, parse-local) - 11 Unit Tests (alle passing) - Test-Fixtures mit AMB-konformen Beispieldaten Tests: 11 passing ✅ Beispiel erfolgreich mit echtem Forgejo-Repo getestet ✅
This commit is contained in:
parent
fbd6630f6d
commit
c31423d811
10 changed files with 1376 additions and 0 deletions
66
test/fixtures/example.md
vendored
Normal file
66
test/fixtures/example.md
vendored
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
---
|
||||
commonMetadata:
|
||||
'@context': https://schema.org/
|
||||
creativeWorkStatus: Published
|
||||
type: LearningResource
|
||||
name: Beispiel für OER-Material
|
||||
description: >-
|
||||
Dies ist ein Beispiel für eine Markdown-Datei mit AMB-konformen Metadaten.
|
||||
Sie demonstriert die verschiedenen Felder des AMB-Standards.
|
||||
license: https://creativecommons.org/licenses/by/4.0/deed.de
|
||||
id: https://example.org/beispiel-oer
|
||||
creator:
|
||||
- givenName: Max
|
||||
familyName: Mustermann
|
||||
id: https://orcid.org/0000-0000-0000-0001
|
||||
type: Person
|
||||
affiliation:
|
||||
name: Beispiel-Universität
|
||||
id: https://ror.org/example123
|
||||
type: Organization
|
||||
- givenName: Erika
|
||||
familyName: Musterfrau
|
||||
id: https://orcid.org/0000-0000-0000-0002
|
||||
type: Person
|
||||
inLanguage:
|
||||
- de
|
||||
about:
|
||||
- https://w3id.org/kim/hochschulfaechersystematik/n079
|
||||
image: https://example.org/images/beispiel.jpg
|
||||
learningResourceType:
|
||||
- https://w3id.org/kim/hcrt/text
|
||||
educationalLevel:
|
||||
- https://w3id.org/kim/educationalLevel/level_A
|
||||
datePublished: '2025-10-01'
|
||||
title: Beispiel für OER-Material
|
||||
tags:
|
||||
- OER
|
||||
- Bildung
|
||||
- Beispiel
|
||||
---
|
||||
|
||||
# Beispiel für OER-Material
|
||||
|
||||
## Einleitung
|
||||
|
||||
Dies ist ein **Beispiel** für eine Markdown-Datei mit YAML Front Matter nach AMB-Standard.
|
||||
|
||||
## Hauptinhalt
|
||||
|
||||
### Erste Unterüberschrift
|
||||
|
||||
Hier ist etwas *Text* mit verschiedenen Formatierungen:
|
||||
|
||||
- Liste Item 1
|
||||
- Liste Item 2
|
||||
- Liste Item 3
|
||||
|
||||
### Zweite Unterüberschrift
|
||||
|
||||
Ein Link zu [GitHub](https://github.com) und ein Bild:
|
||||
|
||||

|
||||
|
||||
## Fazit
|
||||
|
||||
Das war ein einfaches Beispiel für strukturierte Bildungsinhalte.
|
||||
Loading…
Add table
Add a link
Reference in a new issue