https://github.com/hymkor/example-into-readme
Insert example-files into `README.md` at the code block in the current directory.
https://github.com/hymkor/example-into-readme
Last synced: 24 days ago
JSON representation
Insert example-files into `README.md` at the code block in the current directory.
- Host: GitHub
- URL: https://github.com/hymkor/example-into-readme
- Owner: hymkor
- License: mit
- Created: 2023-03-22T19:42:57.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-12-13T01:57:27.000Z (5 months ago)
- Last Synced: 2025-02-10T15:50:55.100Z (3 months ago)
- Language: Go
- Homepage:
- Size: 36.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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 ... |
```Include other markdown
----------------
Install
-------Download the binary package from [Releases](https://github.com/hymkor/example-into-readme/releases) and extract the executable.
### Use go install
```
go install github.com/hymkor/example-into-readme@latest
```### Use the 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
```