{"id":17668386,"url":"https://github.com/ldstreet/playdocs","last_synced_at":"2026-05-03T04:34:59.950Z","repository":{"id":63916384,"uuid":"163020722","full_name":"ldstreet/PlayDocs","owner":"ldstreet","description":"Command line tool for converting Swift Playgrounds to Markdown and HTML.","archived":false,"fork":false,"pushed_at":"2021-07-04T19:46:02.000Z","size":6890,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T18:51:16.119Z","etag":null,"topics":["command-line-tool","markdown","playgrounds","swift","swift-package","xcode-playground"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ldstreet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-24T20:08:16.000Z","updated_at":"2021-12-08T22:21:06.000Z","dependencies_parsed_at":"2023-01-14T13:45:15.718Z","dependency_job_id":null,"html_url":"https://github.com/ldstreet/PlayDocs","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldstreet%2FPlayDocs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldstreet%2FPlayDocs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldstreet%2FPlayDocs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldstreet%2FPlayDocs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ldstreet","download_url":"https://codeload.github.com/ldstreet/PlayDocs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246320198,"owners_count":20758410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line-tool","markdown","playgrounds","swift","swift-package","xcode-playground"],"created_at":"2024-10-23T23:08:02.130Z","updated_at":"2026-05-03T04:34:59.925Z","avatar_url":"https://github.com/ldstreet.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"#  PlayDocs 🏓\n[![Build Status](https://travis-ci.org/ldstreet/PlayDocs.svg?branch=master)](https://travis-ci.org/ldstreet/PlayDocs)\n![Swift Version](https://img.shields.io/badge/Swift-4.2-blue.svg)\n[![SPM](https://img.shields.io/badge/spm-compatible-blue.svg)](https://swift.org/package-manager)\n![Platforms](https://img.shields.io/badge/Platforms-macOS_Linux-blue.svg)\n[![Git Version](https://img.shields.io/github/release/ldstreet/PlayDocs.svg)](https://github.com/ldstreet/PlayDocs/releases)\n[![license](https://img.shields.io/github/license/ldstreet/PlayDocs.svg)](https://github.com/ldstreet/PlayDocs/blob/master/LICENSE)\n[![Twitter](https://img.shields.io/badge/Twitter-@street_luke-blue.svg)](https://twitter.com/street_luke)\n\n## 💡 Overview \n\nPlayDocs is command line tool for converting Swift Playgrounds to Markdown and HTML. Playgrounds have supported rendering markdown from the beginning, so why not leverage that for generating documentation that can live both in your repository as executable code and on your wiki or blog as documention or a post?\n\n## ⚙️ Usage\n\nYou can use PlayDocs both as a commandline tool or as a framework in your own code.\n\n### As a commandline tool...\n\n####  Convert\nHere is the basic command for generating a markdown file via a Playground:\n```\nplaydocs convert ./MyPlayground.playground --open\n```\n\nAnd if you want it to output as html:\n```\nplaydocs convert ./MyPlayground.playground --html --open\n```\n\nTo specify a destination:\n```\nplaydocs convert ./MyPlayground.playground --destination /path/to/file/MyFile.md --open\n```\n\n#### New\nPlayDocs can also help you easily create new Playground files so you can get your doc started fast:\n```\nplaydocs new HelloPlayDocs --open\n```\n\nIf you want the Playground to target MacOS:\n```\nplaydocs new HelloPlayDocs --macos --open\n```\nAnd if you don't want any boilerplate in your Playground:\n```\nplaydocs new HelloPlayDocs --macos --empty --open\n```\n\n### As a package...\nTo make your conversions in swift, you can use `PlayDocsKit`\n\n``` swift\n\n// Convert swift source from a swift source string to a markdown string\npublic func convertToMarkdown(from source: SwiftSource) -\u003e MarkdownSource\n\n// Convert swift source from a file to a markdown file\npublic func convertToMarkdown(from source: URL, to destination: URL) throws\n\n// Convert swift source from a string to an html string\npublic func convertToHTML(from source: SwiftSource) throws -\u003e HTMLSource\n\n// Convert swift source from a file to a html file\npublic func convertToHTML(from source: URL, to destination: URL) throws\n\n// Custom conversion allowing caller to convert each Chunk as seen fit\npublic func convert(from source: SwiftSource, prepending header: String = \"\", appending footer: String = \"\", conversion convert: (Chunk) -\u003e String) -\u003e String\n```\n\n## 🖍 Syntax Highlighting\nSyntax highlighting for all Swift code is applied via John Sundell's [Splash](https://github.com/JohnSundell/Splash)\n\nNote: For now, the theme for syntax highlighting is hardcoded, but in the future this project should make the theme configurable.\n\n## ⬇️ Installing \n\nTo install the commandline tool:\n\n\n### 🌱 [Mint](https://github.com/yonaskolb/mint) \n```\n$ mint install ldstreet/PlayDocs\n```\n\n### 🔧 Make \n\nRun in terminal:\n```\ngit clone https://github.com/ldstreet/PlayDocs.git \u0026\u0026 cd PlayDocs \u0026\u0026 make install\n```\n\n### 🏃‍♂️ [Marathon](https://github.com/johnsundell/marathon) \nAdd to your Marathonfile:\n```\nmarathon add https://github.com/ldstreet/PlayDocs.git\n```\nOr use the inline dependency syntax:\n\n```swift\nimport PlayDocsKit // https://github.com/ldstreet/PlayDocs.git\n```\n\n### 🎁 [Swift Package Manager](https://swift.org/package-manager) \nTo use PlayDocsKit add the following to your `Package.swift` file.\n```swift\n// 🏓 A framework for converting Playgrounds and Swift files to markdown and html\n.package(url: \"https://github.com/ldstreet/PlayDocs.git\", from: \"0.1.0\"),\n\n.target(name: \"MyPackage\", dependencies: [\"PlayDocsKit\"]),\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fldstreet%2Fplaydocs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fldstreet%2Fplaydocs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fldstreet%2Fplaydocs/lists"}