Comments (2)
I'm also getting this Problems parsing JSON"
error, whether I use python2
or python3
.
from alfredgist.
Changing the relevant parts to the following fixed it for me:
#
# Escape JSON string
#
function json_escape()
{
echo -n "$1" | python3 -c 'import json,sys; print(json.dumps(sys.stdin.read()))'
}
#
# Get Gist API endpoint from top level API
#
function get_gist_api()
{
# GitHub.com & GitHub Enterprise have different
if [[ "${server}" == 'api.github.com' ]]; then
echo "https://${server}/gists"
else
curl --silent --header "$auth_header" https://$server/api/v3 | python3 -c 'import json,sys; print(json.loads(sys.stdin.read())["gists_url"].split("{")[0])'
fi
}
from alfredgist.
Related Issues (20)
- AlfredGist does not handle non-ascii characters nicely HOT 3
- Don't have API Config option HOT 2
- Vanilla `gist` command copies string to clipboard with extra trailing newline HOT 3
- `gist` command is very slow with "large" amounts of text HOT 7
- Can't set api key HOT 5
- Remove icon from notification HOT 3
- Config option to prevent opening gist in browser HOT 6
- Feature: Possible searching of gist and opening it. HOT 1
- Can't create gist from ipynb files HOT 2
- ERROR: An API error occurred HOT 7
- Overwrite prefix directory. HOT 5
- Tolerant to more file format? HOT 6
- upload screen captures HOT 3
- Submit Workflow to packal.org to enable auto updates HOT 4
- Does not work on Alfred V3.x.x (?) HOT 2
- Clipboard replaced with "{" HOT 2
- Open gists in raw format
- API error when creating anonymous gist
- Keep Gist description blank
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alfredgist.