Lively Kernel canvas
// this script is evaluated on world load
truenulltrue
nulltruetemplate=newWebResource('http://www.lively-kernel.org/repository/webwerkstatt/BWINF/GruppeXX/start.xhtml')doc=template.getDocument()doc.getElementById('28236:TextMorph').childNodes[5].childNodes[0].databaseURL=newURL('http://www.lively-kernel.org/repository/webwerkstatt/BWINF/')//createdirsfor(vari=0;i<20;i++){varidx=i<10?'0'+i:i.toString()varname='Gruppe'+idx;vardir=newWebResource(baseURL.withFilename(name+'/'));dir.create();}baseURL=newURL('http://www.lively-kernel.org/repository/webwerkstatt/BWINF/')//createworldsfor(vari=0;i<20;i++){varidx=i<10?'0'+i:i.toString()varname='Gruppe'+idx;varworld=newWebResource(baseURL.withFilename(name+'/'+start.xhtml));doc.getElementById('28236:TextMorph').childNodes[5].childNodes[0].data=nameworld.setContent(Exporter.stringify(doc))}22truetruefalsetruetruefalse
false1truefalsetruetruefalse
nullfalsetruenullfalse
falsenullfalse
false
false
falsenullfalsefalsenullnullnullnullfalse
nulltruecodeBase=newURL('http://www.lively-kernel.org/repository/webwerkstatt/')url='http://www.lively-kernel.org/repository/webwerkstatt/'//url='http://www.lively-kernel.org/repository/webwerkstatt/migration-test/'configs=newWebResource(url).subDocuments('infinity').select(function(ea){returnea.getURL().filename()=='config.js'})configs.lengthconfigs[0].getContent()configs.forEach(function(ea){str=ea.getURL()+'\n';str+=ea.getContent();newTextMorph(newRectangle(0,0,600,400),str).openInWorld()})configs.invoke('del')17truetruefalsetruetruefalse
false1truefalsetruetruefalse
nullfalsetruenullfalse
falsenullfalse
false
false
falsenullfalsefalsenullnullnullnullfalse
null
http://lively-kernel.org/repository/lively-wiki/dipr6.xhtmlnull0.004329004329004329
nulltrue//getallxhtmlfilescodeBase=URL.codeBase//url='http://www.lively-kernel.org/repository/webwerkstatt/migration-test/'worlds=newWebResource(codeBase).subDocuments('infinity').select(function(ea){returnea.getURL().toString().endsWith('.xhtml')})fixWorld=function(world){vardoc=world.getDocument()varscripts=doc.getElementsByTagName('script')//step1removeExample.jsandScratch.jsremoveScriptEndingWith('Examples.js',scripts);removeScriptEndingWith('Scratch.js',scripts);//step2removeconfig.jsscriptsvarconfigs=$A(scripts).select(function(node){varurl=node.getAttribute('xlink:href');returnurl&&(url.endsWith('/config.js')||url=='config.js')})removeNodes(configs);//step2addbaseUrlscriptbeforelocalconfig.jsscriptvarurl=world.getURL().getDirectory();varrelative=url.relativePathFrom(codeBase)if(relative.startsWith('/'))thrownewError('relativelooksdifferentthanexpected')varlevels=relative.split('/').length-1vartoCodeBase=range(1,levels).collect(function(){return'..'}).join('/')+'/';varsrc=Strings.format('Config.codeBase=Config.getDocumentDirectory()+"%s"',toCodeBase);varcodeBaseScripts=$A(scripts).select(function(ea){returnea.childElements&&ea.childElements.length>0&&ea.childElements[0].data==src});codeBaseScripts.forEach(function(ea){ea.parentElement.removeChild(ea)})varscript=createNode(doc,Namespace.SVG,'script')script.setAttribute('name','codeBase');script.appendChild(createCDATA(doc,src))varlocalConfigScript=findScriptEndingWith('localconfig.js',scripts)localConfigScript.parentElement.insertBefore(script,localConfigScript);localConfigScript.parentElement.insertBefore(doc.createTextNode("\n"),localConfigScript);//step3rewritelibinlively//changeHrefFromLibToLively(scripts)//changeHrefToLively(scripts)//step4findduplicates?//step5writeoutworld.setContent(Exporter.stringify(doc))}worlds.forEachShowingProgress($morph('progress'),function(w){fixWorld(w)},function(w){returnw.getURL().toString()}) 0 && ea.childElements[0].data == src });\n\tcodeBaseScripts.forEach(function(ea) { ea.parentElement.removeChild(ea) })\n\n\tvar script = createNode(doc, Namespace.SVG, 'script')\n\tscript.setAttribute('name', 'codeBase');\n\tscript.appendChild(createCDATA(doc, src))\n\tvar localConfigScript = findScriptEndingWith('localconfig.js', scripts)\n\tlocalConfigScript.parentElement.insertBefore(script, localConfigScript);\n\tlocalConfigScript.parentElement.insertBefore(doc.createTextNode(\"\\n\"), localConfigScript);\n\n\t// step 3 rewrite lib in lively\n\t//changeHrefFromLibToLively(scripts)\n\t//changeHrefToLively(scripts)\n\n\t// step 4 find duplicates?\n\n\t// step 5 write out\n\tworld.setContent(Exporter.stringify(doc))\n\n}\n\n\nworlds.forEachShowingProgress($morph('progress'), function(w) { fixWorld(w) }, function(w) { return w.getURL().toString() })"]]>truetruefalse54truetruefalse
false1truefalsetruetruefalse
nullfalsetruenullfalse
worldmigrationfalsenullfalse
false
false
falsenullfalsefalsenullnullnullnullfalse
10004.668028578781314Wikicontroltrue
nullfalsetruenullfalse
WebResourceextension[doit]falsenullfalse
false
false
falsenullfalse
localrequirements[doit]falsetruefalse0false
initializer[doit]falsetruefalse0false
ArrayandURLextension[doit]falsetruefalse0false
fixworldhelperfunctions[doit]falsetruefalse0false310-1nullnullnulltruenullfalsenulltruetrue
1true
null
null
null
nulltruetrue
-----falsetruefalse0false310
-1nullnullnulltruetruetrue
1true
null
null
null
nulltruetrue
20null
-----truetrue2000000
truetrue
1truetruetrue
20null
truetruetruetrue
1truetruetrue
Browseworld...falsenullfalsetrue
Pushchangesbackfalsenullfalsetrue
Refreshfalsenullfalsetrue
Evalonfalsenullfalsetrue
Sortfalsenullfalsetrue
truetruenullfalsenullnullnullnullfalsenull50