Skip to content
Permalink
Browse files

template corrections and documentation fixes

  • Loading branch information...
shawnmjones committed Jul 8, 2019
1 parent 9c97491 commit c473757083580cb421b1ca622a4bcc25460cd816
@@ -115,7 +115,7 @@ def process_arguments(args):

parser.add_argument('--story-template', dest='story_template_filename',
required=False,
help="The file containing the template for the story in Jinja2 format."
help="The file containing the template for the story."
)

parser.add_argument('--title', dest='title',
@@ -10,7 +10,7 @@ Raintale: Storytelling for Web Archives

What story do you want to tell with web archives?

Raintale is a utility for publishing social media stories from groups of archived web pages (**mementos**). Raintale uses `MementoEmbed <https://github.com/oduwsdl/MementoEmbed>`_ to extract memento information and then publishes a story with the given **storyteller**, to a static file or an online social media service. A Raintale user supplies a file containing a list of memento URLs, a story title, and a storyteller to use for publishing the story.
Raintale is a utility for publishing social media stories from groups of archived web pages (**mementos**). Raintale uses `MementoEmbed <https://github.com/oduwsdl/MementoEmbed>`_ to extract memento information and then publishes a story using a given **storyteller** to a static file or an online social media service. A Raintale user supplies a file containing a list of memento URLs, a story title, and a storyteller to use for publishing the story.

Raintale is quite configurable, providing different publishing options as storytellers and file formats. Users may also provide different presets to configure how these storytellers format their stories. Finally, Raintale accepts a template file as an argument, allowing users to format their own stories.

@@ -1,7 +1,7 @@
Creating Your Own Templates
===========================

Raintale allows the user to supply their own templates to format a story. Each template can be in a text-based format. Examples of text-based formats are HTML, XML, Markdown, and JSON. Raintale's presets are templates and you can view the files in the templates directory of the `Raintale GitHub <https://github.com/oduwsdl/raintale/tree/master/raintale/templates>`_ repository. Templates are built using an extension of the Jinja2 template engine. Because the format is an extension, not all Raintale templates are interoperable with Jinja2.
Raintale allows the user to supply their own templates to format a story. Each template can be in a text-based format. Examples of text-based formats are HTML, XML, Markdown, and JSON. Raintale's presets are templates and you can view the files in the templates directory of the `Raintale GitHub <https://github.com/oduwsdl/raintale/tree/master/raintale/templates>`_ repository. Templates are built using an extension of the Jinja2 template engine. Because the format is an extension, Raintale templates are not interoperable with Jinja2.

A Simple Template
-----------------
@@ -13,11 +13,11 @@ As noted in :ref:`building_story`, Raintale, at a minimum, accepts a list of mem

<p><h1>{{ title }}</h1></p>

{% if generated_by is defined %}
{% if generated_by is not none %}
<p><strong>Story By:</strong> {{ generated_by }}</p>
{% endif %}

{% if collection_url is defined %}
{% if collection_url is not none %}
<p><strong>Collection URL:</strong> <a href="{{ collection_url }}">{{ collection_url }}</a></p>
{% endif %}

@@ -29,19 +29,21 @@ As noted in :ref:`building_story`, Raintale, at a minimum, accepts a list of mem

{% if element.type == 'link' %}

<td><img src="{{ element.surrogate.thumbnail }}"></td>
<td><a href="{{ element.surrogate.urim }}"><img src="{{ element.surrogate.thumbnail|prefer remove_banner=yes }}"></a></td>

{% if loop.index is divisibleby 4 %}
</tr><tr>
{% endif %}

{% else %}

<!-- Element type {{ element.type }} is unsupported by the thubmnails3col template -->
<!-- Element type {{ element.type }} is unsupported by the thumbnails4col template -->

{% endif %}

{% endfor %}
</table>


In this example, the ``{{ title }}`` variable will be filled by the parameter of the ``--title`` argument of the ``tellstory`` command. The same for the ``{{ generated_by }}`` and ``{{ collection_url }}`` variables and their corresponding ``tellstory`` arguments.

@@ -136,7 +138,7 @@ The above example would replace the value of the variable with the 3 :superscrip

.. note::

If a Raintale preference is used in a template, it is no longer a valid Jinja2 template and will only work with Raintale.
If a Raintale preference is used in a template, it is no longer a valid Jinja2 template and will only work with Raintale. Jinja2 filters do not yet work with Raintale.

.. note::

@@ -1,10 +1,10 @@
<p><h1>{{ title }}</h1></p>

{% if generated_by is defined %}
{% if generated_by is not none %}
<p><strong>Story By:</strong> {{ generated_by }}</p>
{% endif %}

{% if collection_url is defined %}
{% if collection_url is not none %}
<p><strong>Collection URL:</strong> <a href="{{ collection_url }}">{{ collection_url }}</a></p>
{% endif %}

@@ -1,10 +1,10 @@
<p><h1>{{ title }}</h1></p>

{% if generated_by is defined %}
{% if generated_by is not none %}
<p><strong>Story By:</strong> {{ generated_by }}</p>
{% endif %}

{% if collection_url is defined %}
{% if collection_url is not none %}
<p><strong>Collection URL:</strong> <a href="{{ collection_url }}">{{ collection_url }}</a></p>
{% endif %}

@@ -16,11 +16,11 @@

<p><h1 class="text-white">{{ title }}</h1></p>

{% if generated_by is defined %}
{% if generated_by is not none %}
<p class="text-white"><strong>Story By:</strong> {{ generated_by }}</p>
{% endif %}

{% if collection_url is defined %}
{% if collection_url is not none %}
<p class="text-white"><strong>Collection URL:</strong> <a href="{{ collection_url }}" class="text-white">{{ collection_url }}</a></p>
{% endif %}

0 comments on commit c473757

Please sign in to comment.
You can’t perform that action at this time.