Skip to content

Commit

Permalink
adding final docs and creating nav
Browse files Browse the repository at this point in the history
  • Loading branch information
anilop committed Feb 2, 2017
1 parent ba12a28 commit 03d43ce
Show file tree
Hide file tree
Showing 11 changed files with 819 additions and 7 deletions.
20 changes: 20 additions & 0 deletions Docs-Home.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
layout: default
title: User Documentation

---

<div class="doclist">
{% assign navigation_pages = site.html_pages | sort: 'navigation_weight' %}
{% for p in navigation_pages %}
{% if p.navigation_weight %}
<h3>
<a href="{{ p.url }}" {% if p.url == page.url %}class="active"{% endif %}>
{{ p.title }}
</a>
</h3>
{% endif %}
{% endfor %}
</div>
206 changes: 206 additions & 0 deletions Ingestible-Package-Guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
---
layout: default
title: Ingestible Package Guide
navigation_weight: 0

---

# Introduction

This guide will walk you through creating, ingesting, and publishing an article package in Ambra.
For instructions for setting up the Ambra stack, please see the Quickstart-Guide.

# Table of Contents:

1. The JATS standard
1. The article package
1. manifest.xml
1. manuscript.xml
1. eISSN
1. JATS deviations
1. printable
1. graphics
1. required sizes
1. Ingesting an article into Rhino
1. Creating a Content Repo bucket
1. Uploading the article
1. Adding an article revision
1. Viewing the article

# The JATS standard

JATS is a standardized markup for journal articles. When ingesting your article into Ambra, you will have to provide an XML version of your manuscript that complies with JATS.

Rhino supports JATS `1.1d2` and `1.1d3`.

The JATS standard will tell you which tags to use for an abstract, author list, references, etc. Find the standard [here](https://jats.nlm.nih.gov/index.html).

You can find example articles for the 1.1d3 version of JATS [here](https://jats.nlm.nih.gov/publishing/tag-library/1.1d3/chapter/samples.html).

# The Article Package

The article package is a zip file that contains all of the article content within a single directory. There are a few required files, which are detailed below.

## manifest.xml

The manifest is an XML file that tells Rhino what is in the article package. It must be named `manifest.xml`.

All files present in the article package zip *must* be represented in the manifest XML, and the names must match.

Verify the layout of your `manifest.xml` with a DTD. It is kept in Rhino, at `/src/main/resources/manifest.dtd`. The DTD also contains a PLOS-specific manifest example.

It is optional to include `manifest.dtd` in your article package. If you choose include it, it must be mentioned in the `ancillary` section of `manifest.xml`.

### Manifest XML Example

```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE manifest SYSTEM "manifest.dtd">
<manifest>
<articleBundle>
<article uri="info:doi/my-article-id">
<representation entry="my-article-id_xml" key="my-article-id_xml" mimetype="application/xml" type="manuscript"/>
<representation entry="my-article-id_pdf" key="my-article-id_pdf" mimetype="application/pdf" type="printable"/>
</article>
<object type="figure" uri="info:doi/my-article-id_g001">
<representation entry="my-article-id_g001.tif" key="my-article-id_g001.tif" mimetype="image/tiff" type="original"/>
<representation entry="my-article-id_g001_medium.png" key="my-article-id_g001_medium.png" mimetype="image/png" type="medium"/>
<representation entry="my-article-id_g001_large.png" key="my-article-id_g001_large.png" mimetype="image/png" type="large"/>
<representation entry="my-article-id_g001_inline.png" key="my-article-id_g001_inline.png" mimetype="image/png" type="inline"/>
<representation entry="my-article-id_g001_small.png" key="my-article-id_g001_small.png" mimetype="image/png" type="small"/>
</object>
<object type="graphic" uri="info:doi/my-article-id_e001">
<representation entry="my-article-id_e001.tif" key="my-article-id_e001.tif" mimetype="image/tiff" type="original"/>
<representation entry="my-article-id_e001_inline.png" key="my-article-id_e001_inline.png" mimetype="image/png" type="inline"/>
</object>
<object type="supplementaryMaterial" uri="info:doi/my-article-id_s001">
<representation entry="my-article-id_s001.docx" key="my-article-id_s001.docx" mimetype="application/vnd.openxmlformats-officedocument.wordprocessingml.document" type="supplementary"/>
</object>
<object type="table" uri="info:doi/my-article-id_t001">
<representation entry="my-article-id_t001.tif" key="my-article-id_t001.tif" mimetype="image/tiff" type="original"/>
<representation entry="my-article-id_t001_medium.png" key="my-article-id_t001_medium.png" mimetype="image/png" type="medium"/>
<representation entry="my-article-id_t001_large.png" key="my-article-id_t001_large.png" mimetype="image/png" type="large"/>
<representation entry="my-article-id_t001_inline.png" key="my-article-id_t001_inline.png" mimetype="image/png" type="inline"/>
<representation entry="my-article-id_t001_small.png" key="my-article-id_t001_small.png" mimetype="image/png" type="small"/>
</object>
</articleBundle>
<ancillary>
<file entry="manifest.xml" key="my-article-id_manifest.xml" mimetype="application/xml"/>
<file entry="my-article-id_xml.orig" key="my-article-id_manifest.xml.orig" mimetype="application/xml"/>
</ancillary>
</manifest>
```

### Required tags

The example above, as well as the manifest DTD, define all required tags.

1. The `xml` and `DOCTYPE` tags are required and can be copied verbatim from the example.
1. `manifest` must be used as the top-level container tag.
1. `articleBundle` contains everything used to display the article.
1. `article` defines the article uri (DOI).
1. must contain a `representation` tag for the XML and printable versions of your article.
1. `object` is a general container tag for graphics and supplementary material. It also requires `representation` tags, but the requirements differ based on object type. Graphics will be covered in more detail later in the guide.
1. `representation` requirements:
1. `entry` - value is identical to the filename
1. `key` - unique identifier for the asset
1. `mimetype` - MIME type of the asset
1. `type` - varies based on object type, covered in "Graphics" below.
1. `ancillary` contains any extra files, represented in `file` nodes. Both `manifest.xml` and `manifest.dtd` are required.
1. `file` nodes require `entry`, `key`, and `mimetype` attributes.

## Manuscript.xml

The manuscript XML contains the text for your article, including references to images.

There are standard tags to use for the abstract, author list, citations, etc. Please consult the [JATS standard](https://jats.nlm.nih.gov/index.html) or refer to the example article package [here](TODO).

### eISSN

The eISSN defined in your manuscript XML *must match* a journal eISSN defined in your Ambra database.

Example:
```xml
<issn pub-type="epub">1932-6203</issn>
```

### JATS deviations

There are two known issues when rendering a JATS article in Wombat:

1. The `<!DOCTYPE` tag should not be included.
* If included, the article will not render, and Wombat will throw a DTD-not-found exception.
1. The `<copyright-statement>` tag is not rendered. Use the `<license-p>` tag instead.

PLOS is actively working to resolve these issues.

## Printable

The `Printable` is a print-ready version of your article, generally a PDF.

## Article Assets (figures, tables, an supplementary material)

An article can have any number of article assets included, as long as they are defined in the manuscript AND the manifest.

Each included article asset requires at least one resized copy. The copy, or copies, will be one of the following types:

### Article Asset Types

1. figure - A standard image that will fit most use cases. Requires *original*, *large*, *medium*, *small*, and *inline* representations.
1. graphic - used for inline images. Requires *original* and *inline* representations.
1. table - used for tabular data. Requires *original*, *large*, *medium*, *small*, and *inline* representations.
1. supplementaryMaterial - used for supplementary material such as videos or other media. Requires *only* the supplementary type.

#### Figure and Table Size Types

1. original - the original image with original dimensions.
1. large - used in the stand-alone image view and the image viewer. Should be able to fit on a standard computer screen.
1. medium - used on the homepage. Should be less than half the size of the large version.
1. small - used in issues and the current issue on the homepage. Should be less than half the size of the medium version.
1. inline - used for inline equations. Should be able to fit close to a line in the text.

The sizes for these images are not strict and tweaking may be necessary.

These requirements are also defined in the example XML above.

# Ingesting an article into Rhino

Ingesting an article into Rhino takes three steps.

1. A bucket must exist in Content Repo with the same name defined in `rhino.yaml`.
1. Upload the article to Rhino
1. Create a revision in Rhino

## Creating a Content Repo bucket

1. Visit the Content Repo root page where you'll see a swagger interface.
1. Click on `Create a bucket` within the `buckets` section.
1. You'll see a bucket creation form. Enter `corpus` as the name.
1. Click the `Try it out!` button.

## Uploading an article

1. Visit the Rhino root page where you'll see a swagger interface.
1. Click on `ingestible-zip-controller`.
1. Click on `zipUpload` or anywhere on the green bar.
1. Click the `Browse...` button and upload your article package zipfile.
1. Click the `Try it out!` button.

This will ingest the article into Rhino and save the data to the database and content repo.

Ambra is designed versioning in mind. This means when you ingest an article, we save the data to the `ArticleIngestion` table. In order to actually view an article you will need to add a new revision.

## Adding an article revision

1. Visit the Rhino root page where you'll see a swagger interface.
1. Click on `article-crud-controller`.
1. Click on `writeRevision`.
1. Enter the doi. Because of a quirk in the DOI standard, if your doi includes a slash `/` it must be replaced with `++`.
1. Enter the ingestion number.
1. Click the `Try it out!` button.

# Viewing the article

Navigate to the article in Wombat: http://localhost:<$WOMBAT_PORT>/wombat/<$SITE_NAME>/article?id=<$DOI>

For example: http://localhost:8123/wombat/Desktop/article?id=my-article-id
21 changes: 17 additions & 4 deletions quickstart.md → Quickstart-Guide.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
---
layout: default
title: Hank Quinlan, Horrible Cop
title: Quickstart Guide

---

✮ = missing info

# Introduction
Expand All @@ -11,7 +13,7 @@ Welcome to the Ambra Quickstart guide, brought to you by PLoS

# Table of Contents:

1. Walkthrough of the Ambra core components
1. [Walkthrough of the Ambra core components](#walkthrough-of-the-ambra-core-components)
1. Wombat
1. Rhino
1. Content Repo
Expand Down Expand Up @@ -76,7 +78,8 @@ Add a journal to the database. For example:

```sql
INSERT INTO journal (`journalKey`, `title`) VALUES ("PLOS", "PLOSWorld");
```



Note that `journalKey` *must* be identical to the key configured in `journal.yaml` (see below)

Expand Down Expand Up @@ -148,6 +151,16 @@ For example to override `email.yaml`:
1. In Wombat this file is located at `src/main/webapp/WEB-INF/themes/root/config/email.yaml`
1. In your theme, this file should be located at `$YOUR_THEME_PATH/config/email.yaml`
#### Homepage
You can get started by setting your homepage content with a theme override. The homepage body is defined by the theme file `$YOUR_THEME_PATH/ftl/home/body.ftl`. Create a file at this path in your theme and fill it with the HTML or FreeMarker code for your homepage content.
To define new resources to use in your homepage, such as images or CSS files, place the files at the `$YOUR_THEME_PATH/resource` theme path. Any files placed here can be linked at the `resource/` path, relative to your homepage URL. For example, you could place an image named `banner.jpg` in the `resource` path and then link to it from your homepage with
```html
<img src="resource/banner.jpg" />
```
## Compiling Content Repo (crepo)
1. Clone the [crepo github project](https://github.com/PLOS/content-repo.git) into your projects folder. This will be your crepo working directory.
Expand Down Expand Up @@ -193,4 +206,4 @@ Go to `http://localhost:<PORT>` to view the root page for each application
PLoS provides some sample article package zip files for ingestion, located [here](✮).
You can ingest and publish an article package using the Rhino Swagger interface. For complete instructions, see "Ingesting the article into Rhino" in the Ingestible-Package-Guide.
You can ingest and publish an article package using the Rhino Swagger interface. For complete instructions, see "Ingesting the article into Rhino" in the Ingestible-Package-Guide.
5 changes: 5 additions & 0 deletions Releases.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
layout: default
title: Releases

---
9 changes: 6 additions & 3 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@
<body>
<section class="page-header">
<h1 class="project-name"><a href="{{ 'index.html' | relative_url }}">{{ site.title | default: site.github.repository_name }}</a></h1>

<h2 class="project-tagline">{{ site.description | default: site.github.project_tagline }}</h2>
<a href="{{ 'quickstart.html' | relative_url }}" class="btn">Quickstart</a>
<a href="{{ 'docs_home.md' | relative_url }}" class="btn">User Documentation</a>
<a href="{{ 'releases.md' | relative_url }}" class="btn">releases</a>
<nav>
<a href="{{ 'Quickstart-Guide.html' | relative_url }}" class="btn">Quickstart</a>
<a href="{{ 'Docs-Home.html' | relative_url }}" class="btn">User Documentation</a>
<a href="{{ 'releases.html' | relative_url }}" class="btn">Releases</a>
</nav>
</section>

<section class="main-content">
Expand Down
Loading

0 comments on commit 03d43ce

Please sign in to comment.