Discussion:
[lively-kernel] Migrate xhtml files from lively(-kernel) to latest lively
Milan Zimmermann
2015-03-04 22:03:26 UTC
Permalink
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
Robert Krahn
2015-03-05 05:54:00 UTC
Permalink
Hi, Milan --

You can find a migration script here:

http://lively-web.org/users/robertkrahn/2015-03-04_migrate-lively-kernel-worlds.html

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
Post by 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
http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel
Milan Zimmermann
2015-03-07 20:10:47 UTC
Permalink
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
Post by Robert Krahn
Hi, Milan --
http://lively-web.org/users/robertkrahn/2015-03-04_migrate-lively-kernel-worlds.html
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 <
Post by 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
http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel
Robert Krahn
2015-03-12 05:39:18 UTC
Permalink
Hi, Milan --

You can indeed open a Server workspace

[image: 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 <
Post by 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
Post by Robert Krahn
Hi, Milan --
http://lively-web.org/users/robertkrahn/2015-03-04_migrate-lively-kernel-worlds.html
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 <
Post by 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
http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel
_______________________________________________
lively-kernel mailing list
http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel
Milan Zimmermann
2015-03-14 05:06:40 UTC
Permalink
Thanks Robert for the details on both methods!
Post by Robert Krahn
Hi, Milan --
You can indeed open a Server workspace
[image: 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
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 <
Post by 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
Post by Robert Krahn
Hi, Milan --
http://lively-web.org/users/robertkrahn/2015-03-04_migrate-lively-kernel-worlds.html
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 <
Post by 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
http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel
_______________________________________________
lively-kernel mailing list
http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel
Loading...