champollion.parser¶
Parser to fetch_environment all information from a Javascript API in order to document each element from a simple identifier.
-
champollion.parser.
fetch_environment
(path)[source]¶ Return Javascript environment dictionary from path structure.
Raises
OSError
if the directory is incorrect.The environment is in the form of:
{ "module": { "module.id": { "id": "module.id", "name": "module_name", "file_id": "file/id/index.js" "description": "A module." ... }, ... }, "file": { "file/id/index.js": { "id": "file/id/index.js", "module_id": "module_id", "content": "...", ... }, ... }, "class": { "class_id": { "id": "class_id", "module_id": "module_id" "description": "A class." ... }, ... }, "method": { "method_id": { "id": "method_id", "class_id": "class_id", "module_id": "module_id", "description": "A method." ... }, ... }, "attribute": { "attribute_id": { "id": "attribute_id", "class_id": "class_id", "module_id": "module_id", "description": "An attribute." ... }, ... }, "function": { "function_id": { "id": "function_id", "module_id": "module_id", "description": "A function." ... }, ... }, "data": { "data_id": { "id": "data_id", "module_id": "module_id", "description": "A variable." ... }, ... } }