{"id":25654143,"url":"https://github.com/p3lim/lua-doc-parser","last_synced_at":"2025-07-12T06:36:19.677Z","repository":{"id":65155630,"uuid":"143631489","full_name":"p3lim/lua-doc-parser","owner":"p3lim","description":"Lua comments to Markdown docs","archived":false,"fork":false,"pushed_at":"2024-07-23T16:25:45.000Z","size":20,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-21T09:01:57.884Z","etag":null,"topics":["action","documentation","lua","markdown"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/p3lim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-08-05T16:54:10.000Z","updated_at":"2025-02-16T09:24:06.000Z","dependencies_parsed_at":"2025-04-16T15:20:53.313Z","dependency_job_id":"76738df7-47f6-4f07-b209-cb233376257f","html_url":"https://github.com/p3lim/lua-doc-parser","commit_stats":{"total_commits":35,"total_committers":3,"mean_commits":"11.666666666666666","dds":0.4,"last_synced_commit":"22be1af52a0c1dadc1b8ed0dbe2d2e34d5b2da1f"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/p3lim/lua-doc-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p3lim%2Flua-doc-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p3lim%2Flua-doc-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p3lim%2Flua-doc-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p3lim%2Flua-doc-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p3lim","download_url":"https://codeload.github.com/p3lim/lua-doc-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p3lim%2Flua-doc-parser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264951610,"owners_count":23687974,"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":["action","documentation","lua","markdown"],"created_at":"2025-02-23T20:17:51.558Z","updated_at":"2025-07-12T06:36:19.661Z","avatar_url":"https://github.com/p3lim.png","language":"Python","readme":"# lua-doc-parser\n\nThis is a Python script that will generate Markdown documentation from Lua source code.  \nIt parses any Lua files in the current directory for any [multi-line comment](https://www.lua.org/pil/1.3.html) blocks and sequentially adds them to a markdown file based on the \"header\" of the comment block.\n\nExample:\n```lua\n--[[ Header:method\nHello world!\n--]]\n```\n\nThis will create the following markup in a file named `Header.md`:\n```markdown\n### Header:method\n\nHello world!\n```\n\n`Header` and `method` can be anything you want, but has to be separated by a colon (`:`) or a period (`.`).  \nThe \"magic\" method name \"header\" can be used to force a block to appear on the top of the document as a header for the file, e.g:\n\n```lua\n--[[ MyObject:foo(_bar_)\nThis is a method `foo`, which takes argument `bar`.\n--]]\n--[[ MyObject:header\nThis will be at the **top** of the [MyObject](MyObject) document!  \nMethods:\n- [foo(_bar_)](MyObject#myobjectfoobar)\n--]]\n```\n\nAs you can see, any markdown notation is allowed inside the block.\n\nIndentation is limited to _tabs_ for the blocks, and any indendation inside the blocks is limited to _spaces_.\nThis is to allow code snippets in documentation in-line in functions to parse correctly.\n\n## Usage\n\n```\nusage: parse.py [-h] [-o OUTPUT_DIR] [-b SEPARATOR] [-s HEADER_SIZE]\n\noptional arguments:\n  -h, --help      show this help message and exit\n  -o OUTPUT_DIR   output directory (default: \"docs\")\n  -b SEPARATOR    block separator (default: \"***\")\n  -s HEADER_SIZE  header size (default: 3)\n```\n\n## GitHub Action\n\nThis is an example workflow that will do the following:\n- checkout the project and its wiki\n- use this script as an action, outputting to the wiki directory\n- commit and push the changes of the wiki directory\n\n```yaml\nname: Generate documentation\non: push\n\njobs:\n  docs:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Clone project\n        uses: actions/checkout@v4\n\n      - name: Clone wiki\n        uses: actions/checkout@v4\n        with:\n          repository: ${{ github.repository }}.wiki\n          path: .wiki\n\n      - name: Parse and generate documentation\n        uses: p3lim/lua-doc-parser@v2\n        with:\n          output: .wiki\n\n      - name: Push wiki changes\n        working-directory: .wiki\n        run: |\n          git config user.name CI\n          git config user.email \"\u003c\u003e\"\n          git add .\n          git diff --quiet HEAD || git commit -m \"$GITHUB_SHA\"\n          git push\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp3lim%2Flua-doc-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp3lim%2Flua-doc-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp3lim%2Flua-doc-parser/lists"}