Simile local installation problems?

162 views
Skip to first unread message

Paige Morgan

unread,
Apr 18, 2012, 11:59:38 PM4/18/12
to SIMILE Widgets
Hi,

I'm trying to get Simile installed locally, using the full
timeline_source_2.3.0.zip, so that I can customize the units of time.

The wiki and other resources pointed me to these instructions, which
are also contained in the timeline-api.js file

http://code.google.com/p/simile-widgets/source/browse/timeline/trunk/src/webapp/api/timeline-api.js?r=2239

Those instructions suggest that I ought to be including the following
lines of code in my <head> section.

<script>
Timeline_ajax_url="http://paigemorgan.net/timeline/src/ajax/api/simile-
ajax-api.js"
Timeline_urlPrefix='http://paigemorgan.net/timeline/timeline_js/';
Timeline_parameters='bundle=true';
</script>

<script src="http://paigemorgan.net/timeline/src/webapp/api/timeline-
api.js?bundle=true"
type="text/javascript">
</script>

I am -- but I'm not having any luck loading timeline. The page I'm
trying to load is here: http://www.paigemorgan.net/timelines/demo.html

I tried it with a simple timeline from David Karger's really great
tutorial here http://people.csail.mit.edu/karger/Exhibit/CAR/HandsOn/
-- which is where I originally learned to use Simile Timeline -- but
no luck.

I've checked the archives for this group, and googled creatively --
but I'm not finding any solutions. Can anyone here suggest anything? I
would be tremendously grateful.

Thanks,

Paige

SteveP

unread,
Apr 19, 2012, 1:26:29 AM4/19/12
to simile-...@googlegroups.com
I'd also like to know how to solve this, I'm having a similar issue.

Did you see this reply from 8 days ago?  Might help...

Hi Milhouse,
There is a bug or some settings with the timeline extension, especially when deploying the timeline locally.
For starters, I would recommend using timeline 2.3.1. There is no clear place download, but I used wget to get it from here. http://api.simile-widgets.org/timeline/2.3.1/ That would be wget -r http://api.simile-widgets.org/timeline/2.3.1/. It might download all the files at http://api.simile-widgets.org/ but dont worry the site is not that big, and in addition you get all the data for you to play with.
After that the errors become more obvious. You might also consider setting the bundle setting of timeline to false for easier debugging.
There is one hack that did it for me though: In the file time-extension.js, there are 2 hacks by David Huynh. He documented it well why the hacks are necessary. I disabled hack 1, by commenting it out and it worked. I dunno if it will help, but its worth a try.
ps: I am assuming you are using a *nix system and you are trying to deploy exhibit 3.
Regards
Kihara

David Karger

unread,
Apr 19, 2012, 9:21:20 AM4/19/12
to simile-...@googlegroups.com, Paige Morgan
Paige, I'm glad you found the tutorial useful. The problem you're
having is that you are inappropriately "mixing" exhibit and timeline.

Timeline (as a standalone framework) is a lot like google maps: it's a
developer library where your own page needs to make a bunch of
javascript api calls to tell the timeline what to do and how to load its
data. Exhibit is a user-friendly *wrapper* for timeline (and google
maps) that takes care of loading the data and invoking the underlying
developer wrapper. Your web page is written for exhibit usage: it
includes a link to the data and expects the library to "take care of
it". If you want to go this route and avoid writing all that javascript
yourself, you need to include the exhibit api (as per my tutorial) and
its time extension to drive the timeline.

I'm not certain, but if you set timeline variables as you currently do,
then Exhibit's time-extension *might* be smart enough to load your local
copy of timeline. If not, you may need to host a local copy of Exhibit
as well.

-David

Paige Morgan

unread,
Apr 19, 2012, 10:55:41 AM4/19/12
to SIMILE Widgets
Thanks so much, Steve and David, for writing back so quickly. I really
appreciate it.

David, I hadn't realized that my code was mixing up Exhibit and
Timeline, but I understand the "wrapper" relationship between the two,
so I can see why mixing them up with cause trouble.

Unfortunately, including the Exhibit API (as in the tutorial) with my
current variables to try and force local usage of Timeline doesn't
work (my code is below). As you said, it was only a possibility, and
not a certainty.

I know that Exhibit 3.0 Staged is still in beta, and as such, I'm not
sure I have enough experience to get it going -- so I think that
hosting Exhibit 2.0, and running Timeline 2.3.1, which I'll grab per
Steve's repost of Kihara's reply to Milhouse, is probably the way to
go. Is that correct?

Steve, I hope that my working through this ends up being useful to
your issues as well.

Best,
Paige

<script href="http://trunk.simile-widgets.org/exhibit/api/exhibit-
api.js">
var Timeline_ajax_url="http://paigemorgan.net/timeline/src/ajax/api/
simile-ajax-api.js"
var Timeline_urlPrefix='http://paigemorgan.net/timeline/timeline_js/';
Timeline_parameters='bundle=true';
</script>

<script src="http://paigemorgan.net/timeline/src/webapp/api/timeline-
api.js?bundle=true"
type="text/javascript">
</script>

<link rel="exhibit/data" type="text/tsv" ex:valueSeparator=";"
href="egypt.txt"/>

On Apr 19, 6:21 am, David Karger <kar...@mit.edu> wrote:
> Paige, I'm glad you found the tutorial useful.  The problem you're
> having is that you are inappropriately "mixing" exhibit and timeline.
>
> Timeline (as a standalone framework) is a lot like google maps: it's a
> developer library where your own page needs to make a bunch of
> javascript api calls to tell the timeline what to do and how to load its
> data.  Exhibit is a user-friendly *wrapper* for timeline (and google
> maps) that takes care of loading the data and invoking the underlying
> developer wrapper.  Your web page is written for exhibit usage: it
> includes a link to the data and expects the library to "take care of
> it".  If you want to go this route and avoid writing all that javascript
> yourself, you need to include the exhibit api (as per my tutorial) and
> its time extension to drive the timeline.
>
> I'm not certain, but if you set timeline variables as you currently do,
> then Exhibit's time-extension *might* be smart enough to load your local
> copy of timeline.   If not, you may need to host a local copy of Exhibit
> as well.
>
> -David
>
> On 4/18/2012 11:59 PM, Paige Morgan wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > I'm trying to get Simile installed locally, using the full
> > timeline_source_2.3.0.zip, so that I can customize the units of time.
>
> > The wiki and other resources pointed me to these instructions, which
> > are also contained in the timeline-api.js file
>
> >http://code.google.com/p/simile-widgets/source/browse/timeline/trunk/...
>
> > Those instructions suggest that I ought to be including the following
> > lines of code in my<head>  section.
>
> > <script>
> > Timeline_ajax_url="http://paigemorgan.net/timeline/src/ajax/api/simile-
> > ajax-api.js"
> > Timeline_urlPrefix='http://paigemorgan.net/timeline/timeline_js/';
> > Timeline_parameters='bundle=true';
> > </script>
>
> > <script src="http://paigemorgan.net/timeline/src/webapp/api/timeline-
> > api.js?bundle=true"
> > type="text/javascript">
> > </script>
>
> > I am -- but I'm not having any luck loading timeline. The page I'm
> > trying to load is here:http://www.paigemorgan.net/timelines/demo.html
>
> > I tried it with a simple timeline from David Karger's really great
> > tutorial herehttp://people.csail.mit.edu/karger/Exhibit/CAR/HandsOn/

Paige Morgan

unread,
Apr 19, 2012, 12:11:24 PM4/19/12
to SIMILE Widgets
I guess I have one further question: IS it possible to host Timeline,
without hosting the rest of Exhibit? I'd gotten the idea that it was
possible from instructions on pages like this one:
http://simile-widgets.googlecode.com/svn/timeline/tags/2.2.0/src/webapp/api/timeline-api.js
-- which are duplicated in a number of places on the web. That was why
I'd been trying to do it this way in the first place.

Thanks again,

Paige

David Karger

unread,
Apr 19, 2012, 12:12:58 PM4/19/12
to simile-...@googlegroups.com, Paige Morgan
Yes, you can definitely use timeline directly. It does require more
javascript programming and data manipulation than using exhibit for the
same thing. The home site is here: http://simile-widgets.org/timeline/

Paige Morgan

unread,
Apr 19, 2012, 12:29:40 PM4/19/12
to SIMILE Widgets, kar...@mit.edu
Hmm. That's actually where I started, and what I thought I was doing.
The wiki provided really helpful instructions here:
http://www.simile-widgets.org/wiki/Timeline_CustomDateRanges and here:
http://www.simile-widgets.org/wiki/How_to_create_own_date_ranges -- I
think Steve P is working with the same ones.

In order to modify the date-time.js and labellers.js files, I knew I'd
need to have them on my own server, rather than calling them from MIT,
and so I went looking for instructions to do that, and found these,
linked to in the section of the wiki describing Timeline Releases and
Access, specifically

"This method is used for web browsers that don't have access to the
Internet and for anyone who wants to be vertically integrated and not
depend on the MIT server. Download either the minimal set of Timeline
libraries or the complete Timeline source and host it on your own web
server. You will need to set some Javascript global variables to the
location of your web server. See the comments in the timeline-api.js
file for more information."

http://code.google.com/p/simile-widgets/source/browse/timeline/tags/latest/src/webapp/api/timeline-api.js

I do appreciate your help, and I'm trying to avoid stupid questions.
I'll go back and see if I can figure out where I messed up.

Thanks again,
Paige

On Apr 19, 9:12 am, David Karger <kar...@mit.edu> wrote:
> Yes, you can definitely use timeline directly.  It does require more
> javascript programming and data manipulation than using exhibit for the
> same thing.  The home site is here:http://simile-widgets.org/timeline/
>
> On 4/19/2012 12:11 PM, Paige Morgan wrote:
>
>
>
>
>
>
>
> > I guess I have one further question: IS it possible to host Timeline,
> > without hosting the rest of Exhibit? I'd gotten the idea that it was
> > possible from instructions on pages like this one:
> >http://simile-widgets.googlecode.com/svn/timeline/tags/2.2.0/src/weba...

Steve Pai

unread,
Apr 20, 2012, 3:27:51 PM4/20/12
to simile-...@googlegroups.com
Paige,

Not sure if you got it working yet, but I noticed in your original email:

<script>
Timeline_ajax_url="http://paigemorgan.net/timeline/src/ajax/api/simile-
ajax-api.js
ajax-api.js"
Timeline_urlPrefix='http://paigemorgan.net/timeline/timeline_js/';
Timeline_parameters='bundle=true';
</script>

 Someone correct my if I'm wrong but within timeline-api.js, the 'bundle' parameter controls this if statement:

            if (bundle) {

                includeJavascriptFiles(Timeline.urlPrefix, [ "timeline-bundle.js" ]);

                includeCssFiles(Timeline.urlPrefix, [ "timeline-bundle.css" ]);

            } else {

                includeJavascriptFiles(Timeline.urlPrefix + "scripts/", javascriptFiles);

                includeCssFiles(Timeline.urlPrefix + "styles/", cssFiles);

            }


Setting Timeline_parameters='bundle=true'; will use timeline-bundle.js, a condensed version of the .js libraries, rather than the ones you modify for custom units.

This section of timeline-api.js appears to parse the url/js variable parameters:

  var parseURLParameters = function(parameters) {

                var params = parameters.split("&");

                for (var p = 0; p < params.length; p++) {

                    var pair = params[p].split("=");

                    if (pair[0] == "locales") {

                        desiredLocales = desiredLocales.concat(pair[1].split(","));

                    } else if (pair[0] == "defaultLocale") {

                        defaultServerLocale = pair[1];

                    } else if (pair[0] == "forceLocale") {

                        forceLocale = pair[1];

                        desiredLocales = desiredLocales.concat(pair[1].split(","));                        

                    } else if (pair[0] == "bundle") {

                        bundle = pair[1] != "false";

                    }

                }

            };


My only confusion is since date-time.js also needs to be modified (which resides in the ajax scripts), will setting 'bundle=true' also trickle into simile-ajax-api.js, or does another param need to be included? Looks to be initialized to true:

    var SimileAjax = {

        loaded:                 false,

        loadingScriptsCount:    0,

        error:                  null,

        params:                 { bundle:"true" }

    };




Steve


--
You received this message because you are subscribed to the Google Groups "SIMILE Widgets" group.
To post to this group, send email to simile-...@googlegroups.com.
To unsubscribe from this group, send email to simile-widget...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simile-widgets?hl=en.


Steve Pai

unread,
Apr 20, 2012, 7:15:58 PM4/20/12
to simile-...@googlegroups.com
I ended up tacking on '?bundle=false' to both the simile-ajax-api.js and timeline-api.js url, and commented out Timeline_parameters='bundle=false', which worked.

Contemplative

unread,
Apr 21, 2012, 4:45:44 PM4/21/12
to simile-...@googlegroups.com
Hi Paige,

Don't know if it will be helpful or not(or if you have already solved the issue), but you can take a look at this page Here
in which I managed to get this to work some time ago.  Take a look in the header of the page
and perhaps that will help.  I use Chrome to "inspect Element" when trouble-shooting this stuff,
but firefox should work just as well.

Hope you find it helpful...

wjw

Paige Morgan

unread,
Apr 25, 2012, 4:18:07 PM4/25/12
to SIMILE Widgets, stev...@gmail.com, wjwi...@gmail.com
Hi Steve and Contemplative,

Thanks for your suggestions. I've been slammed with teaching, but I'm
about to try and implement them, and see if I can get things up and
running.

Cheers,
Paige

On Apr 21, 1:45 pm, Contemplative <wjwiel...@gmail.com> wrote:
> Hi Paige,
>
> Don't know if it will be helpful or not(or if you have already solved the
> issue), but you can take a look at this page Here<http://wjwieland.dvrdns.org/timeline/html/wjw_res.html>
> in which I managed to get this to work some time ago.  Take a look in the
> header of the page
> and perhaps that will help.  I use Chrome to "inspect Element" when
> trouble-shooting this stuff,
> but firefox should work just as well.
>
> Hope you find it helpful...
>
> wjw
>
>
>
>
>
>
>
> On Thursday, April 19, 2012 11:11:24 AM UTC-5, Paige Morgan wrote:
>
> > I guess I have one further question: IS it possible to host Timeline,
> > without hosting the rest of Exhibit? I'd gotten the idea that it was
> > possible from instructions on pages like this one:
>
> >http://simile-widgets.googlecode.com/svn/timeline/tags/2.2.0/src/weba...
Reply all
Reply to author
Forward
0 new messages