<commit_before>{% extends 'mdstore/base.html' %}
{% block content %}
<!-- simple introduction of Coda -->
<div class='container-fluid'>
<h3>Introduction</h3>
    The UNT Coda App is a tool for validating and retrieving data related to coda and premis events. If you have questions or comments about the UNT Coda App, please contact <NAME> at <a href="mailto:<EMAIL>"><EMAIL></a>.

<h3>Three Sections</h3>
    Notice there are three sections to The Coda App. The first section is <b>CODA</b>. This section will detail bags information and statistics, storage node status, and also serves up the sitemap xml files. There is also a system in place to validate the contents of BagIT structures. The second section is <b>PREMIS EVENTS</b>. Premis Events serve as a status indicator for different events as they relate to the coda system, such as data migration events. This section gives detail on the agents, which give infomation related about the transfer from underlying medium storage to another, a list of the most recent events, and a search utility for the events. The third and final section is <b>QUEUE</b>. The queue shows a listing of to-be-ran and completed process, such as a harvest event. There is also a stats page and search function.<br>
</div>
<div class='container-fluid'>
    <h3>Search API</h3>
    <p>Lets dive right in! The following are various search examples using <a href="http://www.cs.sunysb.edu/documentation/curl/index.html">curl</a>:</p>

    <!--BEGIN CODE MARKUP-->
    <div id="highlight-python"><pre>
    # to get only the events which have failed, use the 'outcome' url argument
    $ curl {{ request.META.HTTP_HOST }}/event/search.json?event_outcome=http%3A%2F%2Fpurl.org%2Fnet%2Funtl%2Fvocabularies%2FeventOutcomes%2F%23failure
    [
        {
            "date": "2013-05-13 14:27:29",
            "event_type": "http://purl.org/net/untl/vocabularies/preservationEvents/#fixityCheck",
            "identifier": "<KEY>",
            "linked_objects": "ark:/67531/coda1295",
            "outcome": "http://purl.org/net/untl/vocabularies/eventOutcomes/#failure"
        },
        {
            "date": "2013-05-13 14:27:30",
            "event_type": "http://purl.org/net/untl/vocabularies/preservationEvents/#migration",
            "identifier": "<KEY>",
            "linked_objects": "ark:/67531/coda1295",
            "outcome": "http://purl.org/net/untl/vocabularies/eventOutcomes/#failure"
        },
        ... etc ...
    ]

    # to get the events which failed after a certain date, append a 'start_date' argument
    $ curl {{ request.META.HTTP_HOST }}/event/search.json?event_outcome=http%3A%2F%2Fpurl.org%2Fnet%2Funtl%2Fvocabularies%2FeventOutcomes%2F%23failure&start_date=05%2F13%2F2013

    [
        {
            "date": "2013-05-13 14:27:30",
            "event_type": "http://purl.org/net/untl/vocabularies/preservationEvents/#migration",
            "identifier": "<KEY>",
            "linked_objects": "ark:/67531/coda1295",
            "outcome": "http://purl.org/net/untl/vocabularies/eventOutcomes/#failure"
        },
        ... etc ...
    ]

    # filter events to a particular bag object by giving a 'linked_object_id'
    $ curl {{ request.scheme }}://{{ request.META.HTTP_HOST }}/event/search.json?linked_object_id=ark:/67531/coda1295
    [
        {
            "date": "2013-05-13 14:27:29",
            "event_type": "http://purl.org/net/untl/vocabularies/preservationEvents/#fixityCheck",
            "identifier": "2226bcc6f9334e3eb0ab5f64c498c852",
            "linked_objects": "ark:/67531/coda1295",
            "outcome": "http://purl.org/net/untl/vocabularies/eventOutcomes/#failure"
        },
        {
            "date": "2013-05-13 14:27:30",
            "event_type": "http://purl.org/net/untl/vocabularies/preservationEvents/#migration",
            "identifier": "4f1e8bfc6e9440b982db1b9d3ab6f33f",
            "linked_objects": "ark:/67531/coda1295",<commit_msg>Use percent encoding for # in urls in about page.<commit_after>{% extends 'mdstore/base.html' %}
{% block content %}
<!-- simple introduction of Coda -->
<div class='container-fluid'>
<h3>Introduction</h3>
    The UNT Coda App is a tool for validating and retrieving data related to coda and premis events. If you have questions or comments about the UNT Coda App, please contact <NAME> at <a href="mailto:<EMAIL>"><EMAIL></a>.

<h3>Three Sections</h3>
    Notice there are three sections to The Coda App. The first section is <b>CODA</b>. This section will detail bags information and statistics, storage node status, and also serves up the sitemap xml files. There is also a system in place to validate the contents of BagIT structures. The second section is <b>PREMIS EVENTS</b>. Premis Events serve as a status indicator for different events as they relate to the coda system, such as data migration events. This section gives detail on the agents, which give infomation related about the transfer from underlying medium storage to another, a list of the most recent events, and a search utility for the events. The third and final section is <b>QUEUE</b>. The queue shows a listing of to-be-ran and completed process, such as a harvest event. There is also a stats page and search function.<br>
</div>
<div class='container-fluid'>
    <h3>Search API</h3>
    <p>Lets dive right in! The following are various search examples using <a href="http://www.cs.sunysb.edu/documentation/curl/index.html">curl</a>:</p>

    <!--BEGIN CODE MARKUP-->
    <div id="highlight-python"><pre>
    # to get only the events which have failed, use the 'outcome' url argument
    $ curl {{ request.META.HTTP_HOST }}/event/search.json?event_outcome=http://purl.org/net/untl/vocabularies/eventOutcomes/%23failure
    [
        {
            "date": "2013-05-13 14:27:29",
            "event_type": "http://purl.org/net/untl/vocabularies/preservationEvents/#fixityCheck",
            "identifier": "2226bcc6f9334e3eb0ab5f64c498c852",
            "linked_objects": "ark:/67531/coda1295",
            "outcome": "http://purl.org/net/untl/vocabularies/eventOutcomes/#failure"
        },
        {
            "date": "2013-05-13 14:27:30",
            "event_type": "http://purl.org/net/untl/vocabularies/preservationEvents/#migration",
            "identifier": "4f1e8bfc6e9440b982db1b9d3ab6f33f",
            "linked_objects": "ark:/67531/coda1295",
            "outcome": "http://purl.org/net/untl/vocabularies/eventOutcomes/#failure"
        },
        ... etc ...
    ]

    # to get the events which failed after a certain date, append a 'start_date' argument
    $ curl {{ request.META.HTTP_HOST }}/event/search.json?event_outcome=http://purl.org/net/untl/vocabularies/eventOutcomes/%23failure&start_date=05/13/2013

    [
        {
            "date": "2013-05-13 14:27:30",
            "event_type": "http://purl.org/net/untl/vocabularies/preservationEvents/#migration",
            "identifier": "4f1e8bfc6e9440b982db1b9d3ab6f33f",
            "linked_objects": "ark:/67531/coda1295",
            "outcome": "http://purl.org/net/untl/vocabularies/eventOutcomes/#failure"
        },
        ... etc ...
    ]

    # filter events to a particular bag object by giving a 'linked_object_id'
    $ curl {{ request.scheme }}://{{ request.META.HTTP_HOST }}/event/search.json?linked_object_id=ark:/67531/coda1295
    [
        {
            "date": "2013-05-13 14:27:29",
            "event_type": "http://purl.org/net/untl/vocabularies/preservationEvents/#fixityCheck",
            "identifier": "2226bcc6f9334e3eb0ab5f64c498c852",
            "linked_objects": "ark:/67531/coda1295",
            "outcome": "http://purl.org/net/untl/vocabularies/eventOutcomes/#failure"
        },
        {
            "date": "2013-05-13 14:27:30",
            "event_type": "http://purl.org/net/untl/vocabularies/preservationEvents/#migration",
            "identifier": "4f1e8bfc6e9440b982db1b9d3ab6f33f",
            "linked_objects": "ark:/67531/coda1295",
{'fraction_non_alphanumeric': 0.13216300940438871, 'fraction_numerical': 0.053918495297805645, 'mean_word_length': 3.06316861946001, 'pattern_counts': {'":': 48, '<': 64, '<?xml version=': 0, '>': 64, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4718175', 'n_tokens_mistral': 2831, 'n_tokens_neox': 2577, 'n_words': 637}