Coder Social home page Coder Social logo

gost's People

Contributors

maximed avatar ramtiga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gost's Issues

Delete gist by id or full url

When we want do delete a gist, we can do

gost -D b9603076d61bb5287b52

But this will fail if full url is passed eg.

gost -D https://gist.github.com/b9603076d61bb5287b52

gost should be able to handle both.

Refactor errors handling

Many errors check are done like this:

if err != nil {
    // handle it
} else {
    // handle success case
}

whereas a simple:

if err != nil {
    // handle error
}
// handle success case

is enough.

Use URL or Id for all actions

#27 handles deleting a gist by passing either it's id, either the full url.

But this has not been done for other actions like update or download.

Support 2fa?

I have 2fa setup and when first creating a gist I get asked to setup my conf file, but the file is empty.

Uploading multiple files with same name

When trying to upload multiple files with same name, ex foo/name and bar/name, only one will be uploaded. This is because gist won't accept having same name for multiple files.

A solution could be to to rename files to something like foo_name and bar_name but only if there is a conflict in naming.

Cannot overwrite/multitenant oauth tokens

Currently, if you try to initialize gost and already have an API key for it (from a previous installation), it will not try to replace or add a new one, but instead fail and post the first gist as 'anonymous'.

Here's an example of what the official ruby gist does, and what I think is the ideal situation for me at least:
screenshot 2014-12-26 08 56 54

I don't have time to contribute patches (sorry!) so I hope this bug report will be sufficient.

Thanks for the great program!

Display informations when no action is given

When running only gost withouth any arguments, nothing is displayed.
Hence a user won't know how to use the program. Some hints should be given to help hiw finding out how to use gost.

Download (-g) doesn't work

It seems (?) the JSON served by github.com has changed. I had to modify a field-tag in gist_json.go, type FileDetails, to make download work again. See patch below:

diff --git a/json/gist_json.go b/json/gist_json.go
index f1d66d9..5c77a0c 100644
--- a/json/gist_json.go
+++ b/json/gist_json.go
@@ -48,7 +48,7 @@ type File struct {
 }

 type FileDetails struct {
-   FileName string `json:"file_name"`
+   FileName string `json:"filename"`
    Type     string `json:"type"`
    Language string `json:"language"`
    RawUrl   string `json:"raw_url"`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.