{"id":18896164,"url":"https://github.com/tenable/nasldoc","last_synced_at":"2025-04-15T01:34:25.455Z","repository":{"id":675010,"uuid":"2050679","full_name":"tenable/nasldoc","owner":"tenable","description":"A documentation generator for NASL.","archived":false,"fork":false,"pushed_at":"2022-05-31T16:38:12.000Z","size":318,"stargazers_count":17,"open_issues_count":3,"forks_count":4,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-10-20T06:20:24.114Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.tenable.com/products/nessus","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tenable.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2011-07-15T00:44:23.000Z","updated_at":"2023-04-05T10:22:13.000Z","dependencies_parsed_at":"2022-08-16T10:40:18.680Z","dependency_job_id":null,"html_url":"https://github.com/tenable/nasldoc","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tenable%2Fnasldoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tenable%2Fnasldoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tenable%2Fnasldoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tenable%2Fnasldoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tenable","download_url":"https://codeload.github.com/tenable/nasldoc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223655192,"owners_count":17180673,"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-11-08T08:32:43.629Z","updated_at":"2024-11-08T08:32:43.729Z","avatar_url":"https://github.com/tenable.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nasldoc\n\n### Installation\n\nInstallation is really easy, all you need to do is gem install!\n\n        % gem install nasldoc\n\n#### Usage\n\nUsing `nasldoc` is fairly simple; just pass it a directory or a single file that you want to generate the documentation for. `nasldoc` is designed to only parse .inc files which special comment markup.\n\n        % nasldoc /opt/nessus/lib/nessus/plugins/\n\nThis will cause a directory called `nasldoc/` to be created in your current directory. This directory will contain all of the generated HTML documents. After running `nasldoc`, open `index.html` inside of `nasldoc/` and view the documentation.\n\n#### Comment Markup\n\n`nasldoc` comments are inclosed in ## blocks and use special tags to mark items. Currently, there are only 3 tags. Tags can be added in a matter of minutes to the parser.\n\nnasldoc supports several markup tags:\n\n- @param - used to label named arguments to a function\n- @anonparam - used to label anonymous arguments to a function\n- @return - what the function returns\n- @deprecated - notation for functions that shouldn't be used\n- @nessus - minimum Nessus version supported\n- @category - type of category for the function\n- @remark - special notes or remarks\n\n### Function Description Block\n\nThe function description block is free form text from the first ## block to the first @tag in the `nasldoc` body. The lines are split on the # and rejoined with spaces.\n\nExample:\n\n        ##\n        # An example addition function in NASL\n        #\n        # @param arg1 first number to add\n        # @param arg2 second number to add\n        #\n        # @return the sum of arg1 and arg2\n        ##\n        function add(arg1, arg2)\n        {\n          return (arg1 + arg2);\n        }\n\n### Variable types\n\nIf you'd like, you can provide variable type descriptions.  The syntax is as follows:\n\n        ##\n        # An example addition function in NASL\n        #\n        # @param \u003carg1:int\u003e first number to add\n        # @param [arg2:int] second number to add\n        #\n        # @return the sum of arg1 and arg2\n        ##\n        function add(arg1, arg2)\n        {\n          return (arg1 + arg2);\n        }\n\nYou can wrap the name:type tuple using either '[]' or '\u003c\u003e'.\n\n### Templates\n\n`nasldoc` uses the ERB templating engine to make generating the output HTML trivial. Attached is an example of the sidebar; ruby code can be injected to help generate the layout.\n\nExample:\n\n        \u003chtml\u003e\n                \u003chead\u003e\n                        \u003ctitle\u003enasldoc\u003c/title\u003e\n                        \u003clink rel = 'stylesheet' type= 'text/css' href='stylesheet.css'\u003e\n                \u003c/head\u003e\n                \u003cbody\u003e\n                        \u003cimg src='nessus.jpg' /\u003e\n                        \u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n                        \u003cul\u003e\n                                \u003c% @file_list.each_with_index do |file, i| %\u003e\n                                        \u003c% row_class = i % 2 == 0 ? \"even\" : \"odd\" %\u003e\n                                        \u003c% output_file = file.gsub(\".\", \"_\") %\u003e\n                                        \u003c% output_file = File.basename(file).gsub(\".\", \"_\") %\u003e\n                                        \u003cli class=\"\u003c%= row_class %\u003e\"\u003e\u003ca href='\u003c%= output_file %\u003e.html' target='content'\u003e\u003c%= File.basename(file) %\u003e\u003c/a\u003e\u003c/li\u003e\n                                \u003c% end %\u003e\n                        \u003c/ul\u003e\n                        \u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n                        \u003cul\u003e\u003ca href='overview.html' target='content'\u003eHome\u003c/a\u003e\u003c/ul\u003e\n                \u003c/body\u003e\n        \u003c/html\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftenable%2Fnasldoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftenable%2Fnasldoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftenable%2Fnasldoc/lists"}