Working Copy 2.6 (full on-device Git source control), now has "Export to Codea"

@binaryblues you’re welcome!

Yes, this is an awesome tool - started using it yesterday, and it works like a charm for me!

@interactivenyc you’re welcome! If I had time I’d like to add some tools for managing assets.

Yojimbo - are you a developer for Working Copy? I’d love to see tools for asset management - bringing in png files along with the lua files.

I posted this elsewhere, but might as well put it in this thread, where we can continue to talk about Working Copy. Here’s a very simple test project that has a few png files in the root directory that I’d like to import along with the project:

https://github.com/interactivenyc/Animals

Is it a limitation of Codea’s paste into project format that prevents you from importing assets, or is it even more complicated than that? Do you have plans to keep developing Working Copy? What are the next features we can expect? I presume you’ve got more than just Codea support to consider!

Great work on your software - it’s making my workflow better than it otherwise might be.

@interactivenyc

No, I’m not the developer of Working Copy! I’m in the beta-test programme for it :slight_smile: I just wrote the Working Copy Codea client above. I wrote the Codea client before Working Copy added an “Export to Codea” function.

“paste-into-project” just uses the iOS clipboard, and it’s pretty much a text-based format (it just concatenates the tabs together, with each tab name preceded by --# eg --# Main), so no, I don’t think it could handle large assets.

One of the things I like about Working Copy is that it supports just about every inter-app protocol you can think of from iOS 8/9 “Open In” to x-callback URL schemes, and WebDAV servers.

This means that Working Copy can be used with lots of other apps. eg a user of Pythonista (a great iOS Python IDE which I highly recommend) wrote a very nice Working Copy client for Pythonista (nicer than mine in some ways, because Pythonista supports apps running as windowed extensions).

If you’re a Javascript programmer, Working Copy has by far the nicest JS console I’ve seen on iOS.

My client uses Working Copy’s WebDAV server. So my Working Copy Codea Client could be made to push/ pull assets as well as code over the WebDAV server. But there’s the somewhat tricky question of building the roster of what assets are required, where they’re going to be saved etc. When you do an Xcode export, Codea scans your source for strings starting with “Documents:” etc, but this doesn’t work for programmatically created paths. IMO the Info.plist file that Codea creates should also contain a list of all the assets and their local paths, but as it doesn’t, I’d have to come up with something. I’m a little too snowed under with work/ moving house etc to do anything to it just now.

I could modify the installer that the client creates to also handle text/ graphic assets, and just save them to “Project:”, to handle repos like the one you linked to above.

Quick update on making a light installer for repos with assets: part of the problem (and I think this is a bad design decision) is that Codea’s various asset commands, readImage sprite etc, all omit the file suffix. So even if you scan the code for “Project:cat”, you don’t know whether to request “cat.png”, “cat.jpg”, “cat.jpeg” etc from the github server. I’m going to have to look at the github API, see if you can query it to get a list of files in a repo. It should be possible, it’ll just make the installer a bit more involved than it should be.

Thanks for the reply Yohimbo! I understand the challenges you describe here. I might start loading my images from an http server instead.

Well, you could load them yourself from the git repo (use the address that you get when you click the “raw” button raw.githubusercontent.interactivenyc.animals or whatever it is)

I’ve added a feature request for a roster of assets to be included with the Info.plist on export. You can upvote it if you think it’s something you’d like to see:

https://bitbucket.org/TwoLivesLeft/core/issues/395/infoplist-should-contain-roster-of-assets

I’m using WCCC to good effect, mostly keeping repos right on the iPad. I’m trying to develop the habit of using it all the time, as versioning is convenient for me when I’m writing about writing a Codea program. I’d sort of like to move my Spacewar hommage from Codea-SCM (which I also like) to WCCC, but not sure whether I can do it safely.

Anyway, WCCC is good stuff, as is Codea-SCM!

Glad you like it, sorry I haven’t had time to make it more polished. The only difference between the way Codea-SCM writes out repos and the way Codea exports them natively is that the native export is a flat, single folder, with the Info.plist file in the same folder as the Lua files. So it’s just a case of moving the Info.plist file into the same folder as the lua tabs if you’re wanting to move back and forth between Codea-SCM and WCCC