Skip to content

Cli tool to extract code blocks from Readme files and save them onto separate files.

License

Notifications You must be signed in to change notification settings

djrmarques/gmbe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Markdown Block Exporter

Cli tool to extract code blocks from Readme files, saves them onto separate files.

Go Markdown Block Extractor will extract all the codeblocks from markdown files and save them as their own separate files. This allows to run checks like linting, formating or any other custom checks to make sure that the code blocks in the markdown files, which most likely are some sort of documentation, are actually valid.

Instalation

First, install the go programming language.

Then run:

go install github.com/djrmarques/gmbe@latest

Verify installation with

gmbe --help

Usage

Use the following command:

gmbe extract -f Readme.md

This command will create a folder called Readme, and inside there will be files with the code blocks.

Usage options

There are a few usage flags that can be used:

It's possible to specify the output folder with:

gmbe extract  -o folder -f Readme.md # This will save the files inside this folder

It's also possible to join all the codeblocks of the same type inside the same file

gmbe extract -j -f Readme.md # This will join all code blocks of the same type in the same file

About

Cli tool to extract code blocks from Readme files and save them onto separate files.

Resources

License

Stars

Watchers

Forks

Packages

No packages published