Need help with LiterateSwiftGUI?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

chriseidhof
126 Stars 5 Forks 32 Commits 2 Opened issues

Services available

!
?

Need anything else?

Contributors list

# 24,946
Swift
codegen...
Markdow...
webscra...
30 commits
# 408,480
C
Shell
Objecti...
sed
1 commit

LiterateSwift is a (GUI) tool to edit your literate swift files.

A literate swift file is written in CommonMark, written with fenced code blocks. A code block can be either of three things: swift, highlight-swift, or print-swift.

A file is transformed like this: first, all

swift
code-blocks are assembled into one big swift file. Then, for every print-swift block, a new file is generated, containing the
swift
code blocks and the contents of that print-swift block.

To install, just run

pod install
, it will install the dependencies (cmark, CommonMark and LiterateSwift). For
cmark
, you need to have
cmake
installed. All code is written using the latest Xcode (Xcode 7, Beta 4).

Weaving

Additionally, you can include snippets from other swift files in subdirectories (or the same directory).

If you surround your code like this:

// <>
class View {
    var window: Window
    init(window: Window) {
        self.window = window
    }
}
class Window {
    var view: View?
}
// <>

And put it in a file with the extension .swift, somewhere in the same directory as the markdown file (or a subdirectory), you can then include it in your Markdown file, inside a code block:

```highlight-swift
<>
```

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.