Permalink
Browse files

Added ability to request api with wget if no python ssl available

Added seperated gist command for public and private gists
Added message if username or password not provided
  • Loading branch information...
1 parent 1919298 commit 64f30dfb52139fa60ea91564d4e34fcf2dc4a5d5 @condemil committed Dec 30, 2011
Showing with 192 additions and 105 deletions.
  1. +3 −1 Context.sublime-menu
  2. +2 −1 Default (Linux).sublime-keymap
  3. +2 −1 Default (OSX).sublime-keymap
  4. +2 −1 Default (Windows).sublime-keymap
  5. +6 −2 Gist.sublime-commands
  6. +10 −6 Gist.sublime-settings
  7. +10 −9 Main.sublime-menu
  8. +25 −20 README.md
  9. +132 −64 gist.py
@@ -1,3 +1,5 @@
[
- { "command": "gist", "caption": "Create Gist" }
+ { "command": "gist", "caption": "Create Public Gist" }
+ { "command": "gist_private", "caption": "Create Private Gist" }
+ { "command": "gist_list", "caption": "Get Gist List" }
]
@@ -1,4 +1,5 @@
[
{ "keys": ["ctrl+k", "ctrl+i"], "command": "gist" },
- { "keys": ["ctrl+shift+g"], "command": "gistlist" }
+ { "keys": ["ctrl+k", "ctrl+l"], "command": "gist_private" },
+ { "keys": ["ctrl+shift+g"], "command": "gist_list" }
]
@@ -1,4 +1,5 @@
[
{ "keys": ["super+k", "super+i"], "command": "gist" },
- { "keys": ["ctrl+super+g"], "command": "gistlist" }
+ { "keys": ["super+k", "super+l"], "command": "gist_private" },
+ { "keys": ["ctrl+super+g"], "command": "gist_list" }
]
@@ -1,4 +1,5 @@
[
{ "keys": ["ctrl+k", "ctrl+i"], "command": "gist" },
- { "keys": ["ctrl+shift+g"], "command": "gistlist" }
+ { "keys": ["ctrl+k", "ctrl+l"], "command": "gist_private" },
+ { "keys": ["ctrl+shift+g"], "command": "gist_list" }
]
@@ -1,10 +1,14 @@
[
{
- "caption": "Gist: Create from Selected Text",
+ "caption": "Gist (public): Create from Selected Text",
"command": "gist"
},
{
+ "caption": "Gist (private): Create from Selected Text",
+ "command": "gist_private"
+ },
+ {
"caption": "Gist: Get List",
- "command": "gistlist"
+ "command": "gist_list"
}
]
View
@@ -1,7 +1,11 @@
{
- "create_public": "false",
- "username": "YOUR_USERNAME",
- "password": "YOUR_PASSWORD",
- "use_proxy": "false",
- "proxy": "http://user:pass@proxy:port"
-}
+ // Your username on GitHub
+ "username": "",
+
+ // Your password on GitHub
+ "password": "",
+
+ // Proxy server
+ // Format: "http://user:pass@proxy:port"
+ "https_proxy": ""
+}
View
@@ -5,15 +5,16 @@
"id": "tools",
"children":
[
- {
- "caption": "Gist",
- "children":
- [
- { "command": "gist", "caption": "Create Gist" },
- { "command": "gistlist", "caption": "Get Gist List" }
- ]
- }
-
+ {
+ "caption": "Gist",
+ "children":
+ [
+ { "command": "gist", "caption": "Create Public Gist" },
+ { "command": "gist_private", "caption": "Create Private Gist" },
+ { "command": "gist_list", "caption": "Get Gist List" }
+ ]
+ }
+
]
}
]
View
@@ -20,46 +20,51 @@ Then clone this repository:
Options
-------
-Under the Packages/Gist sub-directory, edit the `Gist.sublime-settings` file:
+Copy the `Gist.sublime-settings` file from Packages/Gist to Packages/User sub-directory and edit:
-* `"create_public": false`
-
- This makes your gists be private instead of public.
-
-* `"username": YOUR_USERNAME`
+* `"username": ""`
You need to enter your GitHub username here
-* `"password": YOUR_PASSWORD`
+* `"password": ""`
You need to enter your GitHub password here
-* `"use_proxy": true/false`
-
- You need to enter proxy 'true' if you use a proxy
-
-* `"proxy": http://user:pass@proxy:port`
+* `"https_proxy": http://user:pass@proxy:port`
- You need to enter your proxy if use_proxy is true
-
-
+ You can enter https proxy here
+ Format: "http://user:pass@proxy:port"
Usage
-----
-**Create a gist:**
+**Create a public gist:**
From menu items:
-* Main menu: Tools -> Gist -> "Create Gist"
-* Context menu: "Create Gist"
+* Main menu: Tools -> Gist -> "Create Public Gist"
+* Context menu: "Create Public Gist"
-By command called "Gist: Create Gist from Selected Text".
+By command called "Gist (public): Create from Selected Text"
There is a key bindings:
* Windows and Linux: "ctrl+k", "ctrl+i"
* OS X: "super+k", "super+i"
+**Create a private gist:**
+
+From menu items:
+
+* Main menu: Tools -> Gist -> "Create Private Gist"
+* Context menu: "Create Private Gist"
+
+By command called "Gist (private): Create from Selected Text".
+
+There is a key bindings:
+
+* Windows and Linux: "ctrl+k", "ctrl+l"
+* OS X: "super+k", "super+l"
+
**Get gist list:**
From menu items:
@@ -73,7 +78,7 @@ There is a key bindings:
* Windows and Linux: "ctrl+shift+g"
* OS X: "super+shift+g"
-**The content of your selected gist will be copied into the clipboard**
+**The content of the selected gist will be copied into the clipboard**
Information
-----------
Oops, something went wrong. Retry.

0 comments on commit 64f30df

Please sign in to comment.