upgrade the readme

Michael Muré created

Change summary

.gitignore                   |  4 +-
Readme.md                    | 70 ++++++++++++++++++-------------------
doc/gen_bash_completion.go   | 23 ------------
doc/gen_manpage.go           |  9 ++--
doc/termui.png               |  0 
doc/webui.png                |  0 
git-bug.go                   |  4 +-
misc/bash_completion/git-bug |  0 
misc/gen_bash_completion.go  | 39 +++++++++++++++++++++
misc/gen_zsh_completion.go   |  2 
misc/zsh_completion/git-bug  |  0 
11 files changed, 83 insertions(+), 68 deletions(-)

Detailed changes

.gitignore 🔗

@@ -1,6 +1,6 @@
 git-bug
-!/doc/bash_completion/git-bug
-!/doc/zsh_completion/git-bug
+!/misc/bash_completion/git-bug
+!/misc/zsh_completion/git-bug
 .gitkeep
 dist
 coverage.txt

Readme.md 🔗

@@ -1,5 +1,9 @@
 # git-bug
 
+[![Build Status](https://travis-ci.org/MichaelMure/git-bug.svg?branch=master)](https://travis-ci.org/MichaelMure/git-bug)
+[![License: GPL v3](https://img.shields.io/badge/License-GPLv3+-blue.svg)](http://www.gnu.org/licenses/gpl-3.0)
+[![GoDoc](https://godoc.org/github.com/MichaelMure/git-bug?status.svg)](https://godoc.org/github.com/MichaelMure/git-bug)
+
 > Bugtracker embedded in Git
 
 Would it be nice to not have to rely on a web service somewhere to deal with bugs ?
@@ -24,15 +28,15 @@ export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
 
 That's all ! In the future, pre-compiled binary will be provided for convenience.
 
-## Usage
+## CLI usage
 
-It's really a WIP but you can already create a bug:
+Create a new bug:
 
 ```
-git bug new "This doesn't even build"
+git bug new
 ```
 
-Your favorite editor will open to write a description.
+Your favorite editor will open to write a title and a message.
 
 You can push your new entry to a remote:
 ```
@@ -44,56 +48,50 @@ And pull for updates:
 git bug pull [<remote>]
 ```
 
-You can now use commands like `show`, `comment`, `open` or `close` to display and modify bugs.
-
-## All commands
+List existing bugs:
+```
+git bug ls
+```
 
-```bash
-# Mark the bug as closed
-git bug close <id>
+You can now use commands like `show`, `comment`, `open` or `close` to display and modify bugs. For more details about each command, you can run `git bug <command> --help` or read the [command's documentation](doc/md/git-bug.md).
 
-# Display available commands
-git bug commands [<option>...]
+## Interactive terminal UI
 
-# Add a new comment to a bug
-git bug comment [<options>...] <id>
+An interactive (WIP) terminal UI is available using the command `git bug termui` to browse and edit bugs.
 
-# Manipulate bug's label
-git bug label <id> [<option>...] [<label>...]
+![terminal UI](doc/termui.png)
 
-# Display a summary of all bugs
-git bug ls 
+// TODO: replace with less test data ;-)
 
-# Create a new bug
-git bug new [<option>...] <title>
+## Web UI
 
-# Mark the bug as open
-git bug open <id>
+You can launch a rich Web UI (terribly WIP) with `git bug webui`.
 
-# Pull bugs update from a git remote
-git bug pull [<remote>]
+![Web UI](doc/webui.png)
 
-# Push bugs update to a git remote
-git bug push [<remote>]
+This web UI is entirely packed inside the same go binary and serve static content through a localhost http server.
 
-# Display the details of a bug
-git bug show <id>
+The web UI interact with the backend through a GraphQL API. The schema is available [here](graphql/schema.graphql).
 
-# Launch the web UI
-git bug webui 
-```
+Note: the compiled web UI is not commited in git for now so you will have to install npm packages and build it before compiling the go binary.
 
 ## Internals
 
 Interested by how it works ? Have a look at the [data model](doc/model.md).
 
+## Misc
+
+- [Bash completion](misc/bash_completion)
+- [Zsh completion](misc/zsh_completion)
+- [ManPages](doc/man)
+
 ## Planned features
 
-- interactive CLI UI
-- rich web UI
-- media embedding
-- import/export of github issue
-- inflatable raptor
+- [ ] interactive CLI UI
+- [ ] rich web UI
+- [ ] media embedding
+- [ ] import/export of github issue
+- [ ] inflatable raptor
 
 ## Contribute
 

doc/gen_bash_completion.go 🔗

@@ -1,23 +0,0 @@
-// +build ignore
-
-package main
-
-import (
-	"fmt"
-	"github.com/MichaelMure/git-bug/commands"
-	"log"
-	"os"
-	"path"
-)
-
-func main() {
-	cwd, _ := os.Getwd()
-	filepath := path.Join(cwd, "doc", "bash_completion", "git-bug")
-
-	fmt.Println("Generating bash completion file ...")
-
-	err := commands.RootCmd.GenBashCompletionFile(filepath)
-	if err != nil {
-		log.Fatal(err)
-	}
-}

doc/gen_manpage.go 🔗

@@ -4,11 +4,12 @@ package main
 
 import (
 	"fmt"
-	"github.com/MichaelMure/git-bug/commands"
-	"github.com/spf13/cobra/doc"
 	"log"
 	"os"
 	"path"
+
+	"github.com/MichaelMure/git-bug/commands"
+	"github.com/spf13/cobra/doc"
 )
 
 func main() {
@@ -16,8 +17,8 @@ func main() {
 	filepath := path.Join(cwd, "doc", "man")
 
 	header := &doc.GenManHeader{
-		Title:   "MINE",
-		Section: "3",
+		Title:   "GIT-BUG",
+		Section: "1",
 	}
 
 	fmt.Println("Generating manpage ...")

git-bug.go 🔗

@@ -1,8 +1,8 @@
 //go:generate go run webui/pack_webui.go
 //go:generate go run doc/gen_markdown.go
 //go:generate go run doc/gen_manpage.go
-//go:generate go run doc/gen_bash_completion.go
-//go:generate go run doc/gen_zsh_completion.go
+//go:generate go run misc/gen_bash_completion.go
+//go:generate go run misc/gen_zsh_completion.go
 
 package main
 

misc/gen_bash_completion.go 🔗

@@ -0,0 +1,39 @@
+// +build ignore
+
+package main
+
+import (
+	"fmt"
+	"github.com/MichaelMure/git-bug/commands"
+	"log"
+	"os"
+	"path"
+)
+
+func main() {
+	cwd, _ := os.Getwd()
+	filepath := path.Join(cwd, "misc", "bash_completion", "git-bug")
+
+	fmt.Println("Generating bash completion file ...")
+
+	//git := &cobra.Command{
+	//	Use: "git",
+	//	BashCompletionFunction: "qsdhjlkqsdhlsd",
+	//}
+	//
+	//bug := &cobra.Command{
+	//	Use: "bug",
+	//	BashCompletionFunction: "ZHZLDHKLZDHJKL",
+	//}
+	//git.AddCommand(bug)
+
+	//for _, sub := range commands.RootCmd.Commands() {
+	//	bug.AddCommand(sub)
+	//}
+
+	//err := git.GenBashCompletionFile(filepath)
+	err := commands.RootCmd.GenBashCompletionFile(filepath)
+	if err != nil {
+		log.Fatal(err)
+	}
+}

doc/gen_zsh_completion.go → misc/gen_zsh_completion.go 🔗

@@ -12,7 +12,7 @@ import (
 
 func main() {
 	cwd, _ := os.Getwd()
-	filepath := path.Join(cwd, "doc", "zsh_completion", "git-bug")
+	filepath := path.Join(cwd, "misc", "zsh_completion", "git-bug")
 
 	fmt.Println("Generating zsh completion file ...")