2019-11-15 18:27:41 +00:00
|
|
|
# Gold
|
2019-11-09 22:12:54 +00:00
|
|
|
|
|
|
|
Render markdown on the CLI, with _pizzazz_!
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2019-11-26 20:03:46 +00:00
|
|
|
Use a markdown source as the argument:
|
2019-11-09 22:12:54 +00:00
|
|
|
|
2019-11-22 03:51:44 +00:00
|
|
|
Read from file:
|
2019-11-09 22:12:54 +00:00
|
|
|
```
|
2019-11-26 20:03:46 +00:00
|
|
|
./gold README.md
|
2019-11-09 22:12:54 +00:00
|
|
|
```
|
|
|
|
|
2019-11-22 03:51:44 +00:00
|
|
|
Read from stdin:
|
|
|
|
```
|
2019-11-26 20:03:46 +00:00
|
|
|
./gold -
|
2019-11-22 03:51:44 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Fetch README from GitHub:
|
|
|
|
```
|
2019-11-26 20:03:46 +00:00
|
|
|
./gold github.com/charmbracelet/gold
|
2019-11-25 04:03:26 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Fetch markdown from an HTTP source:
|
|
|
|
```
|
2019-11-26 20:03:46 +00:00
|
|
|
./gold https://host.tld/file.md
|
2019-11-22 03:51:44 +00:00
|
|
|
```
|
|
|
|
|
2019-11-26 20:03:46 +00:00
|
|
|
When `gold` is started without any markdown source, it will try to find a
|
|
|
|
`README.md` or `README` file in the current working directory.
|
|
|
|
|
|
|
|
You can supply a JSON stylesheet with the `-s` flag:
|
|
|
|
```
|
|
|
|
./gold -s mystyle.json
|
|
|
|
```
|
|
|
|
|
2019-11-28 06:11:17 +00:00
|
|
|
## Example Output
|
|
|
|
|
2019-11-28 08:07:08 +00:00
|
|
|
![Gold Dark Style](https://github.com/charmbracelet/gold/raw/master/cmd/gold/styles/dark.png)
|
2019-11-24 04:19:13 +00:00
|
|
|
|
2019-11-28 07:35:24 +00:00
|
|
|
Check out the [Gold Style Gallery](https://github.com/charmbracelet/gold/blob/master/cmd/gold/styles/README.md)!
|
|
|
|
|
2019-11-09 22:12:54 +00:00
|
|
|
## Colors
|
|
|
|
|
|
|
|
Currently `gold` uses the [Aurora ANSI colors](https://godoc.org/github.com/logrusorgru/aurora#Index).
|
2019-11-24 04:19:13 +00:00
|
|
|
|
2019-11-28 06:11:17 +00:00
|
|
|
## Development
|
2019-11-24 04:19:13 +00:00
|
|
|
|
2019-11-28 06:11:17 +00:00
|
|
|
Style definitions located in `styles/` can be embedded into the binary by
|
|
|
|
running [statik](https://github.com/rakyll/statik):
|
|
|
|
```
|
|
|
|
statik -f -src styles -include "*.json"
|
|
|
|
```
|
|
|
|
|
|
|
|
You can re-generate screenshots of all available styles by running `gallery.sh`.
|
|
|
|
This requires `termshot` and `pngcrush` installed on your system!
|