scratchfoundation / scratchx

Scratch Extension Site
https://github.com/llk/scratchx
191 stars 121 forks source link

Question: How to add crossdomain.xml to root GitHub #99

Closed ChrisDorna closed 7 years ago

ChrisDorna commented 7 years ago

Hi I am new here and I am trying to build my first Scratch extension. The wiki says that I have to add the file crossdomain.xml to the root of my GitHub (https://github.com/LLK/scratchx/wiki#user-content-setting-up-crossdomainxml). Can anyone tell me how to get access to the root?

Thanks for helping!

Ps. Is it allright to post this question here?

MrYsLab commented 7 years ago

Here is an example.

ChrisDorna commented 7 years ago

So, in my case the name is ChrisDorna

Add a repository named ChrisDorna.github.io github

MrYsLab commented 7 years ago

You first need to create gh-pages as per https://github.com/LLK/scratchx/wiki#load-a-javascript-file-hosted-on-github.

Here is my page with the gh-pages branch.

screenshot from 2016-11-17 15-17-59

Then add your files as described on the instructions.

Unfortunately, the entire procedure is confusing and convoluted. Be aware, once you do this, you will still not see your project appear on the scratchx page. You need to ask the scratch folks to add your project.

ChrisDorna commented 7 years ago

Hi Alan, Thanks for your help so far. At the moment I just want to do some experimenting. Publishing on the scratchx page hopefully comes later. Now my first goal is to see my extenstion in ScratchX (via Open an Extension URL), that is hard enough. Chris

ericrosenbaum commented 7 years ago

Hi Chris- I realized from reading this thread that our documentation has an important omission, and we're solving the wrong problem!

If I understand correctly, you are just trying to get started working on a scratch extension, correct? All the stuff involving github is not necessary for that.

You can simply load your local extension js file directly:

We'll work on updating the documentation.

mkacct commented 7 years ago

If you want to quickly upload your extension you can use GitHub Gist

and if it doesn't work put it in RawGit

ChrisDorna commented 7 years ago

Ok.... That was important information. Thanks for sharing. I managed to download a respository from github to my local computer and start the extension (power_extension).

I also downloaded the Arduino extension (https://github.com/khanning/scratch-arduino-extension). It does start when I get the URL (from GitHub), but a cannot start it with shift-click "load experimental extension".

ericrosenbaum commented 7 years ago

Glad you were able to get an extension loaded! I don't know as much about the arduino extension, but @khanning was just telling me that while working on it he loads it from a local web server. I'm not sure why that's necessary in that case, but we can try to help you get set up with that (basically, you open a terminal, navigate to the extension directory, and run: python -m SimpleHTTPServer 8000, then load the extension from the URL starting localhost:8000).

What kind of extension are you working on?

ChrisDorna commented 7 years ago

We want to emulate the control (433Mhz) of a remote power switch, so the kids can switch 'real' things. The idea is to use an Arduino in combination with a standard 433-module. I think in the US the frequency is 315 Mhz. rf-module

I have no experience with installing a webserver on my computer. I am now working on a windows machine and your python code won't work here.

ericrosenbaum commented 7 years ago

This sounds like a nice project! It sounds like it will require custom Arduino firmware. I wonder if you could do it by modifying the existing firmata firmware that the Arduino extension communicates with. You could get most of what you want (I think) without modifying the extension (but hopefully we can help you get that working as well)

ChrisDorna commented 7 years ago

Hi Eric, I am working together with someone who has built these kind of Arduino interfaces before (but he does not know anything about Scratch). Actually I think it is not necessary to use the Arduino extension, probably simple serial communication is enough.

I installed a localhost on my Windows machine and now I can load and run de extension local!

ericrosenbaum commented 7 years ago

sounds like good progress- keep us posted!