Migrate xhtml files from lively(-kernel) to latest lively

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Migrate xhtml files from lively(-kernel) to latest lively

milan zimmermann
Hi,

After installing the latest lively-web locally from https://github.com/LivelyKernel/LivelyKernel, I webdav copied some projects from my older playing with Lively in http://lively-kernel.org/repository/webwerkstatt/users/mzimmerm/ to the new installation.

But the projects do not open in the latest code - looking at the xhtml code they are generally <meta id="LivelyMigrationLevel"><![CDATA[4]]></meta>. I debugged through the bootstrap.js and I think there is something failing when the build() element fails to append to the body, but that is just a guess I was unable to follow through.

Is there a way to convert/migrate older xhtml files? I do not have anything of importance, so no problem if not, but perhaps there is something known I can do,

thanks
milan

_______________________________________________
lively-kernel mailing list
[hidden email]
http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel
Reply | Threaded
Open this post in threaded view
|

Re: Migrate xhtml files from lively(-kernel) to latest lively

Robert Krahn-4
Hi, Milan --

You can find a migration script here:

When you run it locally and change the hostname / portname of "newURL" accordingly you can migrate to your own server or you can migrate your worlds to lively-web.org.

Best,
Robert


On Wed, Mar 4, 2015 at 2:03 PM, Milan Zimmermann <[hidden email]> wrote:
Hi,

After installing the latest lively-web locally from https://github.com/LivelyKernel/LivelyKernel, I webdav copied some projects from my older playing with Lively in http://lively-kernel.org/repository/webwerkstatt/users/mzimmerm/ to the new installation.

But the projects do not open in the latest code - looking at the xhtml code they are generally <meta id="LivelyMigrationLevel"><![CDATA[4]]></meta>. I debugged through the bootstrap.js and I think there is something failing when the build() element fails to append to the body, but that is just a guess I was unable to follow through.

Is there a way to convert/migrate older xhtml files? I do not have anything of importance, so no problem if not, but perhaps there is something known I can do,

thanks
milan

_______________________________________________
lively-kernel mailing list
[hidden email]
http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel



_______________________________________________
lively-kernel mailing list
[hidden email]
http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel
Reply | Threaded
Open this post in threaded view
|

Re: Migrate xhtml files from lively(-kernel) to latest lively

milan zimmermann
Thanks Robert, 

this worked great to copy all my files from lively-kernel to my local installation.

I have a somewhat related question that should go into it's own subject but let me ask it here: When running the process I wrapped the code into a list of all files I had in that directory and subdirectories. I created that list manually, but originally I thought to do something like this on top of the script

fs = require('fs');
files = fs.readdirSync("."); // well I realize we are in Webdav so this is not right but sufficient for the question context I think
// process the files

Basically, my question is, (and I realize it is vague): is there a way for the JS workspace to act as a Nodejs console as well - being able to require Nodejs modules in the JS workspace, call the module exposed methods, and process the results in the JS workspace? 

Thanks
Milan


On Thu, Mar 5, 2015 at 12:54 AM, Robert Krahn <[hidden email]> wrote:
Hi, Milan --

You can find a migration script here:

When you run it locally and change the hostname / portname of "newURL" accordingly you can migrate to your own server or you can migrate your worlds to lively-web.org.

Best,
Robert


On Wed, Mar 4, 2015 at 2:03 PM, Milan Zimmermann <[hidden email]> wrote:
Hi,

After installing the latest lively-web locally from https://github.com/LivelyKernel/LivelyKernel, I webdav copied some projects from my older playing with Lively in http://lively-kernel.org/repository/webwerkstatt/users/mzimmerm/ to the new installation.

But the projects do not open in the latest code - looking at the xhtml code they are generally <meta id="LivelyMigrationLevel"><![CDATA[4]]></meta>. I debugged through the bootstrap.js and I think there is something failing when the build() element fails to append to the body, but that is just a guess I was unable to follow through.

Is there a way to convert/migrate older xhtml files? I do not have anything of importance, so no problem if not, but perhaps there is something known I can do,

thanks
milan

_______________________________________________
lively-kernel mailing list
[hidden email]
http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel




_______________________________________________
lively-kernel mailing list
[hidden email]
http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel
Reply | Threaded
Open this post in threaded view
|

Re: Migrate xhtml files from lively(-kernel) to latest lively

Robert Krahn-4
Hi, Milan --

You can indeed open a Server workspace

Inline image 1

Then you can run code like

var fs = require('fs');
process.cwd(); // /home/lively/LivelyKernel
var files = fs.readdirSync("./users/mzimmerm"); // config.js,images,projects,start.html

Alternatively, to use webdav to list files (from a normal workspace):

var dirContent = URL.root.withFilename("users/mzimmerm/")
  .asWebResource().getSubElements(/*optional: depth*/)

dirContent.subDocuments // WebResource(http://lively-web.org/users/mzimmerm/config.js), ...
dirContent.subCollections // WebResource(http://lively-web.org/users/mzimmerm/images/), ...

Best,
Robert



On Sat, Mar 7, 2015 at 12:10 PM, Milan Zimmermann <[hidden email]> wrote:
Thanks Robert, 

this worked great to copy all my files from lively-kernel to my local installation.

I have a somewhat related question that should go into it's own subject but let me ask it here: When running the process I wrapped the code into a list of all files I had in that directory and subdirectories. I created that list manually, but originally I thought to do something like this on top of the script

fs = require('fs');
files = fs.readdirSync("."); // well I realize we are in Webdav so this is not right but sufficient for the question context I think
// process the files

Basically, my question is, (and I realize it is vague): is there a way for the JS workspace to act as a Nodejs console as well - being able to require Nodejs modules in the JS workspace, call the module exposed methods, and process the results in the JS workspace? 

Thanks
Milan


On Thu, Mar 5, 2015 at 12:54 AM, Robert Krahn <[hidden email]> wrote:
Hi, Milan --

You can find a migration script here:

When you run it locally and change the hostname / portname of "newURL" accordingly you can migrate to your own server or you can migrate your worlds to lively-web.org.

Best,
Robert


On Wed, Mar 4, 2015 at 2:03 PM, Milan Zimmermann <[hidden email]> wrote:
Hi,

After installing the latest lively-web locally from https://github.com/LivelyKernel/LivelyKernel, I webdav copied some projects from my older playing with Lively in http://lively-kernel.org/repository/webwerkstatt/users/mzimmerm/ to the new installation.

But the projects do not open in the latest code - looking at the xhtml code they are generally <meta id="LivelyMigrationLevel"><![CDATA[4]]></meta>. I debugged through the bootstrap.js and I think there is something failing when the build() element fails to append to the body, but that is just a guess I was unable to follow through.

Is there a way to convert/migrate older xhtml files? I do not have anything of importance, so no problem if not, but perhaps there is something known I can do,

thanks
milan

_______________________________________________
lively-kernel mailing list
[hidden email]
http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel




_______________________________________________
lively-kernel mailing list
[hidden email]
http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel



_______________________________________________
lively-kernel mailing list
[hidden email]
http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel
Reply | Threaded
Open this post in threaded view
|

Re: Migrate xhtml files from lively(-kernel) to latest lively

milan zimmermann
Thanks Robert for the details on both methods!

On Thu, Mar 12, 2015 at 12:39 AM, Robert Krahn <[hidden email]> wrote:
Hi, Milan --

You can indeed open a Server workspace

Inline image 1

Then you can run code like

var fs = require('fs');
process.cwd(); // /home/lively/LivelyKernel
var files = fs.readdirSync("./users/mzimmerm"); // config.js,images,projects,start.html

Alternatively, to use webdav to list files (from a normal workspace):

var dirContent = URL.root.withFilename("users/mzimmerm/")
  .asWebResource().getSubElements(/*optional: depth*/)

dirContent.subDocuments // WebResource(http://lively-web.org/users/mzimmerm/config.js), ...
dirContent.subCollections // WebResource(http://lively-web.org/users/mzimmerm/images/), ...

Best,
Robert



On Sat, Mar 7, 2015 at 12:10 PM, Milan Zimmermann <[hidden email]> wrote:
Thanks Robert, 

this worked great to copy all my files from lively-kernel to my local installation.

I have a somewhat related question that should go into it's own subject but let me ask it here: When running the process I wrapped the code into a list of all files I had in that directory and subdirectories. I created that list manually, but originally I thought to do something like this on top of the script

fs = require('fs');
files = fs.readdirSync("."); // well I realize we are in Webdav so this is not right but sufficient for the question context I think
// process the files

Basically, my question is, (and I realize it is vague): is there a way for the JS workspace to act as a Nodejs console as well - being able to require Nodejs modules in the JS workspace, call the module exposed methods, and process the results in the JS workspace? 

Thanks
Milan


On Thu, Mar 5, 2015 at 12:54 AM, Robert Krahn <[hidden email]> wrote:
Hi, Milan --

You can find a migration script here:

When you run it locally and change the hostname / portname of "newURL" accordingly you can migrate to your own server or you can migrate your worlds to lively-web.org.

Best,
Robert


On Wed, Mar 4, 2015 at 2:03 PM, Milan Zimmermann <[hidden email]> wrote:
Hi,

After installing the latest lively-web locally from https://github.com/LivelyKernel/LivelyKernel, I webdav copied some projects from my older playing with Lively in http://lively-kernel.org/repository/webwerkstatt/users/mzimmerm/ to the new installation.

But the projects do not open in the latest code - looking at the xhtml code they are generally <meta id="LivelyMigrationLevel"><![CDATA[4]]></meta>. I debugged through the bootstrap.js and I think there is something failing when the build() element fails to append to the body, but that is just a guess I was unable to follow through.

Is there a way to convert/migrate older xhtml files? I do not have anything of importance, so no problem if not, but perhaps there is something known I can do,

thanks
milan

_______________________________________________
lively-kernel mailing list
[hidden email]
http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel




_______________________________________________
lively-kernel mailing list
[hidden email]
http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel




_______________________________________________
lively-kernel mailing list
[hidden email]
http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel