From 59f57681ec029853413fa43515a0a7aa61966a54 Mon Sep 17 00:00:00 2001 From: Eric Holscher Date: Wed, 10 Jun 2015 14:24:04 -0700 Subject: [PATCH] Add docs on adding a new language. --- README.rst | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index 562c741..a29eeb7 100644 --- a/README.rst +++ b/README.rst @@ -114,9 +114,17 @@ Currently Implemented * Go * Javascript -Future ------- +Adding a new language +--------------------- + +Adding a new language should only take a couple of hours, +assuming your language has a tool to generate JSON from API documentation. + +The steps to follow: + +* Add a new Mapper file in `mappers/`. It's probably easiest to copy an existing one, like the Javascript or Python mappers. +* Implement the :py:func:`create_class` and :py:func:`read_file` methods on the :py:cls:`SphinxMapperBase`. +* Implement all appropriate object types on the :py:cls:`PythonMapperBase` +* Add a test in the `tests/test_integration.py`, along with an example project for the testing. +* Include it in the class mapping in `mappers/base.py` and `extension.py` -Our goal is to support all languages. -Implementation is quite simple, -we'll be adding more docs on implementation soon.