https://github.com/possen/markdowntoplaygroundconverter
Converts to and from markdown to playground format.
https://github.com/possen/markdowntoplaygroundconverter
markdown playground swift
Last synced: 3 months ago
JSON representation
Converts to and from markdown to playground format.
- Host: GitHub
- URL: https://github.com/possen/markdowntoplaygroundconverter
- Owner: possen
- Created: 2017-10-23T01:28:44.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-23T06:47:02.000Z (over 7 years ago)
- Last Synced: 2025-01-06T02:24:17.349Z (5 months ago)
- Topics: markdown, playground, swift
- Language: Swift
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MarkdownToPlaygroundConverter
Converts to and from markdown to playground format.### A handy utilty that converts a markdown file into a playground markdown file and the otherway around.
Created by Paul Ossenbruggen on 10/22/17.
Copyright © 2017 Paul Ossenbruggen. All rights reserved.Markdown Converter:
Tool for convering Swift Playgrounds into or out of Markdown(.md) format so they can be displayed in Github nicely.
-p --toPlayground [Markdown File Path] Converts from Markdown file to Playground.
-m --toMarkdown [Playground File Path] Converts from Playground file to Markdown.
-h --help This helpExample Usage convert to playground, put it on your path or run it with full path to built program.
MarkdownConverter -toPlayground Markdown.md > MyPlayground.playground/Contents.swift
MarkdownConverter -toMarkdown MyPlayground.playground/Contents.swift > Markdown.md
Main Structs which has good example code for how to do a simple CommandLine tool in Swift using Functional programming concepts in Swift 4:* CommandTool which takes the command line arguments and dispatches to handlers for the differnt operations as well as displaying help for the arguments.
* Converter which actually does the conversion process to and from the differnt formats. The toMatches function breaks the file up into lines, which is then handed to the two coversion types.