{ "info": { "author": "Paul Wexler", "author_email": "paul@prometheusresearch.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Programming Language :: Python" ], "description": "=====================\ndocutils_react_docgen\n=====================\n\nOverview\n========\n\ndocutils extension for documenting React modules.\nRequires react-docgen\n\nExample\n-------\n\nHere is the restructured text to display all of the\nReact modules in `static/js/lib/my`. Source links \nto each module are relative to the `src` option::\n \n My JS/React Library\n ===================\n\n .. contents:: Table of Contents\n\n .. reactdocgen:: static/js/lib/my\n :src: https://bitbucket.org/.../my/src/tip\n\nInstallation\n============\n\nFrom PyPi\n::\n\n $ pip install docutils-react-docgen \n\nFrom source\n::\n\n $ hg clone ssh://hg@bitbucket.org/pwexler/docutils_react_docgen\n $ pip install -e docutils_react_docgen/\n\nThe installation is successful if you can import docutils_react_docgen. \nThe following command must produce no errors::\n\n $ python -c 'import docutils_react_docgen'\n\n\nUsage\n-----\n\nIn your `conf.py` you must import docutils_react_docgen::\n\n import docutils_react_docgen\n \nIn your restructured text document(s) include the `reactdocgen` directive,\nand the react-docgen command on the same line,\nfollowed by zero or more option lines, \nfollowed by a blank line::\n\n .. reactdocgen:: /path/to/your/react/modules/ [react-docgen options]\n :option: value \n \nThis will convert the output of::\n\n react-docgen /path/to/your/react/modules/ [react-docgen options]\n\ninto restructured text and insert it in place of the directive.\n\nreact-docgen lets you filter which modules to extract meta data from.\nSee::\n\n react-docgen --help\n\nfor an explanation of the react-docgen command line options.\n\nEach module is displayed with a heading\nshowing the module name\n(which can appear in the table of contents), \noptionally followed by a link to its source code,\nfollowed by its description, \nfollowed by its properties shown alphabetically in a definition list. \n\nOptions\n-------\n\nEach option is shown with its default value.\n\n`exclude`\n default:\n\n Use this option to filter which modules appear in the output.\n\n If provided, this regular expression is compiled into a pattern\n using python's re module.\n Then if the pattern is found in a module's description (using re.search), \n the module is excluded from the output.\n \n`include`\n default:\n\n Use this option to filter which modules appear in the output.\n\n If provided, this regular expression is compiled into a pattern \n using python's re module.\n Then a module is included in the output only if \n the pattern is found in the module's description (using re.search). \n \n`module_description_missing` \n default: Module doc string is missing!\n\n The string to display whenever a module's 'description' key value is empty.\n\n`module_prop_description_missing` \n default: Property doc string is missing!\n\n The string to display whenever a property's 'description' key value is empty.\n\n`module_underline_character` \n default: \\-\n\n The underline character for the module heading.\n\n.. _path_index:\n\n`path_index`\n default: 0\n\n The index to the path argument. \n\n This index is the number of arguments which preceed the path argument \n in the argument string passed to the directive.\n\n When the `project_base`_ setting is used, \n the directive uses ``path_index`` to identify the path argument\n from the list of arguments it was called with.\n The default index of 0, \n means the path argument is the first in the list.\n\n Change this option if you want to pass additional arguments to react-docgen\n which preceed the path argument.\n\n`show_prop_type`\n default: False\n\n If True, display the property type name.\n \n`src` \n default: \n\n If empty, no link is displayed for each module.\n\n If not empty, it is the prefix used when linking to the source code.\n The url is the prefix followed by '/' followed by the module filename.\n\n`tab_size` \n default: 4\n\n The number of space characters to replace each tab character with.\n\n`use_commonjs_module_name` \n default: True\n\n If True, \n a search for the CommonJS package proceeds \n recursively starting with the given directory\n and working up the directory tree towards the root.\n\n If False, \n or (if True and) no bower.json or package.json can be found,\n the module name will appear as its filename instead of its \n CommonJS Module name.\n\n \nChanging Default Options\n------------------------\n\nThe default values of all the options \nmay be changed directly. \nFor example::\n\n import docutils_react_docgen\n docutils_react_docgen.DEFAULT_OPTIONS['module_description_missing'] = ''\n\nSettings\n--------\n\n`react_docgen` \n default: react-docgen\n\n The react-docgen command to run. \n \n Use this setting to provide a path to the react-docgen executable. \n The default assumes that react-docgen is in the PATH.\n\n This setting can contain spaces so it is possible to invoke an alternate \n implementation of react-docgen with some leading options. \n\n.. _project_base:\n\n`project_base`\n default: None\n\n The base address of the project at run-time.\n\n Use this setting in dynamic build environments, to establish the \n absolute address of the project.\n\n Ordinarily, you would cd to the base of your project (where setup.py is) \n and run::\n\n python setup.py build_sphinx\n \n However, some build environments are created dynamically. \n In some cases it is not possible to know in advance \n either the current directory\n or your project's relation to it.\n In these cases the directive is unable to find your React files to process\n unless you tell it how.\n \n As long as you know where conf.py is in relation to the project's base, \n you can set ``project_base`` in conf.py by virtue of Python's built-in \n __file__ attribute and os.path methods. \n\n When this setting is not None (note that \"\" is not None), \n and the path argument to the directive is a relative address,\n then the directive will construct an absolute path \n by prepending the project base::\n\n path = os.path.abspath(os.path.join(\n SETTINGS['project_base'], \n path_argument))\n\n .. note::\n\n You may want to adjust the `path_index`_ option when using this option.\n\n`rst_output`\n default: None (no separate output file)\n\n The full path of a separate output file \n to hold only the rst generated by the directive.\n\n When not None, \n the output file is created each time the directive is executed.\n\n When there are rst errors in the JavaScript source\n sphinx reports the offending line numbers.\n Using this option you can locate the errors\n at the given line numbers in the separate output file.\n\nChanging Settings\n-----------------\n\nThe values of all the settings \nmay be changed directly. \nFor example to set the path to react-docgen::\n\n import docutils_react_docgen\n react_docgen = './static/js/node_modules/react-docgen/bin/react-docgen.js'\n docutils_react_docgen.SETTINGS['react_docgen'] = react_docgen\n\nTo make the project base absolute, let's suppose conf.py is in doc/\nrelative to the project's base, \nand the React modules are in static/js/lib/\n\nThen in your conf.py::\n\n import docutils_react_docgen\n import os\n docutils_react_docgen.SETTINGS['project_base'] = os.path.join(\n '../',\n os.path.dirname(__file__))\n\nAnd in your .rst file::\n\n .. react-docgen:: static/js/lib \n\nProviding a Custom Formatter\n----------------------------\n\nProceed by creating a module,\nsub-classing both Formatter and ReactDocgen,\nand registering your directive::\n\n import docutils_react_docgen\n from docutils.parsers import rst\n \n class MyFormatter(docutils_react_docgen.Formatter):\n ... overwrite methods as necessary \n \n class MyDirective(docutils_react_docgen.ReactDocgen):\n formatter_class = MyFormatter\n\n rst.directives.register_directive('mydirective', MyDirective)\n\nThe formatter_class will be invoked as follows::\n\n rst = self.formatter_class(options, dirname).run(doc_dict)\n\noptions\n A dict of the directive options.\n\ndirname\n The path to search for the CommonJS package.\n\ndoc_dict\n A dict of module metadata loaded from the JSON blob \n returned by react-docgen. \n The keys are the module file names,\n and the values are dicts of React module metadata.\n \nThe run() method must return a string \ncontaining the desired restructured text.\n\nFinally, insure that the module containing your directive is imported \nby conf.py", "description_content_type": null, "docs_url": "https://pythonhosted.org/docutils_react_docgen/", "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/pwexler/docutils_react_docgen", "keywords": "docutils,sphinx,react,docgen,documentation", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "docutils_react_docgen", "package_url": "https://pypi.org/project/docutils_react_docgen/", "platform": "Any", "project_url": "https://pypi.org/project/docutils_react_docgen/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://bitbucket.org/pwexler/docutils_react_docgen" }, "release_url": "https://pypi.org/project/docutils_react_docgen/1.1.0/", "requires_dist": null, "requires_python": null, "summary": "docutils extension which converts react-docgen output to restructured text", "version": "1.1.0" }, "last_serial": 2087599, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "8b54a5856709fd6ed7b34279cff9b5b4", "sha256": "d454bfc8304f92b53953f0d5ce1a7076b295f1a46e9e4341046e08d5ef332b83" }, "downloads": -1, "filename": "docutils_react_docgen-0.0.2.tar.gz", "has_sig": false, "md5_digest": "8b54a5856709fd6ed7b34279cff9b5b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4997, "upload_time": "2015-04-27T18:06:31", "url": "https://files.pythonhosted.org/packages/cc/68/367bdbd7ca8636a744fc901b90105820db18afd2304b43e3f655018ba1fd/docutils_react_docgen-0.0.2.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "94c2d0faf0769c2a0e7983209d16b4d1", "sha256": "59e0d8ade3e0c9df26139c34786ffac9a34294598360704ad2b68ca5240f6c47" }, "downloads": -1, "filename": "docutils_react_docgen-0.1.0.tar.gz", "has_sig": false, "md5_digest": "94c2d0faf0769c2a0e7983209d16b4d1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6390, "upload_time": "2015-05-01T20:43:39", "url": "https://files.pythonhosted.org/packages/ed/9a/c81121ad7d1801ed54ba8c523ed50d8d582ead61512e9f5b6a7360da706e/docutils_react_docgen-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "d0141367c56e2d9d19d8fdee8995ff85", "sha256": "45571133bfca0eb516b5301e22bda40699ebc8412e01f2824a6f3c891851d05f" }, "downloads": -1, "filename": "docutils_react_docgen-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d0141367c56e2d9d19d8fdee8995ff85", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6469, "upload_time": "2015-05-18T22:04:06", "url": "https://files.pythonhosted.org/packages/31/78/5fd8e54ff939fac081bcda3bb2f408e20df7d105a5ec500c5a0b240313ea/docutils_react_docgen-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "ad3744d6ebac5adf6093dae999fbcceb", "sha256": "eacd6576f5a5c16c4a74f70d5093ce2ceaf40365910eddabb2b461aa1e9e455a" }, "downloads": -1, "filename": "docutils_react_docgen-0.2.0.tar.gz", "has_sig": false, "md5_digest": "ad3744d6ebac5adf6093dae999fbcceb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6942, "upload_time": "2015-05-31T19:38:14", "url": "https://files.pythonhosted.org/packages/dc/0a/40655a4a32f1a8d4970d0ca37eb8c221c84e0c0aba7ba0331945f8ae294f/docutils_react_docgen-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "3fdc3024a152ee0f7a1e26013efa8d0e", "sha256": "5c75b1e39038612dc0ed2b98d39cb8e8540bae5e7bf2b19cdadfd4076bcf1778" }, "downloads": -1, "filename": "docutils_react_docgen-0.3.0.tar.gz", "has_sig": false, "md5_digest": "3fdc3024a152ee0f7a1e26013efa8d0e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8531, "upload_time": "2015-06-04T19:19:08", "url": "https://files.pythonhosted.org/packages/38/c4/f5ad723d67b840663a6dc7e3aafde019d4b9098d35b3c6a7706327f9d958/docutils_react_docgen-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "d04bd47c03228ddca6607f388445e339", "sha256": "94330a50076bb4005209bb251486735ae70e152f9de9abbd27899f0efa3910a8" }, "downloads": -1, "filename": "docutils_react_docgen-0.4.0.tar.gz", "has_sig": false, "md5_digest": "d04bd47c03228ddca6607f388445e339", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8853, "upload_time": "2015-08-17T15:43:26", "url": "https://files.pythonhosted.org/packages/4a/77/ff504cdfd71be4449939f6ce96c0128dbc3638945255e67d034044eb96bb/docutils_react_docgen-0.4.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "d09db47a32feb92391cfaebe1ed97d07", "sha256": "8559305ae2a7d87eb03435e09fda6002e5b689bfdcff063711c656f997b7cb86" }, "downloads": -1, "filename": "docutils_react_docgen-1.0.0.tar.gz", "has_sig": false, "md5_digest": "d09db47a32feb92391cfaebe1ed97d07", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9304, "upload_time": "2015-09-11T17:17:45", "url": "https://files.pythonhosted.org/packages/cc/19/fc9a65133d15f45992a0c941a0e5561937caed616b02eedb86755e84db56/docutils_react_docgen-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "281879270dbf240bce6700eb36657551", "sha256": "31390e877527df4a15e27009b09517280f15a7bac30d51b2232ded8e086554c3" }, "downloads": -1, "filename": "docutils_react_docgen-1.1.0.tar.gz", "has_sig": false, "md5_digest": "281879270dbf240bce6700eb36657551", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9567, "upload_time": "2015-09-17T19:06:38", "url": "https://files.pythonhosted.org/packages/93/61/50ca14319d721eb05bc466a81101ca00ef76738336605267b1af54408ed4/docutils_react_docgen-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "281879270dbf240bce6700eb36657551", "sha256": "31390e877527df4a15e27009b09517280f15a7bac30d51b2232ded8e086554c3" }, "downloads": -1, "filename": "docutils_react_docgen-1.1.0.tar.gz", "has_sig": false, "md5_digest": "281879270dbf240bce6700eb36657551", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9567, "upload_time": "2015-09-17T19:06:38", "url": "https://files.pythonhosted.org/packages/93/61/50ca14319d721eb05bc466a81101ca00ef76738336605267b1af54408ed4/docutils_react_docgen-1.1.0.tar.gz" } ] }