Getting started 101, right now

38 views
Skip to first unread message

Ian Mulvany

unread,
Aug 22, 2013, 9:30:21 AM8/22/13
to elife...@googlegroups.com
As I mentioned on Monday, I'm going to be talking with our typesetter and hosting provider today and tomorrow. 

Given what we have _right now_, how do I go from an NLM xml file on my local hard drive to viewing it in Lens? 

This is just for demonstration purposes. 

- Ian 

Ian Mulvany

unread,
Aug 22, 2013, 9:49:33 AM8/22/13
to Michael Aufreiter, elife...@googlegroups.com
I'm more interested in understanding how to go from the code we have
now, to running the steps to allow myself to generate the lens view of
this document.

I can do the following if needed:

- host the xml file
- host a json representation of the file, if I could figure out how to
generate the JSON
- host the json representatio of the file on a server that supports JSONP

I don't know how to:

- instantiate refract against this one specific file
- figure out what refract would do with that file
- figure out how to get lens to look at the file that I've generated

As I am interested in playing around with some of the tools from
https://github.com/MartinPaulEve/meTypeset then I would prefer to just
get a quick description of how to do it myself, if that's possible,
rather than having you generate a modification.

I could also just checkout on a specific commit.

- Ian

On Thu, Aug 22, 2013 at 2:43 PM, Michael Aufreiter <m...@zive.at> wrote:
> How important is it for you to be able to demo that _right now_? With Lens
> 0.1.0, there's the dependency to a hosted converter or static doc repository
> using JSONP. If it's really urgent I can create a hot-patched version that
> does static files again. I'll put a strong focus on allowing you to do that
> demo with the 0.2.0 version asap. Can you wait? I've got most parts of the
> refactor done already, however I'm not able to test against real docs at the
> moment since the converter isn't yet ready.
>
> -- Michael
> --
> You received this message because you are subscribed to the Google Groups
> "elife lens" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elife-lens+...@googlegroups.com.
> To post to this group, send email to elife...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Ian Mulvany

unread,
Aug 22, 2013, 10:01:58 AM8/22/13
to Michael Aufreiter, elife...@googlegroups.com
I am fine with it being ready tomorrow, I thought Ivan or Graham might
be able to chip in on the refract side.

- Ian

On Thu, Aug 22, 2013 at 2:56 PM, Michael Aufreiter <m...@zive.at> wrote:
> I can look into it. Will take me a bit of time though. Are you fine with
> having this guide ready tomorrow?

Ian Mulvany

unread,
Aug 22, 2013, 10:13:40 AM8/22/13
to Michael Aufreiter, elife...@googlegroups.com
When I run refract, I end up with a node.js server running locally, right?

When I turn that on, based on the repo in the refract DB, it
automatically starts to generate lens docs from the eLife seed set on
AWS, right?

So the two questions are, how does Lens get pointed at a specific node
server, even a local one, (or is there a Lens version on a speicific
commit that can be pointed at a static file?)

And how do I modify refract to point to a different seed document?

I know these are really basic questions, I apologise, but I have a lot
of catching up to do.

- Ian

On Thu, Aug 22, 2013 at 3:05 PM, Michael Aufreiter <m...@zive.at> wrote:
> No worries I can figure things out. For demoing I think it's best to start
> refract and point Lens to the running refract instance directly. It's just a
> matter of getting refract to use your customized seed.

Ian Mulvany

unread,
Aug 22, 2013, 10:23:51 AM8/22/13
to Michael Aufreiter, elife...@googlegroups.com
On Thu, Aug 22, 2013 at 3:16 PM, Michael Aufreiter <m...@zive.at> wrote:
> Nah they're perfectly valid, just give me some more minutes to figure out
> what the best option is for now.

> I think it's best you just come up with your customized seed file. You can
> paramatrize refract to use a custom one with an environment variable.

I don't know what that means :/

Michael Aufreiter

unread,
Aug 22, 2013, 10:29:30 AM8/22/13
to Ian Mulvany, elife...@googlegroups.com

Ian Mulvany

unread,
Aug 22, 2013, 10:37:44 AM8/22/13
to Michael Aufreiter, elife...@googlegroups.com
That is awesome!

I had a feeling that it was straightforward, but I couldn't figure it
out. Is the CACHE_WARM_FILE just a plain text file with a set of uris
pointing to XML documents that should be converted?

Where do the converted JSON files live, are they just stored in-memory
on the node server?

- Ian

Michael Aufreiter

unread,
Aug 22, 2013, 10:40:40 AM8/22/13
to Ian Mulvany, elife...@googlegroups.com
That is awesome!

I had a feeling that it was straightforward, but I couldn't figure it
out. Is the CACHE_WARM_FILE just a plain text file with a set of uris
pointing to XML documents that should be converted?

Yes, just a plain text file pointing to URL of XMLs, so you'd need to host the XML's somewhere on the web and reference them from your custom xml_list.txt. 
Where do the converted JSON files live, are they just stored in-memory
on the node server?

In memory, on the local node server.. the'll be gone as soon as you shut down refract.
 
-- Michael

Graham Nott

unread,
Aug 22, 2013, 11:32:24 AM8/22/13
to elife...@googlegroups.com, Michael Aufreiter


On Thursday, August 22, 2013 6:49:33 AM UTC-7, Ian Mulvany wrote:
I don't know how to:

- instantiate refract against this one specific file
- figure out what refract would do with that file
- figure out how to get lens to look at the file that I've generated

The live workflow still relies on a PUT for each document into refract. That would be a quick way to convert a single document on-demand. An example using the default SECRET_TOKEN:

curl -X PUT -H "Content-Type: application/json" -d "{"token": "abcd", "url": "https://s3.amazonaws.com/elife-cdn/elife-articles/00415/elife00415.xml"}" http://localhost:1441/documents/00415

You can also specify a different SECRET_TOKEN for live installations but the default one should be fine for local running demonstrations.
Reply all
Reply to author
Forward
0 new messages