Martin Atkins (mart) wrote in lj_dev,
Martin Atkins
mart
lj_dev

S2Preview

I've uploaded the start of a general S2 previewing utility (without a GUI this time; maybe one can be made to use this later) called S2Preview. As the site notes, its support for LiveJournal is minimal right now and FotoBilder support is non-existant. However, the code to start layers from different sites is separate from the guts of the program, in a “runner”, so runners can be worked on separately.

This time I went for a different approach than I did for S2View, my last prototype. This program, implemented entirely in Perl, uses a simple web server bound to localhost which you can connect to from any browser. Also unlike S2View, it has the S2 compiler embedded in it, so users don't need to download it and compile their layers separately. This does of course have the downside that compiler changes necessitate S2Preview updates, but the compiler shouldn't be changing much from now on.

If you do want to update the compiler, you can just copy the latest compiler sources into the S2 directory, but currently you must avoid replacing Compiler.pm as I added a new method to it which will eventually be separate, probably. Compiler updates normally necessitate runtime library updates, so you'll have to update S2.pm too. The version included in the source archive incorporates my latest changes which are not yet committed to CVS to add OO-related operators and make polymorphism less quirky, which is a bit risky, but hopefully that patch will go in without any non-compatible changes.

If anyone wants to give it a try, it'll run the LiveJournal core layer okay but layouts tend to die because they use things which the current half-baked runner doesn't populate. You can work on the runner (apps/livejournal/livejournal.pl) to get it to populate more things. I'd like to say that I'll accept patches, but I don't currently have a public email address on which to recieve them. Eventually I'd like to have a runner which can run all of the LiveJournal views with fake data which tests most common cases, such as currents vs. no currents and so on. I'll probably port the FotoBilder runner from S2View at some point.

Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments