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

Robert Krahn robert.krahn at gmail.com
Thu Mar 12 06:39:18 CET 2015


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 <
milan.zimmermann at gmail.com> 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 <robert.krahn at gmail.com>
> wrote:
>
>> 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
>>
>>
>> On Wed, Mar 4, 2015 at 2:03 PM, Milan Zimmermann <
>> milan.zimmermann at gmail.com> 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
>>> lively-kernel at hpi.uni-potsdam.de
>>> http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel
>>>
>>>
>>
>
> _______________________________________________
> lively-kernel mailing list
> lively-kernel at hpi.uni-potsdam.de
> http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hpi.uni-potsdam.de/archive/lively-kernel/attachments/20150311/c508798d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2015-03-11 at 10.32.43 PM.png
Type: image/png
Size: 47953 bytes
Desc: not available
URL: <http://lists.hpi.uni-potsdam.de/archive/lively-kernel/attachments/20150311/c508798d/attachment-0001.png>


More information about the lively-kernel mailing list