vookimedlo / alfred-github-gists Goto Github PK
View Code? Open in Web Editor NEWAlfred 4 workflow for opening your GitHub Gists in your default browser.
License: GNU General Public License v3.0
Alfred 4 workflow for opening your GitHub Gists in your default browser.
License: GNU General Public License v3.0
Love this workflow thanks.
I have had to change my workflow slightly as I pretty much never give my gists a filename, but pretty much always have a description.
Using your screenshot here as an example, if I search for "API" then I would expect the curl.md
to be filtered and be the only one showing. Or if I search for password
I would expect pdf.md
item to be selected.
At the moment only the title is filterable.
Making sense?
What I changed (for now) is to swap around the title and subtitle in the code block below, but that will be wiped out on each upgrade so maybe you have a better, or configurable way to implement this.
alfreditems['items'].append({
"mysortkey": mysortkey,
"uid": title,
"title": description,
"subtitle": title,
"autocomplete": description,
"arg": url,
"icon": {
"path": icon
}
})
Just installed the latest version of the workflow and got this error message:
[04:12:22.908] GitHubGists[Keyword] Processing complete
[04:12:22.909] GitHubGists[Keyword] Passing output '' to Run Script
[04:12:23.185] GitHubGists[Run Script] Processing complete
[04:12:23.190] GitHubGists[Run Script] Passing output '' to Conditional
[04:12:23.191] GitHubGists[Conditional] Processing complete
[04:12:23.192] GitHubGists[Conditional] Passing output '' to Run Script
[04:12:23.193] GitHubGists[Run Script] Passing output '' to Run Script
[04:12:23.853] GitHubGists[Run Script] Processing complete
[04:12:23.858] GitHubGists[Run Script] Passing output '/var/folders/6x/s0m8cp7d1ll7hl_n87rkbzp40000gn/T/tmpxXZ001' to Arg and Vars
[04:12:23.859] GitHubGists[Arg and Vars] Processing complete
[04:12:23.860] GitHubGists[Arg and Vars] Passing output '' to Script Filter
[04:12:23.876] GitHubGists[Script Filter] Queuing argument ''
[04:12:24.302] GitHubGists[Script Filter] Script with argv '(null)' finished
[04:12:24.313] ERROR: GitHubGists[Script Filter] Code 1: Traceback (most recent call last):
File "<string>", line 41, in <module>
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 449, in _open
'_open', req)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1240, in https_open
context=self._context)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1197, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590)>
Alfred v4.1.1 (1170)
https://github.com/vookimedlo/alfred-github-gists/blob/master/src/temp_cache.py#L1
The python path causes issues because the result of brew --prefix
is not always /opt/homebrew
depending on the environment.
On my M1 MacBook Air, it's /opt/homebrew
so the workflow works as expected, however, on my Intel MacBook Pro, it's '/usr/local' so the workflow does not work.
I got an error message like this
[14:43:54.392] ERROR: GitHubGists[Run Script] Task '/Users/xxxxx/Library/Mobile Documents/com~apple~CloudDocs/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A2AA5671-9D8A-41F3-B8B8-9F61FFDF8249/temp_cache.py' failed with reason 'Couldn't posix_spawn: error 2'
Here's a workaround to avoid this.
ln -s /Users/xxxxx/.pyenv/versions/3.9.6/bin/python3 /opt/homebrew/bin/python3
Alfred v4.6.4
alfred-github-gists v2022_02_20
macOS 12.3.1
Thank you
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.