phallstrom / alfredgist Goto Github PK
View Code? Open in Web Editor NEWAn workflow for Alfred to create Gists from your clipboard contents or selected file(s).
An workflow for Alfred to create Gists from your clipboard contents or selected file(s).
@defunkt released the official gist cli. It might cleanup the logic and escaping to just shell out to it: https://github.com/defunkt/gist
Error Message:
[22:03:43.349] STDERR: Gist[[Run Script] functions.sh: line 236: python: command not found
I'm not sure how does the shim work for Alfred? I have python 2 installed via pyenv:
❯ which python ─╯
/Users/liren/.pyenv/shims/python
❯ python --version ─╯
Python 2.7.18
However the /usr/bin/python3
executable could be read by the Alfred Workflow, so I tried changing the script to python3
:
echo -n "$1" | python3 -c 'import json,sys; print json.dumps(sys.stdin.read())'
But I don't think the string can be parsed correctly because I will still get error from gist API:
{
"message": "Problems parsing JSON",
"documentation_url": "https://docs.github.com/rest/reference/gists#create-a-gist"
}
I'd like to be able to use this extension for private GitHub installations.
In the last couple of days, Gist does not seem to work any more and you see the following process somehow looping endlessly and resulting in high CPU usage:
bash gist.sh
Hi,
I've installed AlfredGist by following the instruction in the README file. I've created and successfully set the token but whenever I try to do anything with this extension I get the error "ERROR: An API error occurred".
FYI - I don't have any Alfred Gist or something like that in the authorized applications on GitHub. The extension didn't ask anything like that (and in case is required, it's not on the README).
It seems when i attempt to run "gist" i get an error.
Gist
ERROR: An API error has occured.
{"message": "Problems parsing JSON"}
I attempted to do a gist setup and no luck :(
I can clone the repository but how am I supposed to get this working in Alfred? Please add at least 2 paragraphs about that into the README.
Thanks.
This is a feature requrest
Possible searching of gist and opening it
My login shell is fish, which doesn't use bash setup. This causes gistsetup
to fail horribly. This can be fixed by replacing the line of AppleScript in functions.sh that invokes setup.sh
with this:
do script with command "/bin/bash -c 'cd \"$OUR_DIR\" && /bin/bash setup.sh'" in window 1
One feature that would be awesome would be to be able to search all your private gists (keyword, etc) and copy it to your clipboard.
This would then be a multi-clipboard tool that would have instant sync.
Hi, I use this Workflow quite a bit so thanks for making it.
I noticed that it was still writing to Library/Application Support/Alfred 2/Workflow Data/
even though I am using Alfred 3.
This was because I was using an old version. Any chance you can submit the Workflow to packal.org so updates can be pushed to the user?
Thanks
Is there any option that we can create anonymous git ?
thanks @phallstrom for great alfred workflow :)
For example, copy this:
λ
and when you create a gist from your clipboard it is replaced with
?
in the gist.
The Gist is posted,
Clipboard copying notification is delivered
the URL copied is always '{'
All I get is ERROR: An API error occured.
even though I know for a fact I used the right credentials.
Not sure if this is needed, doesn't look pretty.
So i used "gist bash"
and it looks like from my "date" command came back with a miss parsing.
origserver=web31
origimage=$origserver-`date +%25F`
newserver=web32
That should be
origserver=web31
origimage=$origserver-`date +%F`
newserver=web32
Feature request: Is there a way to add an option to automatically open and copy the link to the raw gist? I wanted to modify this myself before requesting it here but I don't see where the gist.sh file is located.
I use Alfred on multiple computers and using Alfred's sync feature is pointing to a dropbox . All configuration right now is per-box. So setting up a new box has a manual step of configuring this plugin.
It would be great to be able to overwrite the prefix directory.
Currently this is hardcoded over here:
https://github.com/phallstrom/AlfredGist/blob/master/gist.sh#L3
This could be overwritten in the plugin itself and the gist.sh
only sets it if not currently set.
any way to modify this to create a public gist or use a parameter to create a public or private gist?
happy holidays
Trying to upload some .conf
file, upon selection, the workflow returns a notification saying "An API Error occurs... message,..validation failed.."
It would be great if I could search for a gist by:
Basically a fuzzy search on it and copy the contents.
Thanks! Great job!
Trying to use this on Alfred 3.2.1 and every time I go to create Gist from clipboard, it tells me I need to configure gist via 'gist help'. I do this and it brings me here. Is there something else I can try?
Whenever I try to create a gist from an *.ipynb file, I get
ERROR: An API error occured.
{
"message": "Validation Failed",
"documentation_url": "https://developer.github.com/v3/gists/#create-a-gist",
"errors": [
{
"resource": "Gist",
"code": "missing_field",
"field": "files"
}
]
}
IPython Notebook files are just JSON. If I change the extension to *.py
, it works fine.
wouldn't it be nice to upload screen captures as well?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.