pwiter wrote:
Pitusky12 wrote:
pwiter wrote:
just use the mac github app. It's at mac.github.comyeah but is it in the same jscratch github repository the website?
The jscratch github repo is the website. *facepalm*
okay sorry,i couldnt edit it because i didnt find index.html
Offline
GP1 wrote:
Pitusky12 wrote:
pwiter wrote:
The easiest way to edit it is to download the github windows app. It is located here windows.github.com. After that clone the jscratch repo that appears. Now you can edit it.okay,im using a mac but no problem.
Oh, good, you have a Mac! Because Safari on a Mac has a special feature: Native drag and drop BETWEEN WINDOWS!!!
So, if you have two projects open, but you want to have a very long script in one project, but it is in another, you can just drag the script into the other window, and it will show up there.
Thats cool thanks for telling me the feature i didnt know and i edited index.html in github jscratch repo
Offline
MathWizz wrote:
Oh cool, you found that! I used to use that for a while, but I lost it when I wiped out my computer. We can REALLY use this for a player.
EDIT: I'll put it in the jScratch GItHub so that everybody automaticly has a copy of it.
Last edited by GP1 (2012-10-25 22:27:04)
Offline
GP1 wrote:
MathWizz wrote:
Oh cool, you found that! I used to use that for a while, but I lost it when I wiped out my computer. We can REALLY use this for a player.
Yeah,we'll run .sb2 projects (new scratch 2.0 file format) and convert the block codes that are in the zip file to a .js file.Later i'll post a .sb2 project in github we can use for test project in the player okay?
Offline
Pitusky12 wrote:
GP1 wrote:
MathWizz wrote:
Oh cool, you found that! I used to use that for a while, but I lost it when I wiped out my computer. We can REALLY use this for a player.
Yeah,we'll run .sb2 projects (new scratch 2.0 file format) and convert the block codes that are in the zip file to a .js file.Later i'll post a .sb2 project in github we can use for test project in the player okay?
Okay, you do that. We can also make a PHP script to change the format of the .sb2 format into that JS format, by changing the header to JavaScript, then echo the converted out.
The .sb2 format is just a JSON, right?
Offline
GP1 wrote:
Pitusky12 wrote:
GP1 wrote:
Oh cool, you found that! I used to use that for a while, but I lost it when I wiped out my computer. We can REALLY use this for a player.Yeah,we'll run .sb2 projects (new scratch 2.0 file format) and convert the block codes that are in the zip file to a .js file.Later i'll post a .sb2 project in github we can use for test project in the player okay?
Okay, you do that. We can also make a PHP script to change the format of the .sb2 format into that JS format, by changing the header to JavaScript, then echo the converted out.
The .sb2 format is just a JSON, right?
Okay ,Yes the .sb2 format contains a .json file .But i gotta do it later or tommorrow because its late and im using my iPad okay?
Offline
Pitusky12 wrote:
GP1 wrote:
Pitusky12 wrote:
Yeah,we'll run .sb2 projects (new scratch 2.0 file format) and convert the block codes that are in the zip file to a .js file.Later i'll post a .sb2 project in github we can use for test project in the player okay?
Okay, you do that. We can also make a PHP script to change the format of the .sb2 format into that JS format, by changing the header to JavaScript, then echo the converted out.
The .sb2 format is just a JSON, right?Okay ,Yes the .sb2 format contains a .json file .But i gotta do it later or tommorrow because its late and im using my iPad okay?
Ok. I found a project reader in PHP, but I dont know if it is in .sb2 or the Scratch 1.4 update.
Last edited by GP1 (2012-10-25 22:41:44)
Offline
GP1 wrote:
Pitusky12 wrote:
GP1 wrote:
Okay, you do that. We can also make a PHP script to change the format of the .sb2 format into that JS format, by changing the header to JavaScript, then echo the converted out.
The .sb2 format is just a JSON, right?Okay ,Yes the .sb2 format contains a .json file .But i gotta do it later or tommorrow because its late and im using my iPad okay?
Ok. I found a project reader in PHP, but I dont know if it is in .sb2 or the Scratch 1.4 update.
im checking it out in github
Last edited by Pitusky12 (2012-10-25 22:55:46)
Offline
Pitusky12 wrote:
GP1 wrote:
Pitusky12 wrote:
Okay ,Yes the .sb2 format contains a .json file .But i gotta do it later or tommorrow because its late and im using my iPad okay?Ok. I found a project reader in PHP, but I dont know if it is in .sb2 or the Scratch 1.4 update.
im checking it out in github
Okay. Also, I think I messed up with my sync and I might have deleted some text from index.html. Can somebody go check that out for me?
Offline
GP1 - The project reader in PHP you found i think its in .sb2 . To load the projects from your computer we can use this code : this.finit = function(){
if(localStorage.files === undefined){
localStorage.files = "{}";
And i found out the PHP project reader is for .sb2 projects because i found this code :
// localStorage.__defineGetter__("files", function(){return JSON.parse(localStorage._files)});
// localStorage.__defineSetter__("files", function(v){localStorage._files = JSON.stringify(v)});
this._setFile = function(f){localStorage.files = JSON.stringify(f)}
this._getFile = function(){return JSON.parse(localStorage.files)}
this.__defineSetter__("files", function(v){console.log(v); localStorage.files = JSON.stringify(v)});
this.__defineGetter__("files", function(){return JSON.parse(localStorage.files)});
this.contentsOfFile = function(n){
this.finit();
// return this.files[n];
// var f = this.files;
return this.files[n];
This code says .JSON because it reads .sb2 projects (Scratch 2.0 projects)
In Our Scratch 2.0 player we might have to convert new block codes like cloud variables in .js
I hope this helps us
Offline
GP1 wrote:
Pitusky12 wrote:
GP1 wrote:
Ok. I found a project reader in PHP, but I dont know if it is in .sb2 or the Scratch 1.4 update.im checking it out in github
Okay. Also, I think I messed up with my sync and I might have deleted some text from index.html. Can somebody go check that out for me?
sure ill check that out.
Offline
We're not gonna copy other peoples scratch viewer,we can use some code but not all,okay?
Why? because we have to develop our own code but we can use a few not all.
Offline
GP1 wrote:
Pitusky12 wrote:
How do I upload a file to the Files Section on github?
Are you using GitHub for Mac, or Git Bash?
im using github for mac
Offline
Pitusky12 wrote:
GP1 - The project reader in PHP you found i think its in .sb2 . To load the projects from your computer we can use this code : this.finit = function(){
if(localStorage.files === undefined){
localStorage.files = "{}";
And i found out the PHP project reader is for .sb2 projects because i found this code :
// localStorage.__defineGetter__("files", function(){return JSON.parse(localStorage._files)});
// localStorage.__defineSetter__("files", function(v){localStorage._files = JSON.stringify(v)});
this._setFile = function(f){localStorage.files = JSON.stringify(f)}
this._getFile = function(){return JSON.parse(localStorage.files)}
this.__defineSetter__("files", function(v){console.log(v); localStorage.files = JSON.stringify(v)});
this.__defineGetter__("files", function(){return JSON.parse(localStorage.files)});
this.contentsOfFile = function(n){
this.finit();
// return this.files[n];
// var f = this.files;
return this.files[n];
This code says .JSON because it reads .sb2 projects (Scratch 2.0 projects)
In Our Scratch 2.0 player we might have to convert new block codes like cloud variables in .js
I hope this helps us
Maybe its .sb2, because the way im looking at it, it parses the file INTO a JSON, because javascript can natively read JSON and XML. When it saves the file, it turns the JSON into a string.
And the localdata can store projects, but not from your computer. Localdata is like a cookie, but dont get carried through with the http request. It doesnt actually get files from your computer. However, you still can do the file:/// protocall.
Offline
Pitusky12 wrote:
GP1 wrote:
Pitusky12 wrote:
How do I upload a file to the Files Section on github?
Are you using GitHub for Mac, or Git Bash?
im using github for mac
Do you have the jScratch repo cloned and synced to your Mac? If not, do it.
After you sync it to your clone, you need to find the local repository. For me (in Windows), it was in My Documents>>GitHub, and in a folder called jScratch. Put all your files somewhere in that folder. Go back to the GitHub folder. For me, it had a new button, and when i clicked it a commit box appeared. I typed in my commit message, and clicked Commit. That part might be different on Macs. After that, click Sync and wait untill your commit shows up in the Commits section.
Last edited by GP1 (2012-10-26 01:09:35)
Offline
Pitusky12 wrote:
We're not gonna copy other peoples scratch viewer,we can use some code but not all,okay?
Why? because we have to develop our own code but we can use a few not all.
Actually, you can't use it at all unless it has a license which allows redistribution and derivative works.
Offline
nXIII wrote:
Pitusky12 wrote:
We're not gonna copy other peoples scratch viewer,we can use some code but not all,okay?
Why? because we have to develop our own code but we can use a few not all.Actually, you can't use it at all unless it has a license which allows redistribution and derivative works.
Yep, But there are some things wrong with the code, any way.
Offline
GP1 wrote:
Pitusky12 wrote:
GP1 - The project reader in PHP you found i think its in .sb2 . To load the projects from your computer we can use this code : this.finit = function(){
if(localStorage.files === undefined){
localStorage.files = "{}";
And i found out the PHP project reader is for .sb2 projects because i found this code :
// localStorage.__defineGetter__("files", function(){return JSON.parse(localStorage._files)});
// localStorage.__defineSetter__("files", function(v){localStorage._files = JSON.stringify(v)});
this._setFile = function(f){localStorage.files = JSON.stringify(f)}
this._getFile = function(){return JSON.parse(localStorage.files)}
this.__defineSetter__("files", function(v){console.log(v); localStorage.files = JSON.stringify(v)});
this.__defineGetter__("files", function(){return JSON.parse(localStorage.files)});
this.contentsOfFile = function(n){
this.finit();
// return this.files[n];
// var f = this.files;
return this.files[n];
This code says .JSON because it reads .sb2 projects (Scratch 2.0 projects)
In Our Scratch 2.0 player we might have to convert new block codes like cloud variables in .js
I hope this helps usMaybe its .sb2, because the way im looking at it, it parses the file INTO a JSON, because javascript can natively read JSON and XML. When it saves the file, it turns the JSON into a string.
And the localdata can store projects, but not from your computer. Localdata is like a cookie, but dont get carried through with the http request. It doesnt actually get files from your computer. However, you still can do the file:/// protocall.
Oh Thanks for the news ! Smartglass and surface are released im using internet explorer on xbox 360 ill keep you posted
Offline