Commit 5f880bc2 authored by Trevor Slocum's avatar Trevor Slocum

Migrate to GitLab

parent 51704b98
Pipeline #111559636 passed with stage
in 1 minute
arch: amd64
environment:
PROJECT_NAME: 'cview'
CGO_ENABLED: '1'
GO111MODULE: 'on'
image: freebsd/latest
packages:
- go
sources:
- https://git.sr.ht/~tslocum/cview
tasks:
- test: |
cd $PROJECT_NAME
go test ./...
arch: x86_64
environment:
PROJECT_NAME: 'cview'
CGO_ENABLED: '1'
GO111MODULE: 'on'
image: alpine/edge
packages:
- go
sources:
- https://git.sr.ht/~tslocum/cview
tasks:
- test: |
cd $PROJECT_NAME
go test ./...
stages:
- test
test:
image: golang:latest
stage: test
script:
- go test -v ./...
......@@ -5,15 +5,11 @@ suggestions and patches.
Please include as much relevant information as possible.
Review project [documentation](https://godoc.org/git.sr.ht/~tslocum/cview)
Review project [documentation](https://godoc.org/gitlab.com/tslocum/cview)
before submitting an issue.
Share issues and suggestions on the [issue tracker](https://todo.sr.ht/~tslocum/cview).
Share issues and suggestions on the [issue tracker](https://gitlab.com/tslocum/cview/issues).
# Patches (pull requests)
Send patches to the [cview-dev](https://lists.sr.ht/~tslocum/cview-dev) mailing
list.
See [git-send-email.io](https://git-send-email.io) for information on sending
patches via email.
Submit patches as [pull requests](https://gitlab.com/tslocum/cview/merge_requests).
This document explains why [tview](https://github.com/rivo/tview) was forked to
create [cview](https://git.sr.ht/~tslocum/cview) and tracks which tview pull
create [cview](https://gitlab.com/tslocum/cview) and tracks which tview pull
requests have been merged into cview.
# Why fork?
......
# cview
[![GoDoc](https://godoc.org/git.sr.ht/~tslocum/cview?status.svg)](https://godoc.org/git.sr.ht/~tslocum/cview)
[![builds.sr.ht status](https://builds.sr.ht/~tslocum/cview.svg)](https://builds.sr.ht/~tslocum/cview)
[![GoDoc](https://godoc.org/gitlab.com/tslocum/cview?status.svg)](https://godoc.org/gitlab.com/tslocum/cview)
[![CI status](https://gitlab.com/tslocum/cview/badges/master/pipeline.svg)](https://gitlab.com/tslocum/cview/commits/master)
[![Donate](https://img.shields.io/liberapay/receives/rocketnine.space.svg?logo=liberapay)](https://liberapay.com/rocketnine.space)
Terminal-based user interface toolkit
This package is a fork of [tview](https://github.com/rivo/tview).
See [FORK.md](https://man.sr.ht/~tslocum/cview/FORK.md) for more information.
See [FORK.md](https://gitlab.com/tslocum/cview/blob/master/FORK.md) for more information.
## Demo
Try the demo: ```ssh cview.rocketnine.space -p 20000```
[![Recording of presentation demo](https://git.sr.ht/~tslocum/cview/blob/master/cview.gif)](https://git.sr.ht/~tslocum/cview/tree/master/demos/presentation)
[![Recording of presentation demo](https://gitlab.com/tslocum/cview/blob/master/cview.gif)](https://gitlab.com/tslocum/cview/tree/master/demos/presentation)
## Features
......@@ -29,12 +29,12 @@ Available widgets:
Widgets may be customized and extended to suit any application.
[Mouse support](https://godoc.org/git.sr.ht/~tslocum/cview#hdr-Mouse_Support) is available.
[Mouse support](https://godoc.org/gitlab.com/tslocum/cview#hdr-Mouse_Support) is available.
## Installation
```bash
go get git.sr.ht/~tslocum/cview
go get gitlab.com/tslocum/cview
```
## Hello World
......@@ -45,7 +45,7 @@ This basic example creates a box titled "Hello, World!" and displays it in your
package main
import (
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
func main() {
......@@ -63,7 +63,9 @@ the program in the "demos/presentation" subdirectory.
## Documentation
Package documentation is available on [godoc](https://godoc.org/git.sr.ht/~tslocum/cview).
Package documentation is available on [godoc](https://godoc.org/gitlab.com/tslocum/cview).
An [introduction tutorial](https://github.com/rivo/tview) is also available.
## Dependencies
......@@ -72,10 +74,5 @@ This package is based on [github.com/gdamore/tcell](https://github.com/gdamore/t
## Support
[CONTRIBUTING.md](https://man.sr.ht/~tslocum/cview/CONTRIBUTING.md) describes how to share
[CONTRIBUTING.md](https://gitlab.com/tslocum/cview/blob/master/CONTRIBUTING.md) describes how to share
issues, suggestions and patches (pull requests).
cview has two mailing lists:
- [cview-discuss](https://lists.sr.ht/~tslocum/cview-discuss) for general discussion
- [cview-dev](https://lists.sr.ht/~tslocum/cview-dev) for development discussion
......@@ -11,7 +11,7 @@ import (
// Note that all classes which subclass from Box will also have access to its
// functions.
//
// See https://git.sr.ht/~tslocum/cview/wiki/Box for an example.
// See https://gitlab.com/tslocum/cview/wiki/Box for an example.
type Box struct {
// The position of the rect.
x, y, width, height int
......
......@@ -6,7 +6,7 @@ import (
// Button is labeled box that triggers an action when selected.
//
// See https://git.sr.ht/~tslocum/cview/wiki/Button for an example.
// See https://gitlab.com/tslocum/cview/wiki/Button for an example.
type Button struct {
*Box
......
......@@ -7,7 +7,7 @@ import (
// Checkbox implements a simple box for boolean values which can be checked and
// unchecked.
//
// See https://git.sr.ht/~tslocum/cview/wiki/Checkbox for an example.
// See https://gitlab.com/tslocum/cview/wiki/Checkbox for an example.
type Checkbox struct {
*Box
......
......@@ -3,7 +3,7 @@ package main
import (
"github.com/gdamore/tcell"
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
func main() {
......
// Demo code for the Button primitive.
package main
import "git.sr.ht/~tslocum/cview"
import "gitlab.com/tslocum/cview"
func main() {
app := cview.NewApplication()
......
// Demo code for the Checkbox primitive.
package main
import "git.sr.ht/~tslocum/cview"
import "gitlab.com/tslocum/cview"
func main() {
app := cview.NewApplication()
......
// Demo code for the DropDown primitive.
package main
import "git.sr.ht/~tslocum/cview"
import "gitlab.com/tslocum/cview"
func main() {
app := cview.NewApplication()
......
......@@ -2,7 +2,7 @@
package main
import (
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
func main() {
......
......@@ -2,7 +2,7 @@
package main
import (
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
func main() {
......
......@@ -3,7 +3,7 @@ package main
import (
"github.com/gdamore/tcell"
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
func main() {
......
......@@ -2,7 +2,7 @@
package main
import (
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
func main() {
......
......@@ -4,7 +4,7 @@ import (
"strings"
"github.com/gdamore/tcell"
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
// 1,000 most common English words.
......
......@@ -8,7 +8,7 @@ import (
"sync"
"github.com/gdamore/tcell"
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
type company struct {
......
......@@ -3,7 +3,7 @@ package main
import (
"github.com/gdamore/tcell"
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
func main() {
......
......@@ -2,7 +2,7 @@
package main
import (
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
func main() {
......
......@@ -2,7 +2,7 @@
package main
import (
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
func main() {
......
......@@ -4,7 +4,7 @@ package main
import (
"fmt"
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
const pageCount = 5
......
package main
import "git.sr.ht/~tslocum/cview"
import "gitlab.com/tslocum/cview"
// Center returns a new primitive which shows the provided primitive in its
// center, given the provided primitive's size.
......
......@@ -3,7 +3,7 @@ package main
import (
"fmt"
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
// The width of the code window.
......
......@@ -4,7 +4,7 @@ import (
"strings"
"github.com/gdamore/tcell"
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
const colorsText = `You can use color tags almost everywhere to partially change the color of a string. Simply put a color name or hex string in square brackets to change the following characters' color. H[green]er[white]e i[yellow]s a[darkcyan]n ex[red]amp[white]le. The [black:red]tags [black:green]look [black:yellow]like [::u]this: [blue:yellow:u[] [#00ff00[]`
......
......@@ -4,8 +4,8 @@ import (
"fmt"
"strings"
"git.sr.ht/~tslocum/cview"
"github.com/gdamore/tcell"
"gitlab.com/tslocum/cview"
)
const logo = `
......
......@@ -4,7 +4,7 @@ import (
"fmt"
"github.com/gdamore/tcell"
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
// End shows the final slide.
......@@ -12,7 +12,7 @@ func End(nextSlide func()) (title string, content cview.Primitive) {
textView := cview.NewTextView().SetDoneFunc(func(key tcell.Key) {
nextSlide()
})
url := "https://git.sr.ht/~tslocum/cview"
url := "https://gitlab.com/tslocum/cview"
fmt.Fprint(textView, url)
return "End", Center(len(url), 1, textView)
}
......@@ -2,7 +2,7 @@ package main
import (
"github.com/gdamore/tcell"
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
// Flex demonstrates flexbox layout.
......
package main
import (
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
const form = `[green]package[white] main
[green]import[white] (
[red]"git.sr.ht/~tslocum/cview"[white]
[red]"gitlab.com/tslocum/cview"[white]
)
[green]func[white] [yellow]main[white]() {
......
......@@ -2,7 +2,7 @@ package main
import (
"github.com/gdamore/tcell"
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
// Grid demonstrates the grid layout.
......
......@@ -2,13 +2,13 @@ package main
import (
"github.com/gdamore/tcell"
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
const helloWorld = `[green]package[white] main
[green]import[white] (
[red]"git.sr.ht/~tslocum/cview"[white]
[red]"gitlab.com/tslocum/cview"[white]
)
[green]func[white] [yellow]main[white]() {
......
......@@ -2,7 +2,7 @@ package main
import (
"github.com/gdamore/tcell"
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
const inputField = `[green]package[white] main
......@@ -11,7 +11,7 @@ const inputField = `[green]package[white] main
[red]"strconv"[white]
[red]"github.com/gdamore/tcell"[white]
[red]"git.sr.ht/~tslocum/cview"[white]
[red]"gitlab.com/tslocum/cview"[white]
)
[green]func[white] [yellow]main[white]() {
......
package main
import "git.sr.ht/~tslocum/cview"
import "gitlab.com/tslocum/cview"
// Introduction returns a cview.List with the highlights of the cview package.
func Introduction(nextSlide func()) (title string, content cview.Primitive) {
......
......@@ -16,8 +16,8 @@ import (
"fmt"
"strconv"
"git.sr.ht/~tslocum/cview"
"github.com/gdamore/tcell"
"gitlab.com/tslocum/cview"
)
// Slide is a function which returns the slide's main primitive and its title.
......
......@@ -3,7 +3,7 @@ package main
import (
"time"
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
// ProgressBar demonstrates the ProgressBar.
......
......@@ -5,7 +5,7 @@ import (
"strings"
"github.com/gdamore/tcell"
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
const tableData = `OrderDate|Region|Rep|Item|Units|UnitCost|Total
......
......@@ -5,8 +5,8 @@ import (
"strconv"
"time"
"git.sr.ht/~tslocum/cview"
"github.com/gdamore/tcell"
"gitlab.com/tslocum/cview"
)
const textView1 = `[green]func[white] [yellow]main[white]() {
......@@ -65,7 +65,7 @@ const textView2 = `[green]package[white] main
[red]"strconv"[white]
[red]"github.com/gdamore/tcell"[white]
[red]"git.sr.ht/~tslocum/cview"[white]
[red]"gitlab.com/tslocum/cview"[white]
)
[green]func[white] [yellow]main[white]() {
......
......@@ -4,12 +4,12 @@ import (
"strings"
"github.com/gdamore/tcell"
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
const treeAllCode = `[green]package[white] main
[green]import[white] [red]"git.sr.ht/~tslocum/cview"[white]
[green]import[white] [red]"gitlab.com/tslocum/cview"[white]
[green]func[white] [yellow]main[white]() {
$$$
......
......@@ -5,7 +5,7 @@ import (
"fmt"
"github.com/gdamore/tcell"
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
// RadioButtons implements a simple primitive for radio button selections.
......
......@@ -4,7 +4,7 @@ package main
import (
"time"
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
func main() {
......
......@@ -5,7 +5,7 @@ import (
"strings"
"github.com/gdamore/tcell"
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
func main() {
......
......@@ -8,7 +8,7 @@ import (
"time"
"github.com/gdamore/tcell"
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
const corporate = `Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition. Organically grow the holistic world view of disruptive innovation via workplace diversity and empowerment.
......
......@@ -6,7 +6,7 @@ import (
"path/filepath"
"github.com/gdamore/tcell"
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
// Show a navigable tree view of the current directory.
......
......@@ -4,7 +4,7 @@ package main
import (
"fmt"
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
func main() {
......
......@@ -38,7 +38,7 @@ world!":
package main
import (
"git.sr.ht/~tslocum/cview"
"gitlab.com/tslocum/cview"
)
func main() {
......
......@@ -21,7 +21,7 @@ func ExampleNewApplication() {
mainLayout.AddItem(sharedTextView, 1, 0, 1, 1, 0, 0, false)
// Create about layout using Grid.
aboutTextView := NewTextView().SetText("cview muti-layout application example\n\nhttps://git.sr.ht/~tslocum/cview").SetTextAlign(AlignCenter)
aboutTextView := NewTextView().SetText("cview muti-layout application example\n\nhttps://gitlab.com/tslocum/cview").SetTextAlign(AlignCenter)
aboutLayout := NewGrid()
aboutLayout.AddItem(aboutTextView, 0, 0, 1, 1, 0, 0, false)
aboutLayout.AddItem(sharedTextView, 1, 0, 1, 1, 0, 0, false)
......
......@@ -15,7 +15,7 @@ type dropDownOption struct {
// DropDown implements a selection widget whose options become visible in a
// drop-down list when activated.
//
// See https://git.sr.ht/~tslocum/cview/wiki/DropDown for an example.
// See https://gitlab.com/tslocum/cview/wiki/DropDown for an example.
type DropDown struct {
*Box
......
......@@ -23,7 +23,7 @@ type flexItem struct {
// distributed along that dimension depends on their layout settings, which is
// either a fixed length or a proportional length. See AddItem() for details.
//
// See https://git.sr.ht/~tslocum/cview/wiki/Flex for an example.
// See https://gitlab.com/tslocum/cview/wiki/Flex for an example.
type Flex struct {
*Box
......
......@@ -38,7 +38,7 @@ type FormItem interface {
// Checkbox. These elements can be optionally followed by one or more buttons
// for which you can define form-wide actions (e.g. Save, Clear, Cancel).
//
// See https://git.sr.ht/~tslocum/cview/wiki/Form for an example.
// See https://gitlab.com/tslocum/cview/wiki/Form for an example.
type Form struct {
*Box
......
......@@ -15,7 +15,7 @@ type frameText struct {
// Frame is a wrapper which adds a border around another primitive. The top area
// (header) and the bottom area (footer) may also contain text.
//
// See https://git.sr.ht/~tslocum/cview/wiki/Frame for an example.
// See https://gitlab.com/tslocum/cview/wiki/Frame for an example.
type Frame struct {
*Box
......
module git.sr.ht/~tslocum/cview
module gitlab.com/tslocum/cview
go 1.12
......
......@@ -27,7 +27,7 @@ type gridItem struct {
// and "l" keys) while the grid has focus and none of its contained primitives
// do.
//
// See https://git.sr.ht/~tslocum/cview/wiki/Grid for an example.
// See https://gitlab.com/tslocum/cview/wiki/Grid for an example.
type Grid struct {
*Box
......
......@@ -29,7 +29,7 @@ import (
// - Ctrl-W: Delete the last word before the cursor.
// - Ctrl-U: Delete the entire line.
//
// See https://git.sr.ht/~tslocum/cview/wiki/InputField for an example.
// See https://gitlab.com/tslocum/cview/wiki/InputField for an example.
type InputField struct {
*Box
......
......@@ -17,7 +17,7 @@ type listItem struct {
// List displays rows of items, each of which can be selected.
//
// See https://git.sr.ht/~tslocum/cview/wiki/List for an example.
// See https://gitlab.com/tslocum/cview/wiki/List for an example.
type List struct {