{"id":13580788,"url":"https://github.com/legovaer/jsonnet-docblock-parser","last_synced_at":"2025-08-15T16:31:39.302Z","repository":{"id":62572893,"uuid":"245270333","full_name":"legovaer/jsonnet-docblock-parser","owner":"legovaer","description":"Simple, powerfull jsonnet docblock parser that returns a JSON representation to work with","archived":false,"fork":false,"pushed_at":"2020-08-03T08:36:26.000Z","size":24,"stargazers_count":10,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-04T16:08:02.703Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/legovaer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-05T21:21:51.000Z","updated_at":"2021-10-28T13:27:18.000Z","dependencies_parsed_at":"2022-11-03T18:27:10.411Z","dependency_job_id":null,"html_url":"https://github.com/legovaer/jsonnet-docblock-parser","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/legovaer%2Fjsonnet-docblock-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/legovaer%2Fjsonnet-docblock-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/legovaer%2Fjsonnet-docblock-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/legovaer%2Fjsonnet-docblock-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/legovaer","download_url":"https://codeload.github.com/legovaer/jsonnet-docblock-parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229929855,"owners_count":18146400,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T15:01:55.119Z","updated_at":"2024-12-16T08:28:01.385Z","avatar_url":"https://github.com/legovaer.png","language":"Python","readme":"# Jsonnet Docblock Parser\n\nJDP is a simple, powerfull jsonnet docblock parser that returns a JSON representation to work with.\n\n[![Build Status](https://travis-ci.com/legovaer/jsonnet-docblock-parser.svg?branch=master)](https://travis-ci.com/legovaer/jsonnet-docblock-parser)\n[![PyPI status](https://img.shields.io/pypi/status/jsonnet_docblock_parser.svg)](https://pypi.python.org/pypi/jsonnet_docblock_parser/)\n[![PyPI version shields.io](https://img.shields.io/pypi/v/jsonnet_docblock_parser.svg)](https://pypi.python.org/pypi/jsonnet_docblock_parser/)\n[![PyPI license](https://img.shields.io/pypi/l/jsonnet_docblock_parser.svg)](https://pypi.python.org/pypi/jsonnet_docblock_parser/)\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/jsonnet_docblock_parser.svg)](https://pypi.python.org/pypi/jsonnet_docblock_parser/)\n\nThis parser will extract docblocks from your `.jsonnet` or `.libsonnet` files. This package\nincludes a generator that allows you to output the parsed information into JSON format.\n\nThe parser assumes that the documentation inside these files is written in a syntax that is \nsimilar to JavaScript, Java and many C++ scripts:\n\n```\n{\n  /**\n   * Returns whether the string a is prefixed by the string b.\n   *\n   * @param a The input string.\n   * @param b The prefix.\n   * @return true if string a is prefixed by the string b or false otherwise.\n   */\n  startsWith(a, b):\n    if std.length(a) \u003c std.length(b) then\n      false\n    else\n      std.substr(a, 0, std.length(b)) == b,\n}\n```\n\n## Installation\n\nYou can install the tool via pip:\n\n```bash\npip install jsonnet-docblock-parser\n```\n\n## Module Usage\n\n```python\n#!/usr/bin/env python\n# encoding: utf-8\n\nfrom jsonnet_docblock_parser import parseFile, Generator\n\n# Load a jsonnet or libsonnet file.\nTEST_FILE = \"some.jsonnet\"\n\n# Parse the file.\ndocblocks = parseFile(TEST_FILE)\n\n# Load the generator.\ngenerator = Generator()\n\n# Parse Json based on the results.\njson = generator.parse_json(results)\n\n# Print the json\nprint(json)\n```\n\n## CLI Usage\n\n```bash\njdp --file some.jsonnet\n```\n\n## Development\n\n### Testing\n\n```bash\npytest\n```\n\n### PyLint\n\n```bash\npylint jsonnet_docblock_parser\n```\n\n### Deploying to PyPi\n\n```bash\npython3 setup.py sdist\ntwine upload dist/*\n```\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flegovaer%2Fjsonnet-docblock-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flegovaer%2Fjsonnet-docblock-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flegovaer%2Fjsonnet-docblock-parser/lists"}