Skip to content

Commit

Permalink
Migrated repository to github.com/goark/ml
Browse files Browse the repository at this point in the history
  • Loading branch information
spiegel-im-spiegel committed Mar 20, 2022
1 parent 86d420e commit 282e225
Show file tree
Hide file tree
Showing 25 changed files with 122 additions and 673 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ^1.17
go-version: ^1.18
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ^1.17
go-version: ^1.18
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/vulns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ^1.17
go-version: ^1.18
- name: install depm
run: go install github.com/spiegel-im-spiegel/depm@latest
run: go install github.com/goark/depm@latest
- name: WriteGoList
run: depm list --json > go.list
- name: Nancy
Expand Down
4 changes: 2 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project_name: ml
release:
github:
owner: spiegel-im-spiegel
owner: goark
name: ml

builds:
Expand All @@ -20,7 +20,7 @@ builds:
main: ./
flags:
- -trimpath
ldflags: -s -w -X github.com/spiegel-im-spiegel/ml/facade.Version=v{{ .Version }}
ldflags: -s -w -X github.com/goark/ml/facade.Version=v{{ .Version }}

archives:
-
Expand Down
32 changes: 17 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
# [ml] -- Make Link with Markdown Format

[![check vulns](https://github.com/spiegel-im-spiegel/ml/workflows/vulns/badge.svg)](https://github.com/spiegel-im-spiegel/ml/actions)
[![lint status](https://github.com/spiegel-im-spiegel/ml/workflows/lint/badge.svg)](https://github.com/spiegel-im-spiegel/ml/actions)
[![lint status](https://github.com/spiegel-im-spiegel/ml/workflows/build/badge.svg)](https://github.com/spiegel-im-spiegel/ml/actions)
[![GitHub license](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/spiegel-im-spiegel/ml/master/LICENSE)
[![GitHub release](http://img.shields.io/github/release/spiegel-im-spiegel/ml.svg)](https://github.com/spiegel-im-spiegel/ml/releases/latest)
[![check vulns](https://github.com/goark/ml/workflows/vulns/badge.svg)](https://github.com/goark/ml/actions)
[![lint status](https://github.com/goark/ml/workflows/lint/badge.svg)](https://github.com/goark/ml/actions)
[![lint status](https://github.com/goark/ml/workflows/build/badge.svg)](https://github.com/goark/ml/actions)
[![GitHub license](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/goark/ml/master/LICENSE)
[![GitHub release](http://img.shields.io/github/release/goark/ml.svg)](https://github.com/goark/ml/releases/latest)

This package is required Go 1.16 or later.
This package is required Go 1.18 or later.

**Migrated repository to [github.com/goark/ml][ml]**

## Build and Install

```
$ go install github.com/spiegel-im-spiegel/gpgpdump@latest
$ go install github.com/goark/ml@latest
```

## Binaries

See [latest release](https://github.com/spiegel-im-spiegel/ml/releases/latest).
See [latest release](https://github.com/goark/ml/releases/latest).

## Usage

Expand All @@ -36,19 +38,19 @@ Flags:

```
$ ml https://git.io/vFR5M
[GitHub - spiegel-im-spiegel/ml: Make Link with Markdown Format](https://github.com/spiegel-im-spiegel/ml)
[GitHub - goark/ml: Make Link with Markdown Format](https://github.com/goark/ml)
```

```
$ echo https://git.io/vFR5M | ml
[GitHub - spiegel-im-spiegel/ml: Make Link with Markdown Format](https://github.com/spiegel-im-spiegel/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/spiegel-im-spiegel/ml">GitHub - spiegel-im-spiegel/ml: Make Link with Markdown Format</a>
<a href="https://github.com/goark/ml">GitHub - goark/ml: Make Link with Markdown Format</a>
```

Support Styles: `markdown`, `wiki`, `html`, `csv`, `json`
Expand All @@ -59,7 +61,7 @@ Support Styles: `markdown`, `wiki`, `html`, `csv`, `json`
$ ml -i
Input 'q' or 'quit' to stop
ml> https://git.io/vFR5M
[GitHub - spiegel-im-spiegel/ml: Make Link with Markdown Format](https://github.com/spiegel-im-spiegel/ml)
[GitHub - goark/ml: Make Link with Markdown Format](https://github.com/goark/ml)
ml>
```

Expand All @@ -74,7 +76,7 @@ import (
"io"
"os"

"github.com/spiegel-im-spiegel/ml/makelink"
"github.com/goark/ml/makelink"
)

func main() {
Expand All @@ -85,12 +87,12 @@ func main() {
}
_, _ = io.Copy(os.Stdout, lnk.Encode(makelink.StyleMarkdown))
// Output:
// [GitHub - spiegel-im-spiegel/ml: Make Link with Markdown Format](https://github.com/spiegel-im-spiegel/ml)
// [GitHub - goark/ml: Make Link with Markdown Format](https://github.com/goark/ml)
}
```

## Modules Requirement Graph

[![dependency.png](./dependency.png)](./dependency.png)

[ml]: https://github.com/spiegel-im-spiegel/ml "spiegel-im-spiegel/ml: Make Link with Markdown Format"
[ml]: https://github.com/goark/ml "goark/ml: Make Link with Markdown Format"
6 changes: 3 additions & 3 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ tasks:
cmds:
- go mod verify
- go test -shuffle on ./...
- docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.42.1 golangci-lint run --enable gosec --timeout 3m0s ./...
- docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.45.0 golangci-lint run --enable gosec --timeout 3m0s ./...
sources:
- ./go.mod
- '**/*.go'

nancy:
desc: Check vulnerability of external packages with Nancy.
cmds:
- depm list -j | docker run --rm -i sonatypecommunity/nancy:latest sleuth -n
- depm list -j | nancy sleuth -n
sources:
- ./go.mod
- '**/*.go'
Expand All @@ -37,7 +37,7 @@ tasks:
- rm -f ./go.sum
- go clean -cache
- go clean -modcache
- go mod tidy -v -go=1.17
- go mod tidy -v -go=1.18

graph:
desc: Make grapth of dependency modules.
Expand Down
Binary file modified dependency.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion facade/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package facade
import (
"fmt"

"github.com/spiegel-im-spiegel/gocli/rwi"
"github.com/goark/gocli/rwi"
)

func debugPrint(ui *rwi.RWI, err error) error {
Expand Down
14 changes: 7 additions & 7 deletions facade/facade.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import (
"os"
"runtime"

"github.com/goark/gocli/exitcode"
"github.com/goark/gocli/rwi"
"github.com/goark/gocli/signal"
"github.com/goark/ml/facade/history"
"github.com/goark/ml/facade/interactive"
"github.com/goark/ml/facade/options"
"github.com/goark/ml/makelink"
"github.com/spf13/cobra"
"github.com/spiegel-im-spiegel/gocli/exitcode"
"github.com/spiegel-im-spiegel/gocli/rwi"
"github.com/spiegel-im-spiegel/gocli/signal"
"github.com/spiegel-im-spiegel/ml/facade/history"
"github.com/spiegel-im-spiegel/ml/facade/interactive"
"github.com/spiegel-im-spiegel/ml/facade/options"
"github.com/spiegel-im-spiegel/ml/makelink"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion facade/history.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package facade
import (
"os"

"github.com/spiegel-im-spiegel/gocli/config"
"github.com/goark/gocli/config"
)

const logFile = "history"
Expand Down
2 changes: 1 addition & 1 deletion facade/history/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package history
import (
"os"

"github.com/goark/errs"
"github.com/nyaosorg/go-readline-ny"
"github.com/spiegel-im-spiegel/errs"
)

//HistoryFile is a history file class.
Expand Down
2 changes: 1 addition & 1 deletion facade/history/history.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"
"io"

"github.com/goark/errs"
"github.com/nyaosorg/go-readline-ny"
"github.com/spiegel-im-spiegel/errs"
)

//History is a ring-buffer class for history (string) data.
Expand Down
2 changes: 1 addition & 1 deletion facade/history/history_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"
"testing"

"github.com/spiegel-im-spiegel/ml/facade/history"
"github.com/goark/ml/facade/history"
)

func TestHistory(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions facade/interactive/interactive.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"os"

"github.com/atotto/clipboard"
"github.com/goark/errs"
"github.com/goark/gocli/signal"
"github.com/goark/ml/facade/options"
"github.com/nyaosorg/go-readline-ny"
"github.com/spiegel-im-spiegel/errs"
"github.com/spiegel-im-spiegel/gocli/signal"
"github.com/spiegel-im-spiegel/ml/facade/options"
)

func Do(opts *options.Options) error {
Expand Down
8 changes: 4 additions & 4 deletions facade/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"context"
"io"

"github.com/spiegel-im-spiegel/errs"
"github.com/spiegel-im-spiegel/ml/ecode"
"github.com/spiegel-im-spiegel/ml/facade/history"
"github.com/spiegel-im-spiegel/ml/makelink"
"github.com/goark/errs"
"github.com/goark/ml/ecode"
"github.com/goark/ml/facade/history"
"github.com/goark/ml/makelink"
)

//Options class is Options for making link
Expand Down
10 changes: 5 additions & 5 deletions facade/options/options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"os"
"testing"

"github.com/spiegel-im-spiegel/ml/facade/history"
"github.com/spiegel-im-spiegel/ml/facade/options"
"github.com/spiegel-im-spiegel/ml/makelink"
"github.com/goark/ml/facade/history"
"github.com/goark/ml/facade/options"
"github.com/goark/ml/makelink"
)

func TestMakeLink(t *testing.T) {
Expand All @@ -25,7 +25,7 @@ func TestMakeLink(t *testing.T) {
t.Errorf("Error in io.Copy(): %+v", err)
}

res := "[GitHub - spiegel-im-spiegel/ml: Make Link with Markdown Format](https://github.com/spiegel-im-spiegel/ml)"
res := "[GitHub - goark/ml: Make Link with Markdown Format](https://github.com/goark/ml)"
str := outBuf.String()
if str != res {
t.Errorf("Context.MakeLink() = \"%v\", want \"%v\".", str, res)
Expand All @@ -46,7 +46,7 @@ func TestMakeLinkNil(t *testing.T) {
t.Errorf("Error in io.Copy(): %+v", err)
}

res := "[GitHub - spiegel-im-spiegel/ml: Make Link with Markdown Format](https://github.com/spiegel-im-spiegel/ml)"
res := "[GitHub - goark/ml: Make Link with Markdown Format](https://github.com/goark/ml)"
str := outBuf.String()
if str != res {
t.Errorf("Context.MakeLink() = \"%v\", want \"%v\".", str, res)
Expand Down
4 changes: 2 additions & 2 deletions facade/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"bytes"
"testing"

"github.com/spiegel-im-spiegel/gocli/exitcode"
"github.com/spiegel-im-spiegel/gocli/rwi"
"github.com/goark/gocli/exitcode"
"github.com/goark/gocli/rwi"
)

func TestVersionMin(t *testing.T) {
Expand Down
30 changes: 15 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
module github.com/spiegel-im-spiegel/ml
module github.com/goark/ml

go 1.17
go 1.18

require (
github.com/PuerkitoBio/goquery v1.7.1
github.com/PuerkitoBio/goquery v1.8.0
github.com/atotto/clipboard v0.1.4
github.com/goark/errs v1.1.0
github.com/goark/fetch v0.3.0
github.com/goark/gocli v0.12.0
github.com/mattn/go-encoding v0.0.2
github.com/nyaosorg/go-readline-ny v0.5.0
github.com/spf13/cobra v1.2.1
github.com/spiegel-im-spiegel/errs v1.0.5
github.com/spiegel-im-spiegel/fetch v0.2.5
github.com/spiegel-im-spiegel/gocli v0.10.5
golang.org/x/net v0.0.0-20210908191846-a5e095526f91
github.com/nyaosorg/go-readline-ny v0.7.0
github.com/spf13/cobra v1.4.0
golang.org/x/net v0.0.0-20220225172249-27dd8689420f
)

require (
github.com/andybalholm/cascadia v1.2.0 // indirect
github.com/andybalholm/cascadia v1.3.1 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/mattn/go-colorable v0.1.8 // indirect
github.com/mattn/go-isatty v0.0.12 // indirect
github.com/mattn/go-runewidth v0.0.10 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect
golang.org/x/text v0.3.6 // indirect
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect
golang.org/x/text v0.3.7 // indirect
)
Loading

0 comments on commit 282e225

Please sign in to comment.