AutoGist v2.2.8 - Version control projects, push/pull, Create Installers/Updaters!

Ok i did it.
This project gave me some hard time at the beginning because it must be called AutoGist (with the capitals) and according to my habit i named it ‘forum autogist2’ (there is already such a project). But after 3 trial it worked fine. I have not tried the author identification yet, but the tabs are all there, and the interface looks great. The whole code looks very clean and commented, i will use it (some day, cause right now i dont understand github enough to jump into it, but thanks to your code i know i’ll go for it later). Thanks for sharing this excellent tool.

Thanks @Jmv38, I hope my last post didn’t come off like I had not received any feedback :slight_smile: I was asking someone to try the installer, but I wasn’t very clear.

Yeah the naming thing is tricky, but I’m not sure how to work around that. If only Codea could tell what the current project being run was.

I found an issue. Currently AutoGist will gist the project with the required AutoGist functions. I’m adding a tag that can be inserted that will remove everything between the tags from the gisted version.

I added to ability to comment out code that you do not want to appear in the gist.

--to comment out code use
--/*
code that you do not want gisted
--*/

OK, I tried it out, and I loved the way it got the authentication key, so slick

I tried recovering one of my gists, and it came back, but all into a new tab in the project I created. Perhaps I’ve missed something, but I thought it was possible to get it back into tabs.

I haven’t tried the installer, but will do so.

Very nice work ^:)^

@Ignatz was the gist a multi file gist or a single file with all codea tabs in it? AutoGist will pull each individual gist file into a tab. I can make it split a single file as well. Did you try out the backup portion? It seems that pople are liking the gist retrieve function by itself. I’m wondering if I should break AutoGist into two applications. GistManager could be used to push and pull gistsas well as keep all your gist projects that you pull upto date by checking the latest gist online and pulling it down.

Version 2.04
-Small fix for the installer. It was looking for the installer tab in “AutoGist Test:Installer” it should be “AutoGist:Installer”

@Briarfox How about making a page on the wiki for these (this?) project. That way we can be sure that we’re following the latest instructions for the latest code.

Not a bad idea. I added a utilities page but it might not be a bad idea to explain them a little bit more.

@Briarfox Thanks. This is something that I’d really like to use, but I’m having trouble figuring out which bits are for what (not that I’ve tried it yet, though).

AutoGist can be used by itself to pull gists and create a single file install. To use it as a version control, link it to your project.
All thats needed is

--at the top
VERSION = x.xx
-- if you want a separate gist for build then use BUILD, if its not true then it will only update on version change. If it is true it will update a separate build gist with the version and build number
BUILD = true

function setup()
--This is the same as setting saveProjectInfo()
AutoGist.setProjectInfo("Exact ProjectName","author","Description",VERSION)
--For a public gist
AutoGist.backup(true)
--For a private gist
AutoGist.backup()

--If you do not want any code to appear in the gisted project you can use
--/*
to comment out code from showing up on the gist
--*/

end

If you do not want the version control from within your project, check out Gister, everything is managed from the Gister app.

I’ve now gone through the instructions from the first post. Main comment: “Fantastic!”. Forget sliced bread, AutoGist is brilliant.

Minor comments:

  1. May be obvious but still worth saying: in a project that you want to Gist, you need to tag the AutoGist project as an import.
  2. To start from a project, you don’t need a project key. I was pretty sure this would be the case but again, it’s worth saying. All you need is AutoGist.backup() with no arguments.
  3. With my first project, I just tried AutoGist.backup() and it worked like a dream. But if I now try AutoGist.backup(true) to make it a public gist then it doesn’t have an effect. Is it possible to switch a private one to a public one?

With regard to the wiki, if you have no objection what I’d like to do is for me to write the wiki page. Then you look at it and correct it. I think that will be the best route to ensuring that it is usable by someone who doesn’t know the code (that’s my role!) and is correct (that’s your role). Does that sound okay?

I’ve made a start on the wiki at https://bitbucket.org/TwoLivesLeft/core/wiki/AutoGist

New questions:

  1. How do I keep up to date with the AutoGist code itself? Does it know its own gist, so if I just run the AutoGist project will it check for updates?
  2. What’s the best way to handle commit messages? Should I just have a ChangeLog file that I add them to?

@Andrew_Stacey I had not though about making AutoGist self update. Think I’ll take a crack at that today. Unfortunatly Gist does not have commit messages. So yeah, a ChangeLog would be a good idea. Thanks for setting up the wiki page, I’lll tweak it some today.

Thanks for the comments. I don’t believe the backup(true) thing is a bug. I can’t find the ability on github to change it manually, so you may be stuck with whatever you initially set it up as.

Have you had a chance to try the BUILD=true setting?

@Briarfox Yes, I looked for how to change a gist from private to public on github as well but couldn’t find it - however, this is the first time I’ve dealt with gists so I decided not to rely on my inability! If this is the case then the simplest way to handle it would be to set up a new gist, which leads to a question: if I want to do that, I presumably have to remove some of the project data. I can figure out what from the AutoGist code, but perhaps a feature to “detach” a project from a gist would be a good idea.

I’m proceeding in “baby steps” so haven’t tried the BUILD=true setting as yet. I don’t completely understand what it does but I think that the best way to find out is to try it!

Looking at http://chris.dzombak.name/blog/2011/05/making-private-gist-public.html (the first search hit), it would seem that it isn’t possible to make a private gist public, so making a new (public) gist is the way to do it.

@Andrew_Stacey I had thought about creating a new gist if its changed to public, however I think it would be a good idea to keep all the revisions. But ti wouldn’t be to bad to copy all the old revisions over. In all honesty, public and private dont matter if you share the link. Public just means it can be seen on your gist account and private needs a link.

I really think having it self update would be a good idea, as in AutoGist. I would also like to rework it and get rid of all the different saved data and just create a table and serialize it. this would allow tracking of all the gists you do so you could pull back older versions from within a project. Instead of needing to open AutoGist and pull from there.

Actually, I’ve been keeping the Version gist private and using the installer as the public gist on my account.

Ah, okay. So the difference between public and private gists is in discoverability, not in accessability. If I publish the gist URL then you can still get it even if it is private.

Let’s try that then … here it is:

https://gist.github.com/loopspace/909ce641a621841cbd58

Yup, clicking on that takes me right to the gist (and I’m not logged on to github on this machine).

Version 2.05
-Added an update AutoGist button. Simply click it to keep your AutoGist upto date with the current Version.

I recommend that anyone who’s tried and plans to use AutoGist to update.

This was a quick fix to keeping AutoGist upto date. A future update will check to see if an update is required then prompt you to update.