Merge branch 'master' into improvify_download_page

pull/1/head
eric 2012-09-22 13:51:28 -04:00
commit 1de7dd1654
7 changed files with 76 additions and 17 deletions

View File

@ -99,12 +99,16 @@
</div>
</div>
{% block news %}
<div class="launch_top">
It's here: our first unglued edition. You can now <a href="/work/81724/">download <I>Oral Literature in Africa</I></a>.<br /><br />Campaigns to unglue more books <a href="http://blog.unglue.it/2012/09/13/update-on-unglue-it-relaunch/">will relaunch soon</a>.
</div>
{% endblock %}
{% block topsection %}{% endblock %}
{% block content %}{% endblock %}
</div>
{% block footer %}
<div id="footer">
<div class="js-main">
<div class="column">
@ -151,6 +155,7 @@ It's here: our first unglued edition. You can now <a href="/work/81724/">downlo
</div>
</div>
</div>
{% endblock %}
{% block counter %}
<script type="text/javascript">
@ -164,7 +169,8 @@ It's here: our first unglued edition. You can now <a href="/work/81724/">downlo
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>{% endblock %}
</script>
{% endblock %}
</body>
</html>

View File

@ -0,0 +1,14 @@
{% extends "base.html" %}
{% block news %}
{% endblock %}
{% block content %}
Books unglued in {{ year }} for the LOCKSS harvester to crawl.<br /><br />
{% for ebook in ebooks %}
<a href="{% url lockss ebook.work.id %}">{{ ebook.work.title }}</a><br />
{% endfor %}
{% endblock %}
{% block footer %}
{% endblock %}

View File

@ -181,6 +181,14 @@ Creative Commons offers a variety of other licenses, many of them with even less
<a id="blogs"></a><h2>Blog Coverage (Highlights)</h2>
<div class="pressarticles">
<div>
<a href="http://boingboing.net/2012/09/20/words-on-the-water.html">Words on the Water</a><br />
Boing Boing - September 20, 2012<br />
</div>
<div>
<a href="http://openfolklore.org/news/world-oral-literature-project-open-book-publishers-and-unglueit-release-new-open-edition-oral-l">First Book Comes Unglued</a><br />
Open Folklore - September 12, 2012<br />
</div>
<div>
<a href="http://www.thedigitalshift.com/2012/09/roy-tennant-digital-libraries/first-book-comes-unglued/">First Book Comes Unglued</a><br />
The Digital Shift (Library Journal/School Library Journal) - September 12, 2012<br />

View File

@ -72,27 +72,41 @@ $j(document).ready(function(){
Campaign suspended. <br />See <a href="/faq">FAQ</a>.
{% else %}{% if status == 'WITHDRAWN' %}
Campaign withdrawn. <br />See <a href="/faq">FAQ</a>.
{% else %}{% if wishers == 0 %}
<span class="findtheungluers">No ungluers are wishing yet.</span>
<br />
Be the first!
{% else %}{% if wishers == 1 %}
<span class="findtheungluers">{{ wishers }} Ungluer is wishing</span>
<br />
You can too!
{% else %}
<span class="findtheungluers">{{ wishers }} Ungluers are wishing</span>
{% endif %}
<br />
You can too!
{% endif %}{% endif %}{% endif %}{% endif %}
<br />
You can too!
{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}
{% endif %}
{% else %}
<span class="findtheungluers">
{% if wishers == 1 %}
{{ wishers }} Ungluer is wishing
{% if wishers == 0 %}
<span class="findtheungluers">
No ungluers are wishing yet.
</span>
<br />
Be the first!
{% else %}{% if wishers == 1 %}
<span class="findtheungluers">
{{ wishers }} Ungluer is wishing
</span>
<br />
You can too!
{% else %}
{{ wishers }} Ungluers are wishing
{% endif %}
</span>
<br />
You can too!
<span class="findtheungluers">
{{ wishers }} Ungluers are wishing
</span>
<br />
You can too!
{% endif %}{% endif %}
{% endif %}{% endif %}
</span>
</div>
</div>
{% include "explore.html" %}

View File

@ -44,6 +44,7 @@ urlpatterns = patterns(
url(r"^work/(?P<work_id>\d+)/preview/$", "work", {'action': 'preview'}, name="work_preview"),
url(r"^work/(?P<work_id>\d+)/acks/$", "work", {'action': 'acks'}, name="work_acks"),
url(r"^work/(?P<work_id>\d+)/lockss/$", "lockss", name="lockss"),
url(r"^lockss/(?P<year>\d+)/$", "lockss_manifest", name="lockss_manifest"),
url(r"^work/(?P<work_id>\d+)/download/$", "download", name="download"),
url(r"^work/\d+/acks/images/(?P<file_name>[\w\.]*)$", "static_redirect_view",{'dir': 'images'}),
url(r"^work/(?P<work_id>\d+)/librarything/$", "work_librarything", name="work_librarything"),

View File

@ -4,7 +4,7 @@ import json
import logging
import urllib
from datetime import timedelta
from datetime import timedelta, date
from regluit.utils.localdatetime import now, date_today
from random import randint
@ -2047,7 +2047,7 @@ def campaign_archive_js(request):
def lockss(request, work_id):
"""
manifest pages for lockss harvester
manifest pages for lockss harvester -- individual works
"""
work = safe_get_work(work_id)
try:
@ -2058,6 +2058,22 @@ def lockss(request, work_id):
return render(request, "lockss.html", {'work':work, 'ebooks':ebooks, 'authors':authors})
def lockss_manifest(request, year):
"""
manifest pages for lockss harvester -- yearly indices
(lockss needs pages listing all books unglued by year, with
programmatically determinable URLs)
"""
year = int(year)
start_date = date(year, 1, 1)
end_date = date(year, 12, 31)
try:
ebooks = models.Edition.objects.filter(unglued=True).filter(created__range=(start_date, end_date))
except:
ebooks = None
return render(request, "lockss_manifest.html", {'ebooks':ebooks, 'year': year})
def download(request, work_id):
context = {}
work = safe_get_work(work_id)

View File

@ -24,7 +24,7 @@ git+ssh://git@github.com/Gluejar/boto.git@2.3.0
fabric
paramiko
pyasn1
pycrypto
pycrypto==2.5
django-maintenancemode
django-smtp-ssl
django-ckeditor