From 37e9f2b7ccd03d62067b12644409f1ce1353a225 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Mon, 9 Feb 2015 13:16:22 -0800 Subject: [PATCH] Add documentation --- CONTRIBUTING.md | 38 ++++++++++++---------- Makefile | 6 +++- README.md | 67 ++++++++++++++++++++++++++++++-------- docs/contributing.md | 1 + docs/index.md | 77 +++++++++++++++++++++++++++++++++++++------- mkdocs.yml | 6 +++- 6 files changed, 150 insertions(+), 45 deletions(-) create mode 120000 docs/contributing.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b0dc594d..89c4431c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,28 +3,32 @@ Fork [mc upstream](https://github.com/minio-io/mc/fork) source repository to you ```sh $ git clone https://github.com/$USER_ID/mc $ cd mc -$ mkdir -p ${GOPATH}/src/github.com/minio-io -$ ln -s ${PWD} $GOPATH/src/github.com/minio-io/ $ make +$ mc --help ``` ### Developer Guidelines -``mc`` community welcomes your contribution. To make the process as seamless as possible, we ask for the following: + +``mc`` welcomes your contribution. To make the process as seamless as possible, we ask for the following: + * Go ahead and fork the project and make your changes. We encourage pull requests to discuss code changes. - - Fork it - - Create your feature branch (git checkout -b my-new-feature) - - Commit your changes (git commit -am 'Add some feature') - - Push to the branch (git push origin my-new-feature) - - Create new Pull Request + - Fork it + - Create your feature branch (git checkout -b my-new-feature) + - Commit your changes (git commit -am 'Add some feature') + - Push to the branch (git push origin my-new-feature) + - Create new Pull Request + * If you have additional dependencies for ``mc``, ``mc`` manages its depedencies using [godep](https://github.com/tools/godep) - - Run `go get foo/bar` - - Edit your code to import foo/bar - - Run `make save` from top-level directory (or `godep restore && godep save ./...`). + - Run `go get foo/bar` + - Edit your code to import foo/bar + - Run `make save` from top-level directory (or `godep restore && godep save ./...`). + * When you're ready to create a pull request, be sure to: - - Have test cases for the new code. If you have questions about how to do it, please ask in your pull request. - - Run `go fmt` - - Squash your commits into a single commit. `git rebase -i`. It's okay to force update your pull request. - - Make sure `go test -race ./...` and `go build` completes. + - Have test cases for the new code. If you have questions about how to do it, please ask in your pull request. + - Run `go fmt` + - Squash your commits into a single commit. `git rebase -i`. It's okay to force update your pull request. + - Make sure `go test -race ./...` and `go build` completes. + * Read [Effective Go](https://github.com/golang/go/wiki/CodeReviewComments) article from Golang project - - `mc` project is strictly conformant with Golang style - - if you happen to observe offending code, please feel free to send a pull request + - `mc` project is strictly conformant with Golang style + - if you happen to observe offending code, please feel free to send a pull request diff --git a/Makefile b/Makefile index 43b4e58f..4ae744bc 100644 --- a/Makefile +++ b/Makefile @@ -3,11 +3,15 @@ all: getdeps install checkdeps: @./checkdeps.sh +createsymlink: + @mkdir -p $(GOPATH)/src/github.com/minio-io/; + @if test ! -e $(GOPATH)/src/github.com/minio-io/mc; then echo "Creating symlink to $(GOPATH)/src/github.com/minio-io/mc" && ln -s $(PWD) $(GOPATH)/src/github.com/minio-io/mc; fi + getdeps: checkdeps @go get github.com/tools/godep && echo "Installed godep" @go get golang.org/x/tools/cmd/cover && echo "Installed cover" -build-all: getdeps +build-all: getdeps createsymlink @echo "Building Libraries" @godep go generate ./... @godep go build ./... diff --git a/README.md b/README.md index 02b78893..ad5b1450 100644 --- a/README.md +++ b/README.md @@ -2,27 +2,23 @@ mc - unified command line interface for Minio Object Storage compatible with Amazon S3 API released under [Apache license v2](./LICENSE). -# Install +## Install ``` # go get github.com/minio-io/mc +``` + +## Usage + +### Commands +``` # mc --help ... ... ... COMMANDS: - cp - ls - mb - mv - rb - rm - sync - get-object - put-object - list-objects - list-buckets - configure + s3 + s3api help, h Shows a list of commands or help for one command GLOBAL OPTIONS: @@ -30,6 +26,49 @@ GLOBAL OPTIONS: --version, -v print the version ``` -# Contribute +### Sub-Commands +``` +# mc s3 --help +NAME: + mc s3 - + +USAGE: + mc s3 command [command options] [arguments...] + +COMMANDS: + cp + ls + mkdir + sync + help, h Shows a list of commands or help for one command + +OPTIONS: + --help, -h show help + +``` + +``` +# mc s3api --help +NAME: + mc s3api - + +USAGE: + mc s3api command [command options] [arguments...] + +COMMANDS: + get-object + put-object + put-bucket + list-objects + list-buckets + configure + help, h Shows a list of commands or help for one command + +OPTIONS: + --help, -h show help + +``` + +## Contribute [Contribute to mc](./CONTRIBUTING.md) diff --git a/docs/contributing.md b/docs/contributing.md new file mode 120000 index 00000000..44fcc634 --- /dev/null +++ b/docs/contributing.md @@ -0,0 +1 @@ +../CONTRIBUTING.md \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 6482cd60..9d79aed1 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,17 +1,70 @@ -# Welcome to MkDocs +# Minio Client -For full documentation visit [mkdocs.org](http://mkdocs.org). +mc - unified command line interface for Minio Object Storage compatible with Amazon S3 API released under [Apache license v2](http://www.apache.org/licenses/LICENSE-2.0). -## Commands +## Install -* `mkdocs new [dir-name]` - Create a new project. -* `mkdocs serve` - Start the live-reloading docs server. -* `mkdocs build` - Build the documentation site. -* `mkdocs help` - Print this help message. +``` +# go get github.com/minio-io/mc +``` -## Project layout +## Usage - mkdocs.yml # The configuration file. - docs/ - index.md # The documentation homepage. - ... # Other markdown pages, images and other files. +### Commands +``` +# mc --help +... +... +... +COMMANDS: + s3 + s3api + help, h Shows a list of commands or help for one command + +GLOBAL OPTIONS: + --help, -h show help + --version, -v print the version +``` + +### Sub-Commands +``` +# mc s3 --help +NAME: + mc s3 - + +USAGE: + mc s3 command [command options] [arguments...] + +COMMANDS: + cp + ls + mkdir + sync + help, h Shows a list of commands or help for one command + +OPTIONS: + --help, -h show help + +``` + +``` +# mc s3api --help +NAME: + mc s3api - + +USAGE: + mc s3api command [command options] [arguments...] + +COMMANDS: + get-object + put-object + put-bucket + list-objects + list-buckets + configure + help, h Shows a list of commands or help for one command + +OPTIONS: + --help, -h show help + +``` diff --git a/mkdocs.yml b/mkdocs.yml index c97182f5..9d457818 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1 +1,5 @@ -site_name: My Docs +site_name: Minio Client Documentation +pages: +- ['index.md', 'Index'] +- ['contributing.md', 'Contributing'] +theme: readthedocs