https://github.com/limebeck/reveal-kt
Kotlin wrapper for Reveal JS with CLI
https://github.com/limebeck/reveal-kt
cli kotlin kotlin-script kotlin-scripting revealjs slides
Last synced: 9 months ago
JSON representation
Kotlin wrapper for Reveal JS with CLI
- Host: GitHub
- URL: https://github.com/limebeck/reveal-kt
- Owner: LimeBeck
- License: mit
- Created: 2022-11-01T20:52:02.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-09-03T22:03:15.000Z (over 1 year ago)
- Last Synced: 2025-03-18T01:40:36.693Z (9 months ago)
- Topics: cli, kotlin, kotlin-script, kotlin-scripting, revealjs, slides
- Language: Kotlin
- Homepage:
- Size: 2.16 MB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# RevealKt
[](https://github.com/LimeBeck/reveal-kt/actions/workflows/main.yml)


[](https://search.maven.org/search?q=g:%22dev.limebeck%22%20AND%20a:%22ko-te%22)
Kotlin DSL wrapper around Reveal JS presentation library
## Usage
Run server with presentation:
```bash
jbang revealkt@limebeck.dev run ./MyAwesomePresentation.reveal.kts
```
Bundle presentation to static html site:
```bash
jbang revealkt@limebeck.dev bundle ./MyAwesomePresentation.reveal.kts
```
Render presentation to pdf via playwright:
```bash
jbang revealkt@limebeck.dev pdf ./MyAwesomePresentation.reveal.kts -o myPresentation.pdf
```
> [!CAUTION]
> For now playwright requires to download chromium first (uses npm)
Playwright documentation: https://playwright.dev/java/docs/browsers
```bash
jbang revealkt@limebeck.dev chrome install
```
Uninstall chrome
```bash
jbang revealkt@limebeck.dev chrome uninstall
```
Create new presentation from template
```bash
jbang revealkt@limebeck.dev init my-awesome-presentation
cd ./my-awesome-presentation
jbang revealkt@limebeck.dev run ./presentation/my-awesome-presentation.reveal.kts
```
## Add alias for `revealkt`
```bash
jbang app install revealkt@limebeck.dev
revealkt run ./presentation/my-awesome-presentation.reveal.kts
```
## Example
**MyAwesomeScript.reveal.kts**:
```kotlin
import qrcode.color.Colors
title = "My awesome presentation"
configuration {
controls = false
progress = false
}
slides {
regularSlide {
autoanimate = true
+title { "Hello from my awesome presentation" }
}
regularSlide {
autoanimate = true
+qrCode("https://github.com/LimeBeck/reveal-kt") {
stretch = true
transformBuilder {
val logo = loadAsset("logo2.png")
it.withSize(20).withColor(Colors.css("#B125EA")).withLogo(logo, 150, 150, clearLogoArea = true)
}
}
}
verticalSlide {
val title = Title { "Some text" }
slide {
autoanimate = true
+title
+note {
"Some note"
}
}
slide {
autoanimate = true
+title
+title { "Updated text" }
+note {
"Some note"
}
}
slide {
autoanimate = true
+title
+code {
//language=JSON
"""
{
"string": "some string"
}
""".trimIndent()
}
}
slide {
+img(src = "image.png") {
stretch = true
}
}
}
}
```