ml

command module
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

README

check vulns lint status lint status GitHub license GitHub release

This package is required Go 1.16 or later.

Migrated repository to github.com/goark/ml

Build and Install

$ go install github.com/goark/ml@latest

Binaries

See latest release.

Usage

$ ml -h
Usage:
  ml [flags] [URL [URL]...]

Flags:
      --debug               for debug
  -h, --help                help for ml
  -i, --interactive         interactive mode
  -l, --log int             history log size
  -s, --style string        link style [markdown|wiki|html|csv|json] (default "markdown")
  -a, --user-agent string   User-Agent string
  -v, --version             output version of ml
$ ml https://git.io/vFR5M
[GitHub - goark/ml: Make Link with Markdown Format](https://github.com/goark/ml)
$ echo https://git.io/vFR5M | ml
[GitHub - goark/ml: Make Link with Markdown Format](https://github.com/goark/ml)
Support Other Styles
$ ml -s html https://git.io/vFR5M
<a href="https://github.com/goark/ml">GitHub - goark/ml: Make Link with Markdown Format</a>

Support Styles: markdown, wiki, html, csv, json

Interactive Mode
$ ml -i
Input 'q' or 'quit' to stop
ml> https://git.io/vFR5M
[GitHub - goark/ml: Make Link with Markdown Format](https://github.com/goark/ml)
ml>

With Go Codes

package main

import (
    "context"
    "fmt"
    "io"
    "os"

    "github.com/goark/ml/makelink"
)

func main() {
    lnk, err := makelink.New(context.Background(), "https://git.io/vFR5M", "")
    if err != nil {
        fmt.Fprintln(os.Stderr, err)
        return
    }
    _, _ = io.Copy(os.Stdout, lnk.Encode(makelink.StyleMarkdown))
    // Output:
    // [GitHub - goark/ml: Make Link with Markdown Format](https://github.com/goark/ml)
}

Modules Requirement Graph

dependency.png

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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