Skip to content

Commit

Permalink
partial solutions for #8 and #1
Browse files Browse the repository at this point in the history
  • Loading branch information
balmas committed Jul 11, 2016
1 parent 94a46c5 commit a507b49
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
12 changes: 11 additions & 1 deletion perseus_nemo_ui/data/templates/passage_footer.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<div class="ctsurn">
<a href="http://data.perseus.org/catalog/{{urn["work"]}}" target='_blank'>Catalog Record</a> -
<a href="http://catalog.perseus.org/cite-collections/versions/search?field_type=version&search={{ urn }}" target='_blank'>Catalog Record</a> -
<a href="http://www.perseids.org/apps/treebank?text_uri=http://perseids.org/cts5/nemo/citations/{{urn}}" target='_blank'>Create Treebank</a> <br />
<a href="/api/cts?request=GetPassage&urn={{urn}}" target='_blank'>{{urn}}</a>
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-72072451-2', 'auto');
ga('send', 'pageview');

</script>
5 changes: 4 additions & 1 deletion test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from flask import Flask
from flask_nemo import Nemo
from flask_nemo.chunker import level_grouper
from MyCapytain.common.reference import URN

from perseus_nemo_ui import PerseusNemoUi
from pkg_resources import resource_filename
Expand All @@ -13,6 +14,8 @@
api_url="http://cts.perseids.org/api/cts",
chunker={"default": level_grouper},
plugins=[PerseusNemoUi()],
transform={"default": resource_filename("perseus_nemo_ui","data/assets/static/xslt/epidocShort.xsl")}
transform={"default": resource_filename("perseus_nemo_ui","data/assets/static/xslt/epidocShort.xsl")},
urntransform={ "default": lambda x :x.upTo(URN.NO_PASSAGE) }
)

app.run()

0 comments on commit a507b49

Please sign in to comment.