Automatically save to disk


#1

Hi Cloud9,

I’ve got a bit of a unique use case. I work on a Python project from a GitHub repository in the Cloud9 IDE and I am looking for a way to have the file or project I am currently working on be automatically saved to disk whenever I save in the IDE.

The “Download Project” feature in the File-menu is great, and get’s me half way there. But what what I would really want, is for the files to be automatically extracted as well - or for the file(s) to be downloaded as-is, without compression.

The goal is to hit save, and immediately be able to run the project locally.

The way I’m doing it currently, is to write and save in Cloud9, but then copy-paste the code to my interpreter in order to run it.

Again, it’s a rather unique use-case, and I normally would not work this way, but does anyone have any idea of how I can achieve this “hack”? It may involve scripting or otherwise hacking the browser (Firefox), or via a “callback” of sorts to handle the downloading and unpacking of the project. Anything goes!


#2

This might be possible by making a plugin to do it. You can find the sdk information here cloud9 sdk.


#3

Thanks @shadowcodex, any idea of where to start?

Oh, and I should mention that it is important that the browser remains the only process on the system with a connection to the internet, and that I have no control (permission) to install any software or plug-ins to it (which, again, is Firefox).

Skimming the guide, it looks like plug-ins are running in a local version of Cloud9; can I develop plug-ins for the cloud-based version?


#4

you can develop plugins in c9.io on the browser You don’t have to run it locally. YOU can install the sdk in a workspace and launch it. Its c9 inception. c9 local inside of c9 :P…

Also plugins run in the c9 ide and are not installed to the browser or your computer. They hook in to your workspace, so your local environment is never modified.

Look at the documentation on creating your first plugin. That gives you a lot of details. Then it is all just research and figuring it out after that.

I have a plugin I just published called pigments. You can see the source here pigments c9 plugin

Enjoy!


#5

That is cool. :slight_smile:

Thanks, I’ll have a look!


#6

Hey @shadowcodex, I’m having a look at this, and think I managed to install and boot it up successfully; but it’s giving me an address that doesn’ t seem to go anywhere.

Something long the lines of http://172.17.52.1:8080

Any ideas?


#7

You know I actually have changed my process of working with the SDK.

When using c9.io you don’t actually have to install the SDK and run a separate environment. Just on your current environment append ?debug=2 to your url.

Example Original URL: https://ide.c9.io/shadowcodex1/test-desktop
Example Debug URL: https://ide.c9.io/shadowcodex1/test-desktop/?debug=2

This will allow you to work with the regular workspace like it is the SDK. You can then go to File / New Plugin / Empty Plugin

Happy Coding!


#8

That seems to work, thanks!