Giter VIP home page Giter VIP logo

doccarchive's Introduction

DocCArchive

Swift package to read and process "DocC" archives, a format to document Swift frameworks and packages: Documenting a Swift Framework or Package.

Blog entry on the topic: DocC ๐Ÿ“š Archived and Analyzed.

Status

The module can import all documents created in the SlothCreator example.

It should be pretty complete.

If you find an issue (usually signalled by an assertion or fatalError), please let us know, we'll fix missing cases ASAP (PRs are welcome too).

TODO:

  • Add DocC documentation! ๐Ÿคฆโ€โ™€๏ธ
  • Add a testsuite (existing one not added for sizing concerns).

Usage in a Swift Package

Example Package.swift:

// swift-tools-version:5.0

import PackageDescription

let package = Package(
  name         : "hackdocc",
  products     : [ .executable(name: "hackdocc", targets: [ "hackdocc" ]) ],
  dependencies : [
    .package(url: "https://github.com/DoccZz/DocCArchive.git", from: "0.1.1")
  ],
  targets: [ .target(name: "hackdocc", dependencies: [ "DocCArchive" ]) ]
)

Using the Code

DocCArchive has three main types:

  • DocCArchive, represents the whole archive structure
  • DocumentFolder , represents a documentation folder within that structure
  • Document, represents a a documentation page (topics, types, tutorials, etc, the "JSON files")

Open the archive, access the documentation folder (tutorials is the other one), then Document's can be opened in the folder.

let url     = URL(fileURLWithPath: "~/Downloads/SlothCreator.doccarchive")
let archive = try DocCArchive(contentsOf: url)

if let docs = archive.documentationFolder() {
  ... work it ...
}

Who

servedocc is brought to you by the Always Right Institute and ZeeZide. We like feedback, GitHub stars, cool contract work, presumably any form of praise you can think of.

doccarchive's People

Contributors

edudnyk avatar helje5 avatar

Forkers

marcprux

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.