Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Sharing Code on GitHub
-
Please can someone update these scripts.
I know you can use them if you remove the username in the URL , but I would like to be able
to download directly via Browser using the JavaScript bookmarklet.
(I'm totally new here , and have no idea how to go about trying to
modify the script to strip out the Username in the URL)
Thanks. -
The revised omz script to download a new action from a gist URL works for me.
Trying out the more complex ones for committing changes gives errors though:An error occurred while running the action 'Gist Commit': TypeError: 'instancemethod' object has no attribute ' __getitem__'
After that I also sometimes get error messages about set() while entering commands directly into the console, but not consistently it seems
Is this somehow a result of upgrades in v 1.4?
I hadn't tried running these myself in the previous versions
Thanks -
Thanx everyone in this thread. I was searching for this feature.
Downloaded it yesterday but got the same results as @blether.I've made some changes to checklist.py and now it works for me. I've Forked it from davenicholls.
https://gist.github.com/gdcs68/9031843Changes made to make it work.
Request.post(...).json seems to be the problem for me.
Changed it to regular post. And returned json.Loads(r.content).old code
r = requests.post(api_url + gist, data=json.dumps(payload),headers=headers).json return r
new code
r = requests.post(api_url + gist, data=json.dumps(payload),headers=headers) return json.loads(r.content)
This fixed the problem.
Added some minor changes.
Download script misses import sys.
When commited or forked an script. It now shows an message that it was sucesful posted. I found it annoying the old approach. No news is good news.I hope this post helps anyone else.
I have made the changes, but python is still very new to me. So if I did something don't hold this against me:-) -
Lately, I have been thinking that we as a community need to shift from gists over to real GitHub repos. Finding the best version of gistcheck.py requires reading a lot of forum posts and then some experimentation. Gists are fine for short snippets of code but not really the right tool for collaborative development of complex utilities.
A move to repos would allow multiple members of the Pythonista Forum to contribute to a single version of utilities such as: New from Gist, gistcheck, Dropbox Sync, dropboxlogin, pipista, Shellista, Hydrogen, and others. Multiple members of this community find these utilities useful so we would be better off focusing our collaborative development efforts on a single uber-version of each in a GitHub repo. Instead, we are currently creating separate gists that have diverging feature sets and bug fixes with no clear strategy for merging improvements into a common code base which is stored in a well known location.
Is it just me or do other members of the Pythonisa Forum believe that we should to start using repos instead of gists to improve our collaboration on broadly useful Pythonista code? Also, would it be possible to create the required utilities like New from repo or repocheck?
-
I don't know that switching to full repo's solves the problem - you'll still end up with lots of forks, and keeping track of which is the latest and greatest is still going to be a problem. I think the issue is that in a lot of cases these scripts arose out of having an itch to scratch, they're not created as long-haul projects. So, once you've scratched your itch, you're not really interested in the maintenance. I know that was my case with gistcheck.
I think that the real solution is finding someone who wants to manage the maintenance of these scripts. Once you have that, then your problem is largely solved - regardless of whether the scripts live in a gist or a full repo. With an active custodian, there could simply be a sticky thread in the forum with a link to the "official" version (which is maintained) and some bootstrap code to help you pull that down.
That being said, it is confusing with all the variants out there, and it would be awesome if some one wanted to step up and maintain these resources.
Just my $.02.
-
I think we are talking about two problems, 1) a script for interacting with github repositories (not just gists) 2) a system for managing user-created scripts
Regarding problem #1. I fully agree with @ccc that we need a script for pushing/pulling from Github repositories and I think we need that regardless of any other issues. Github support for Pythonista would enable a whole world of interaction. As @omz mentioned above, git(hub) support can't be baked into Pythonista itself as per App-store regulations, but we could put something together using GitHub's Data API. I think problem #1 is a lot easier to solve than problem #2.
Regarding prooblem #2. It seems like we need a script for managing other scripts, somethink like Homebrew for OSX, or the even @omz's Editorial Workflow Directory. I do think whatever system that emerges should use git behind the scenes (as Homebrew does). Finding someone to maintain this will be the greatest challenge.
thats my $0.02.
-
Finding someone to maintain this will be the greatest challenge.
It does not need to be a single person. In Open Source, the model of a single maintainer has not proven to scale gracefully.
Instead, like Python itself and other large GitHub projects, there could be Core Team who have the "Commit Bit" turned on and an Extended Team that submits Pull Requests for the Core Team to consider and then commit to the main branch. If anyone in the Pythonista Community were to fork the code base of one of the common tools and make changes that they believed that others would be interested in, they could merely create a pull request from their fork and the core team could consider to merge those changes into the main trunk.
I would be willing to act as one of the maintainers of such a repo but I would only consider doing so if there were others who were also willing to dedicate time and focus to evaluate and merge in changes from the rest of the community. Is anyone else interested enough in improving the Pythonista experience to make such a commitment?
-
I would be willing to act as one of the maintainers of such a repo but I would only consider doing so if there were others who were also willing to dedicate time and focus to evaluate and merge in changes from the rest of the community. Is anyone else interested enough in improving the Pythonista experience to make such a commitment?
@ccc—I'm in agreement that we need tools to integrate Pythonista with GitHub, and that the development of theses tools should be organized into a proper repo.
I'm up for maintaining with you. I'll be totally honest, I'm pretty new to Python, Pythinista, and GitHub, but I've worked extensively in other languages, have a background in computer science, etc., so I think I'm up to the task.
Let me know if you want to get things rolling.
-
@ccc Is there a repo up with the pythonista projects listed above? I haven't been able to find one. It's hard to track down some of these projects on the forum. I've been working on the version of shellista that I found on the forum and would have like to of forked it instead of creating a new repo for it.
It would really be nice to have a better way to use github and not just gist. I currently sync to dropbox and will git from my pc. I'm playing with pygithub and am hoping to get some method of using github through shellista.
-
https://github.com/Pythonista-Tools is now open for business ;-) The goal is to create an open GitHub Organization that contains code and links to other GitHub Repos and Gists of tools built for Pythonista. Please view Pythonista-Tools at the GitHub extension of this user forum. Our emphasis will be on creating more Repos and fewer Gists because Repos encourage collaborative development on a common code while Gists encourage divergent code bases. It is an open community so we want to encourage you to get involved in helping us to bring together and improve a great repository of Pythonista tools.
-
@ccc great idea.
-
Might be useful to sticky a post with this gist.