Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 17 days 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 2 years ago)
- Default Branch: master
- Last Pushed: 2024-09-03T22:03:15.000Z (2 months ago)
- Last Synced: 2024-10-12T22:45:53.439Z (about 1 month 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
[![CI](https://github.com/LimeBeck/reveal-kt/actions/workflows/main.yml/badge.svg)](https://github.com/LimeBeck/reveal-kt/actions/workflows/main.yml)
![GitHub last commit](https://img.shields.io/github/last-commit/limebeck/reveal-kt)
![GitHub](https://img.shields.io/github/license/limebeck/reveal-kt)
[![Maven Central](https://img.shields.io/maven-central/v/dev.limebeck/revealkt-cli.svg?label=Maven%20Central)](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 [email protected] run ./MyAwesomePresentation.reveal.kts
```Bundle presentation to static html site:
```bash
jbang [email protected] bundle ./MyAwesomePresentation.reveal.kts
```Render presentation to pdf via playwright:
```bash
jbang [email protected] 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 [email protected] chrome install
```Uninstall chrome
```bash
jbang [email protected] chrome uninstall
```Create new presentation from template
```bash
jbang [email protected] init my-awesome-presentation
cd ./my-awesome-presentation
jbang [email protected] run ./presentation/my-awesome-presentation.reveal.kts
```## Add alias for `revealkt`
```bash
jbang app install [email protected]
revealkt run ./presentation/my-awesome-presentation.reveal.kts
```## Example
**MyAwesomeScript.reveal.kts**:
```kotlin
import qrcode.color.Colorstitle = "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
}
}
}
}
```