{"id":30624433,"url":"https://github.com/bmoneill/md2roff","last_synced_at":"2025-08-30T17:10:17.803Z","repository":{"id":135559399,"uuid":"254781909","full_name":"bmoneill/md2roff","owner":"bmoneill","description":"A markdown to roff (ms or manpage) compiler","archived":false,"fork":false,"pushed_at":"2025-08-10T17:36:31.000Z","size":184,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-10T19:22:55.489Z","etag":null,"topics":["compiler","groff","lex","manpage-generator","manpages","markdown","pandoc","roff","troff"],"latest_commit_sha":null,"homepage":"","language":"Lex","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/bmoneill.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-04-11T03:02:18.000Z","updated_at":"2025-08-10T17:36:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"226334e8-55a1-4ec1-8a43-777fad0808ac","html_url":"https://github.com/bmoneill/md2roff","commit_stats":null,"previous_names":["bmoneill/md2roff","boneill02/md2roff"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bmoneill/md2roff","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmoneill%2Fmd2roff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmoneill%2Fmd2roff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmoneill%2Fmd2roff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmoneill%2Fmd2roff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bmoneill","download_url":"https://codeload.github.com/bmoneill/md2roff/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmoneill%2Fmd2roff/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272878320,"owners_count":25008336,"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","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["compiler","groff","lex","manpage-generator","manpages","markdown","pandoc","roff","troff"],"created_at":"2025-08-30T17:10:15.260Z","updated_at":"2025-08-30T17:10:17.794Z","avatar_url":"https://github.com/bmoneill.png","language":"Lex","funding_links":[],"categories":[],"sub_categories":[],"readme":"# md2roff\n\n![Build and test](https://github.com/bmoneill/md2roff/actions/workflows/build-test.yml/badge.svg)\n\n`md2roff` converts Markdown to roff source (ms or man formats). This is useful\nfor converting Markdown files to printable PDFs or generating a manpage from\na Markdown file.\n\n## Prerequisites\n\n* A [lex](https://github.com/westes/flex/).\n\n## Building\n\n### Linux\n\n```shell\nmake\nsudo make install\n```\n\n## Usage\n\nThe wrapper program, `md2roff`, must take either `-ms` or `-man` as an argument.\nArguments for `md2ms` and `md2man` may be added as well. Input and output files\nare `stdin` and `stdout` by default.\n\n```shell\nmd2roff [-ms|-man] [-t title] [-o outputfile] [args...] [inputfile]\n```\n\nNote: `md2roff` must be installed for the wrapper to work.\n\n## Options\n\n### md2ms\n\n```shell\nmd2ms [-bnT] [-t title] [-a author] [-o outputfile] [inputfile]\n```\n\n* `-b`: Disable page break between the title page and contents.\n* `-n`: Disable display of the current date.\n* `-T`: Use the first heading (`#`) as the document title.\n* `-t title`: Set the document title.\n* `-a author`: Set the document author.\n* `-o outputfile`: Set the output file.\n\n### md2man\n\n```shell\nmd2man [-t title] [-o outputfile] [inputfile]\n```\n\n* `-t title`: Add custom title header (`.TH`)\n* `-o outputfile`: Set the output file.\n\n### Examples\n\n* See [examples/README.pdf](examples/README.pdf) for a PDF version of this README generated by `md2roff`.\n* See [examples/README.1](examples/README.1) for a manpage version of this README generated by `md2roff`.\n\n```shell\n# Convert to postscript\nmd2roff -ms -t \"My File\" mymarkdown.md | groff -ms -Tps \u003emyps.ps\n\n# Convert to PDF\nmd2roff -ms -t \"My File\" mymarkdown.md | groff -ms -Tpdf \u003emypdf.pdf\n\n# Convert to manpage\nmd2roff -man -t 'MYMANPAGE 1 \"May 2025\" \"mymanpage\" \"User Commands\"' mymarkdown.md \u003emymanpage.1\n```\n\n## Bugs\n\nIf you find a bug, submit an issue, PR, or email me with a description and/or patch.\n\n## License\n\nCopyright (c) 2019-2025 Ben O'Neill \u003cben@oneill.sh\u003e. This work is released under the\nterms of the MIT License. See [LICENSE](LICENSE) for the license terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmoneill%2Fmd2roff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbmoneill%2Fmd2roff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmoneill%2Fmd2roff/lists"}