A humble tool to help you presenting ideas by writing Swift
- Xcode 10.2.1, the embedded
swiftc
will be used to interpret the slides manifest file - Ruby gem rouge, this gem will be used to provide syntax highlighting for source code blocks
Clone this repo and build the target Truffaut
.
Create a Swift file:
$ touch slides.swift
Import the supporting module:
import TruffautSupport
Initialize a presentation with pages:
let presentation = Presentation(pages: [
Page(title: "Hello World", subtitle: "A Swift Slide"),
])
For a full reference of the TruffautSupport
supporting module, please check here.
For real-life Truffaut slides, please check the Examples.
- The Xcode version selected by
xcode-select
must be the same as the one used to build the application.- Otherwise opening slides may fail with errors like this:
slides.swift:1:8: error: cannot load underlying module for 'TruffautSupport'
- In Swift 5.1, this issue is likely to be fixed by Library Evolution.
- Otherwise opening slides may fail with errors like this:
- Currently the syntax highlighter is assuming ruby is installed at path
/usr/local/bin/ruby
which is usually true if the ruby is intalled with homebrew.- If this is not true for you, you can modify the ruby path in the preference (
⌘ + ,
).
- If this is not true for you, you can modify the ruby path in the preference (
- Export to PDF is not implemented.