example-into-readme

command module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2023 License: MIT Imports: 11 Imported by: 0

README

example-into-readme

This program inserts example-files into README.md at the code block in the current directory.

README.md before running

```go.mod
```

README.md after running

```go.mod
module github.com/hymkor/example-into-readme

go 1.20
```

The info-string at the header of codeblocks has to have a filename to include the file. When a filename is not written, the block will not be changed.

$ ./example-into-readme.exe
Convert from README.md to README.tmp
Include go.mod
Rename README.md to README.md~
Rename README.tmp to README.md

When *.go is given as a filename, skip lines until package is found to ignore //go:build.

Specify the language for codeblock

On GitHub, the codeblock for some languages can not be judged with their extensions only. Then, you can write the name of languge before filename.

```LANGNAME FILENAME
```

For example:

```rust foo.rs
```

Quoting the output of the command

```COMMANDNAME ARGS ... |
```

Install

Download the binary package from Releases and extract the executable.

for scoop-installer
scoop install https://raw.githubusercontent.com/hymkor/example-into-readme/master/example-into-readme.json

or

scoop bucket add hymkor https://github.com/hymkor/scoop-bucket
scoop install example-into-readme

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL