Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thomastjdev/nimtomd
Convert a Nim file to Markdown
https://github.com/thomastjdev/nimtomd
markdown nim nim-to-markdown readme-md
Last synced: about 1 month ago
JSON representation
Convert a Nim file to Markdown
- Host: GitHub
- URL: https://github.com/thomastjdev/nimtomd
- Owner: ThomasTJdev
- License: mit
- Created: 2018-10-20T18:38:42.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-09-30T07:20:13.000Z (about 1 year ago)
- Last Synced: 2023-09-30T08:47:11.152Z (about 1 year ago)
- Topics: markdown, nim, nim-to-markdown, readme-md
- Language: Nim
- Size: 57.6 KB
- Stars: 14
- Watchers: 4
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Nim to Markdown
*Generated with [Nim to Markdown](https://github.com/ThomasTJdev/nimtomd)*
This Nim package converts Nim code to Markdown. Use `nimtomd`
on your Nim file and transform it into a styled Markdown file.You can choose to only include global elements (*) and top
comments, or you can include everything.# Usage:
```nim
nimtomd [options]
```# Options:
```nim
Options:
Nim-file to convert into markdown
-h, --help Shows the help menu
-o:, --output:[filename] Outputs the markdown to a file
-ow, --overwrite Allow to overwrite a existing md file
-g, --onlyglobals Only include global elements (*)
-sh Skip headings
-si Skip imports
-st Skip types
-il, --includelines Include linenumbers
-ic, --includeconst Include const
-il, --includelet Include let
-iv, --includevar Include var
```## Requirements
Your code needs to follow the Nim coding style. Checkout the
source file for examples.## Examples
This README.md is made with ``nimtomd`` with the command:
```nim
nimtomd -o:README.md -ow -g nimtomd.nim
```# Output to screen
This prints the Markdown output to the screen:
```nim
nimtomd filename.nim
```# Save output to file
You can force ``nimtomd`` to overwrite an existing file
by using the option ``-ow``.```nim
nimtomd -o:README.md -ow filename.nim
```