danielecook / gist-alfred

An alfred workflow for accessing gists
MIT License
118 stars 10 forks source link

A few improvements #13

Closed alexreg closed 5 years ago

alexreg commented 5 years ago

Thanks for your great work on this workflow! Obviously feel free to reject the above if it's not in line with your vision for this workflow, but it's made things a bit more convenient for me.

danielecook commented 5 years ago

Very cool! A few thoughts:

  1. Feel free to add yourself as an author / contributor with link to README.
  2. pyperclip must be installed in the user dir I believe? It's been a while since I've looked at this. It was not for me... but I think it has to be and you can go ahead and commit the code to the repo.
  3. I would prefer if you kept the gg keyword. I can see the reasoning for using gist but b/c I use this workflow so frequently I'd like to keep it as gg which is short for github gist
  4. I cannot get the create gist action to work. DId you update the github lib or something else?

08:26:58 workflow.py:2267 ERROR    404 {u'documentation_url': u'https://developer.github.com/v3/gists/#create-a-gist', u'message': u'Not Found'}
Traceback (most recent call last):
  File "/Users/dancook/Dropbox/app_data/Alfred.alfredpreferences/workflows/gist-alfred/workflow/workflow.py", line 2260, in run
    func(self)
  File "/Users/dancook/Dropbox/app_data/Alfred.alfredpreferences/workflows/gist-alfred/create_gist.py", line 40, in main
    gist = gh_user.create_gist(public, files, GithubObject.NotSet)
  File "/Users/dancook/Dropbox/app_data/Alfred.alfredpreferences/workflows/gist-alfred/github/AuthenticatedUser.py", line 479, in create_gist
    input=post_parameters
  File "/Users/dancook/Dropbox/app_data/Alfred.alfredpreferences/workflows/gist-alfred/github/Requester.py", line 172, in requestJsonAndCheck
    return self.__check(*self.requestJson(verb, url, parameters, headers, input, cnx))
  File "/Users/dancook/Dropbox/app_data/Alfred.alfredpreferences/workflows/gist-alfred/github/Requester.py", line 180, in __check
    raise self.__createException(status, responseHeaders, output)
UnknownObjectException: 404 {u'documentation_url': u'https://developer.github.com/v3/gists/#create-a-gist', u'message': u'Not Found'}
08:26:58 workflow.py:2290 DEBUG    workflow finished in 0.637 seconds```
alexreg commented 5 years ago
  • Feel free to add yourself as an author / contributor with link to README.

Sure, thanks.

  • pyperclip must be installed in the user dir I believe? It's been a while since I've looked at this. It was not for me... but I think it has to be and you can go ahead and commit the code to the repo.

Ah yes, I was going to ask about this. I wasn't sure how to update or add new dependencies.

  • I would prefer if you kept the gg keyword. I can see the reasoning for using gist but b/c I use this workflow so frequently I'd like to keep it as gg which is short for github gist

I didn't even realise I changed this... it must have been a while ago. My main problem was that I found it clashes with a keyword for a Google search (I forget if it comes from Alfred itself or another workflow). Maybe we can just add gg as an alternative for gist, so we keep both?

  • I cannot get the create gist action to work. DId you update the github lib or something else?

Yeah, I did. I updated the dependency manually, but obviously this didn't get committed. How do I specify that?

danielecook commented 5 years ago

@alexreg took me a while to figure it out - but I did get it to work. I have folded in the changes. Thanks so much!

alexreg commented 5 years ago

@danielecook No problem. Thanks for accepting them, and hopefully others will appreciate them too!