From 3191d63e5eeaeface4a645261c43cc42cbc0a47c Mon Sep 17 00:00:00 2001 From: "Mr. Is" Date: Thu, 28 Jul 2016 07:05:34 -0400 Subject: [PATCH] :floppy_disk: --- .go-gogs-cli.example.yaml | 4 +--- README.md | 36 +++++++++++++++++++++++++++++++----- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/.go-gogs-cli.example.yaml b/.go-gogs-cli.example.yaml index 4a4ea67..ec698ae 100644 --- a/.go-gogs-cli.example.yaml +++ b/.go-gogs-cli.example.yaml @@ -2,6 +2,4 @@ # You can put it anywhere else, too, but you'll need to tell go-gogs-cli # about it in cmd/root.go (down in initConfig). token: 0e6709o05da4753dddf5f592074fdc263f02n801 -api_url: http://goggable.areteh.co:3000/api/v1 -default: - q_limit: 10 +api_url: http://my.goggers.me diff --git a/README.md b/README.md index 543ebf4..46ea93e 100644 --- a/README.md +++ b/README.md @@ -41,20 +41,46 @@ Now here you've got some options (probably) about in which of your $PATH's paths ```bash $ cp gogs ~/bin/ ``` +
-__This repo's build is for darwin (Mac)__. You can build for linux with the nifty `env GOOS=linux go build -o gogs`. You can probably build for Windows too but I don't trouble myself with such things. +#### This repo's build is for darwin (Mac). +You can build for linux with the nifty `env GOOS=linux go build -o gogs`. You can probably build for Windows too but I don't trouble myself with such things. ## Usage. -So far, you can do things like... +So far, you can do things. What's that? You can _do things_? Yep! Do things! ```bash $ gogs repo create my-new-repo --desc 'awesome stuff' --private --org GophersGophering # optional flag [-n|--name] if you want to be very particular -$ gogs repo new my-new-repo # new is an alias for create +$ gogs repo new my-new-repo # new is an alias for create, and you don't have to use any flags if you don't want to $ gogs repo list # get all yo repos +$ gogs repo search waldo --limit 1 --user thatguy # yep, flags are still optional +$ gogs repo find waldo # another alias $ gogs repo destroy irstacks my-exterminable-repo $ gogs repo destroy irstacks/my-other-exterminable-repo ``` +
+
+__Oh, you're hot shit and use n > 1 Gogs?__ _Sweet_. +
+You can override your api and token by flagging a config file with the `--config` flag (like such) +```bash +$ gogs --config="$HOME/sneaky/place/.go-gogs-cli.yaml" repo create newjunk +``` +
+or, override your api url and token individually on the fly with flags `--token` and `--url` for any command, like so: +```bash +$ gogs --url=http://some.other.company --token=qo23ransdlfknaw3oijr2323rasldf repo search waldo +``` -The [Gogs Client API](https://github.com/gogits/go-gogs-client) makes a bunch of endpoints and methods accessible for Users, Organizations, Issues, Admins, and so forth. Myself, I mostly just want to be able to create and destroy fanatically. If you would :heart: something and are unable to help yourself, let me know by opening an issue. +## Config. +There's a file called `.go-gogs-cli.yaml` which handles configuring your __Gogs url__ and __token__, like such +```yaml +token: 0e6709o05da4753dddf5f592374fdc263f02n801 +api_url: http://my.goggers.me +``` +Fill that in for your own self. +
+
+You may have noticed that we're pretty heavy on the `gogs repo` and pretty light on the `gogs somethingelse` side of things. The [Gogs Client API](https://github.com/gogits/go-gogs-client) makes a bunch of endpoints and methods accessible for Users, Organizations, Issues, Admins, and so forth (although it's still very much a work in progress). Myself, I mostly just want to be able to create, search, and destroy like a fiend. If you would :heart: something and are unable to help yourself, let me know by opening an issue. ## Help out. -Please do! +:clap: [chanting] Do it! Do it! Do it!