Skip to content

kotaoue/gtmd

Repository files navigation

gtmd

Go codecov Go Report Card License

Get the title tag and make markdown.

Flags

Flag Short Values Default Description
--url -u any URL Source URL (can also be given as a positional argument)
--format -f link, clipboard Output format. Creates a markdown file when not set.
--source -s bookmeter, manual Source type. Auto-detected from the URL when not set. Use manual to bypass auto-detection.

Usage

Basic usage (creates markdown file)

$ go run . --url https://go.dev/play/

$ cat "Go Playground - The Go Programming Language.md"
# [Go Playground - The Go Programming Language](https://go.dev/play/)

Using short flags

go run . -u https://go.dev/play/

Using positional arguments

go run . https://go.dev/play/

Output as markdown link (--format)

# Print to stdout
$ go run . -u https://go.dev/play/ -f link
[Go Playground - The Go Programming Language](https://go.dev/play/)

# Copy to clipboard
$ go run . -u https://go.dev/play/ -f clipboard
Copied to clipboard: [Go Playground - The Go Programming Language](https://go.dev/play/)

Specifying source type (--source)

Bookmeter URLs are auto-detected. The source type can also be set explicitly:

# Auto-detected from URL
go run . -u https://bookmeter.com/books/556977

# Explicit bookmeter source type
go run . -u https://bookmeter.com/books/556977 -s bookmeter

# Bypass auto-detection and create a plain markdown file
go run . -u https://bookmeter.com/books/556977 -s manual

Build

go build -o gtmd .

About

Get the title tag and make markdown.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors