Skip to content

Commit

Permalink
Some TODO thoughts.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyBanks committed Jan 27, 2009
1 parent 2904258 commit 9efbdf8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions README.markdown
Expand Up @@ -15,11 +15,15 @@ Usage
_(Will be filled in when this version if more feature-complete.)_


`TODO`
------
TODO
----

* Move significant code into module and out of `main()`.
* Support for reading private gists.
* Use official API wherever possible (ex. public creating/reading)
* Automatically detect if you attempt to clone one of your own gists,
and use the private clone URL if so. Give overrides to force private
or public clone attempts, though. Maybe. Think about this, at least.

Authors
-------
Expand Down
6 changes: 3 additions & 3 deletions gist.py
Expand Up @@ -11,7 +11,8 @@
URL_HTTP_GIST_VIEW = URL_HTTP_GIST + "{id}"
URL_HTTP_GIST_TXT = URL_HTTP_GIST_VIEW + ".txt"
URL_HTTP_GIST_POST = URL_HTTP_GIST + "gists"
URL_GIT_GIST = "git://gist.github.com/{id}.git"
URL_GIT_GIST_PUBLIC = "git://gist.github.com/{id}.git"
URL_GIT_GIST_PRIATE = "git@gist.github.com:{id}.git"

def load_authentication():
"""
Expand Down Expand Up @@ -154,7 +155,7 @@ def main(*args):

post_data = urllib.parse.urlencode(post_data)

reqest = urllib.request.Request(URL_HTTP_GIST_POST, post_data)
reqest = urllib.request.Request(URL_GIT_GIST_PUBLIC, post_data)

try:
response = urllib.request.urlopen(reqest)
Expand Down Expand Up @@ -197,7 +198,6 @@ def main(*args):
if not clip(data):
sys.stderr.write("Warning: Unable to copy data to clipboard.\n")

# BUGGY: FORMATS AS THOUGH USING REPR ON BYTES, NOT WHAT I MEAN TO BE DOING
sys.stdout.write(data)
sys.stderr.write("\n")

Expand Down

0 comments on commit 9efbdf8

Please sign in to comment.