Skip to main content

Generate RST Swift documentation for Sphinx.

Project description

swift-rst-docs

Python library, cli and Sphinx extension to generate documentation for Swift projects from SourceKitten output files.

Installation

$ pip install swift-rst-docs
$ brew install sourcekitten

Usage

You need to generate a JSON file with SourceKitten first. To reference symbols in your documentation, place their full name between 4 backticks. For example: ``MyStructure.hello(world:)`` or ``MySwiftLibrary.MyStructure.hello(world:)`` when referencing from another module or the documentation's overview text. This will create a link to the symbol's page.

$ sourcekitten doc [--spm] [-- <swift / xcodebuild arguments>] > documentation.json

See the documentation for the various ways of generating documentation pages and an example of a generated Swift documentation. The example documentation is in the repo's docs/swift directory and the SourceKitten documentation files are generated from the tests/MySwiftPackage/generate-documentation.sh

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swift_rst_docs-2.0.post1.tar.gz (206.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swift_rst_docs-2.0.post1-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file swift_rst_docs-2.0.post1.tar.gz.

File metadata

  • Download URL: swift_rst_docs-2.0.post1.tar.gz
  • Upload date:
  • Size: 206.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for swift_rst_docs-2.0.post1.tar.gz
Algorithm Hash digest
SHA256 39dae72a9be9c21498242eca1dc7498503fab740944ee07896233d52b7c631cc
MD5 09271bdb68c0b7720f2653238fec3822
BLAKE2b-256 3a30ed28946cd4da31c615a2acebd596b55c1c4f0b8ee4bda1facb99cfcf2aa8

See more details on using hashes here.

File details

Details for the file swift_rst_docs-2.0.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for swift_rst_docs-2.0.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 982bdca1e1f6124cf00d642ae3e71ce68573c7ff7f3910c02be308ad85c0a9b4
MD5 a892a68c1b2bee17550a682fe376cf31
BLAKE2b-256 93805b383a4f03ea1d04a2f71f3c7feb98d266197d91c1c129101fe7729ad704

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page