Merge pull request #43 from Gluejar/master
always good to keep dev branches from diverging too muchpull/44/head
commit
b87918a6ab
|
@ -86,7 +86,7 @@ class CampaignResource(ModelResource):
|
|||
wishlist_work_ids = []
|
||||
|
||||
for o in data['objects']:
|
||||
o.data['in_wishlist'] = o.obj.work.id in wishlist_work_ids
|
||||
o.data['in_wishlist'] = o.obj.work_id in wishlist_work_ids
|
||||
# there's probably a better place up the chain (where the Campaign objects are directly available) to grab the status
|
||||
c = models.Campaign.objects.get(id=o.data["id"])
|
||||
o.data['status'] = c.status
|
||||
|
|
|
@ -26,7 +26,7 @@ class ApiTests(TestCase):
|
|||
|
||||
def setUp(self):
|
||||
edition = models.Edition.objects.get(pk=1)
|
||||
self.work_id=edition.work.id
|
||||
self.work_id=edition.work_id
|
||||
campaign = models.Campaign.objects.create(
|
||||
name=edition.work.title,
|
||||
work=edition.work,
|
||||
|
@ -155,7 +155,7 @@ class FeedTests(TestCase):
|
|||
def setUp(self):
|
||||
edition = models.Edition.objects.get(pk=1)
|
||||
ebook = models.Ebook.objects.create(edition=edition, url='http://example.org/', format='epub', rights='CC BY')
|
||||
self.test_work_id = edition.work.id
|
||||
self.test_work_id = edition.work_id
|
||||
|
||||
def test_opds(self):
|
||||
r = self.client.get('/api/opds/creative_commons/')
|
||||
|
|
|
@ -179,13 +179,13 @@ class EbookFileAdmin(ModelAdmin):
|
|||
readonly_fields = ('file', 'edition_link', 'ebook_link', 'ebook')
|
||||
def edition_link(self, obj):
|
||||
if obj.edition:
|
||||
link = reverse("admin:core_edition_change", args=[obj.edition.id])
|
||||
link = reverse("admin:core_edition_change", args=[obj.edition_id])
|
||||
return u'<a href="%s">%s</a>' % (link,obj.edition)
|
||||
else:
|
||||
return u''
|
||||
def ebook_link(self, obj):
|
||||
if obj.ebook:
|
||||
link = reverse("admin:core_ebook_change", args=[obj.ebook.id])
|
||||
link = reverse("admin:core_ebook_change", args=[obj.ebook_id])
|
||||
return u'<a href="%s">%s</a>' % (link,obj.ebook)
|
||||
else:
|
||||
return u''
|
||||
|
@ -206,7 +206,7 @@ class GiftAdmin(ModelAdmin):
|
|||
search_fields = ('giver__username', 'to')
|
||||
readonly_fields = ('giver', 'acq',)
|
||||
def acq_admin_link(self, gift):
|
||||
return "<a href='/admin/core/acq/%s/'>%s</a>" % (gift.acq.id, gift.acq)
|
||||
return "<a href='/admin/core/acq/%s/'>%s</a>" % (gift.acq_id, gift.acq)
|
||||
acq_admin_link.allow_tags = True
|
||||
|
||||
class CeleryTaskAdmin(ModelAdmin):
|
||||
|
|
|
@ -37,7 +37,7 @@ from regluit.utils.localdatetime import now
|
|||
from . import cc
|
||||
from . import models
|
||||
from .parameters import WORK_IDENTIFIERS
|
||||
from .validation import identifier_cleaner
|
||||
from .validation import identifier_cleaner, unreverse_name
|
||||
from .loaders.scrape import get_scraper, scrape_sitemap
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
@ -410,8 +410,8 @@ def relate_isbn(isbn, cluster_size=1):
|
|||
if related_edition.work is None:
|
||||
related_edition.work = edition.work
|
||||
related_edition.save()
|
||||
elif related_edition.work.id != edition.work.id:
|
||||
logger.debug("merge_works path 1 %s %s", edition.work.id, related_edition.work.id )
|
||||
elif related_edition.work_id != edition.work_id:
|
||||
logger.debug("merge_works path 1 %s %s", edition.work_id, related_edition.work_id )
|
||||
merge_works(related_edition.work, edition.work)
|
||||
if related_edition.work.editions.count()>cluster_size:
|
||||
return related_edition.work
|
||||
|
@ -449,8 +449,8 @@ def add_related(isbn):
|
|||
if related_edition.work is None:
|
||||
related_edition.work = work
|
||||
related_edition.save()
|
||||
elif related_edition.work.id != work.id:
|
||||
logger.debug("merge_works path 1 %s %s", work.id, related_edition.work.id )
|
||||
elif related_edition.work_id != work.id:
|
||||
logger.debug("merge_works path 1 %s %s", work.id, related_edition.work_id )
|
||||
work = merge_works(work, related_edition.work)
|
||||
else:
|
||||
if other_editions.has_key(related_language):
|
||||
|
@ -460,14 +460,14 @@ def add_related(isbn):
|
|||
|
||||
# group the other language editions together
|
||||
for lang_group in other_editions.itervalues():
|
||||
logger.debug("lang_group (ed, work): %s", [(ed.id, ed.work.id) for ed in lang_group])
|
||||
logger.debug("lang_group (ed, work): %s", [(ed.id, ed.work_id) for ed in lang_group])
|
||||
if len(lang_group)>1:
|
||||
lang_edition = lang_group[0]
|
||||
logger.debug("lang_edition.id: %s", lang_edition.id)
|
||||
# compute the distinct set of works to merge into lang_edition.work
|
||||
works_to_merge = set([ed.work for ed in lang_group[1:]]) - set([lang_edition.work])
|
||||
for w in works_to_merge:
|
||||
logger.debug("merge_works path 2 %s %s", lang_edition.work.id, w.id )
|
||||
logger.debug("merge_works path 2 %s %s", lang_edition.work_id, w.id )
|
||||
merged_work = merge_works(lang_edition.work, w)
|
||||
models.WorkRelation.objects.get_or_create(
|
||||
to_work=lang_group[0].work,
|
||||
|
@ -517,6 +517,9 @@ def merge_works(w1, w2, user=None):
|
|||
w2source = wishlist.work_source(w2)
|
||||
wishlist.remove_work(w2)
|
||||
wishlist.add_work(w1, w2source)
|
||||
for userprofile in w2.contributors.all():
|
||||
userprofile.works.remove(w2)
|
||||
userprofile.works.add(w1)
|
||||
for identifier in w2.identifiers.all():
|
||||
identifier.work = w1
|
||||
identifier.save()
|
||||
|
@ -732,19 +735,9 @@ class LookupFailure(Exception):
|
|||
|
||||
IDTABLE = [('librarything', 'ltwk'), ('goodreads', 'gdrd'), ('openlibrary', 'olwk'),
|
||||
('gutenberg', 'gtbg'), ('isbn', 'isbn'), ('oclc', 'oclc'),
|
||||
('edition_id', 'edid'), ('googlebooks', 'goog'), ('doi', 'doi'),
|
||||
('edition_id', 'edid'), ('googlebooks', 'goog'), ('doi', 'doi'), ('http','http'),
|
||||
]
|
||||
|
||||
def unreverse(name):
|
||||
if not ',' in name:
|
||||
return name
|
||||
(last, rest) = name.split(',', 1)
|
||||
if not ',' in rest:
|
||||
return '%s %s' % (rest.strip(), last.strip())
|
||||
(first, rest) = rest.split(',', 1)
|
||||
return '%s %s, %s' % (first.strip(), last.strip(), rest.strip())
|
||||
|
||||
|
||||
def load_from_yaml(yaml_url, test_mode=False):
|
||||
"""
|
||||
This really should be called 'load_from_github_yaml'
|
||||
|
@ -756,7 +749,7 @@ def load_from_yaml(yaml_url, test_mode=False):
|
|||
for metadata in all_metadata.get_edition_list():
|
||||
edition = loader.load_from_pandata(metadata)
|
||||
loader.load_ebooks(metadata, edition, test_mode)
|
||||
return edition.work.id if edition else None
|
||||
return edition.work_id if edition else None
|
||||
|
||||
def edition_for_ident(id_type, id_value):
|
||||
#print 'returning edition for {}: {}'.format(id_type, id_value)
|
||||
|
@ -827,9 +820,9 @@ class BasePandataLoader(object):
|
|||
value = value[0] if isinstance(value, list) else value
|
||||
try:
|
||||
id = models.Identifier.objects.get(type=id_code, value=value)
|
||||
if work and id.work and id.work.id is not work.id:
|
||||
if work and id.work and id.work_id is not work.id:
|
||||
# dangerous! merge newer into older
|
||||
if work.id < id.work.id:
|
||||
if work.id < id.work_id:
|
||||
merge_works(work, id.work)
|
||||
else:
|
||||
merge_works(id.work, work)
|
||||
|
@ -877,7 +870,7 @@ class BasePandataLoader(object):
|
|||
rel_code = inverse_marc_rels.get(key, 'aut')
|
||||
creators = creators if isinstance(creators, list) else [creators]
|
||||
for creator in creators:
|
||||
edition.add_author(unreverse(creator.get('agent_name', '')), relation=rel_code)
|
||||
edition.add_author(unreverse_name(creator.get('agent_name', '')), relation=rel_code)
|
||||
for yaml_subject in metadata.subjects: #always add yaml subjects (don't clear)
|
||||
if isinstance(yaml_subject, tuple):
|
||||
(authority, heading) = yaml_subject
|
||||
|
|
|
@ -129,7 +129,7 @@ def add_all_isbns(isbns, work, language=None, title=None):
|
|||
edition = bookloader.add_by_isbn(isbn, work, language=language, title=title)
|
||||
if edition:
|
||||
first_edition = first_edition if first_edition else edition
|
||||
if work and (edition.work.id != work.id):
|
||||
if work and (edition.work_id != work.id):
|
||||
if work.created < edition.work.created:
|
||||
work = merge_works(work, edition.work)
|
||||
else:
|
||||
|
|
|
@ -5,6 +5,7 @@ from bs4 import BeautifulSoup
|
|||
#from gitenberg.metadata.pandata import Pandata
|
||||
from django.conf import settings
|
||||
from urlparse import urljoin
|
||||
from RISparser import read as readris
|
||||
|
||||
from regluit.core import models
|
||||
from regluit.core.validation import identifier_cleaner, authlist_cleaner
|
||||
|
@ -13,6 +14,7 @@ logger = logging.getLogger(__name__)
|
|||
|
||||
CONTAINS_COVER = re.compile('cover')
|
||||
CONTAINS_CC = re.compile('creativecommons.org')
|
||||
CONTAINS_OCLCNUM = re.compile('worldcat.org/oclc/(\d+)')
|
||||
|
||||
class BaseScraper(object):
|
||||
'''
|
||||
|
@ -26,7 +28,9 @@ class BaseScraper(object):
|
|||
try:
|
||||
response = requests.get(url, headers={"User-Agent": settings.USER_AGENT})
|
||||
if response.status_code == 200:
|
||||
self.base = response.url
|
||||
self.doc = BeautifulSoup(response.content, 'lxml')
|
||||
self.setup()
|
||||
self.get_genre()
|
||||
self.get_title()
|
||||
self.get_language()
|
||||
|
@ -94,7 +98,18 @@ class BaseScraper(object):
|
|||
dt = self.doc.find('dt', string=re.compile(name))
|
||||
dd = dt.find_next_sibling('dd') if dt else None
|
||||
return dd.text if dd else None
|
||||
|
||||
def get_itemprop(self, name):
|
||||
value_list = []
|
||||
attrs = {'itemprop': name}
|
||||
props = self.doc.find_all(attrs=attrs)
|
||||
for el in props:
|
||||
value_list.append(el.text)
|
||||
return value_list
|
||||
|
||||
def setup(self):
|
||||
# use this method to get auxiliary resources based on doc
|
||||
pass
|
||||
#
|
||||
# getters
|
||||
#
|
||||
|
@ -105,7 +120,7 @@ class BaseScraper(object):
|
|||
self.set('genre', 'book')
|
||||
|
||||
def get_title(self):
|
||||
value = self.check_metas(['DC.Title', 'dc.title', 'citation_title', 'title'])
|
||||
value = self.check_metas(['DC.Title', 'dc.title', 'citation_title', 'og:title', 'title'])
|
||||
if not value:
|
||||
value = self.fetch_one_el_content('title')
|
||||
self.set('title', value)
|
||||
|
@ -150,7 +165,17 @@ class BaseScraper(object):
|
|||
if value:
|
||||
self.identifiers['doi'] = value
|
||||
|
||||
isbns = self.get_isbns()
|
||||
#look for oclc numbers
|
||||
links = self.doc.find_all(href=CONTAINS_OCLCNUM)
|
||||
for link in links:
|
||||
oclcmatch = CONTAINS_OCLCNUM.search(link['href'])
|
||||
if oclcmatch:
|
||||
value = identifier_cleaner('oclc')(oclcmatch.group(1))
|
||||
if value:
|
||||
self.identifiers['oclc'] = value
|
||||
break
|
||||
|
||||
isbns = self.get_isbns()
|
||||
ed_list = []
|
||||
if len(isbns):
|
||||
#need to create edition list
|
||||
|
@ -195,7 +220,9 @@ class BaseScraper(object):
|
|||
'author',
|
||||
], list_mode='list')
|
||||
if not value_list:
|
||||
return
|
||||
value_list = self.get_itemprop('author')
|
||||
if not value_list:
|
||||
return
|
||||
creator_list = []
|
||||
value_list = authlist_cleaner(value_list)
|
||||
if len(value_list) == 1:
|
||||
|
@ -207,16 +234,16 @@ class BaseScraper(object):
|
|||
self.set('creator', {'authors': creator_list })
|
||||
|
||||
def get_cover(self):
|
||||
image_url = self.check_metas(['og.image', 'image'])
|
||||
image_url = self.check_metas(['og.image', 'image', 'twitter:image'])
|
||||
if not image_url:
|
||||
block = self.doc.find(class_=CONTAINS_COVER)
|
||||
block = block if block else self.doc
|
||||
img = block.find_all('img', src=CONTAINS_COVER)
|
||||
if img:
|
||||
cover_uri = img[0].get('src', None)
|
||||
if cover_uri:
|
||||
image_url = urljoin(self.base, cover_uri)
|
||||
if image_url:
|
||||
if not image_url.startswith('http'):
|
||||
image_url = urljoin(self.base, image_url)
|
||||
self.set('covers', [{'image_url': image_url}])
|
||||
|
||||
def get_downloads(self):
|
||||
|
@ -279,8 +306,65 @@ class PressbooksScraper(BaseScraper):
|
|||
''' return True if the class can scrape the URL '''
|
||||
return url.find('press.rebus.community') > 0 or url.find('pressbooks.com') > 0
|
||||
|
||||
|
||||
class HathitrustScraper(BaseScraper):
|
||||
|
||||
CATALOG = re.compile(r'catalog.hathitrust.org/Record/(\d+)')
|
||||
|
||||
def setup(self):
|
||||
catalog_a = self.doc.find('a', href=self.CATALOG)
|
||||
if catalog_a:
|
||||
catalog_num = self.CATALOG.search(catalog_a['href']).group(1)
|
||||
ris_url = 'https://catalog.hathitrust.org/Search/SearchExport?handpicked={}&method=ris'.format(catalog_num)
|
||||
response = requests.get(ris_url, headers={"User-Agent": settings.USER_AGENT})
|
||||
records = readris(response.text.splitlines()) if response.status_code == 200 else []
|
||||
for record in records:
|
||||
self.record = record
|
||||
return
|
||||
self.record = {}
|
||||
|
||||
|
||||
def get_downloads(self):
|
||||
dl_a = self.doc.select_one('#fullPdfLink')
|
||||
value = dl_a['href'] if dl_a else None
|
||||
if value:
|
||||
self.set(
|
||||
'download_url_{}'.format('pdf'),
|
||||
'https://babel.hathitrust.org{}'.format(value)
|
||||
)
|
||||
|
||||
def get_isbns(self):
|
||||
isbn = self.record.get('issn', [])
|
||||
value = identifier_cleaner('isbn')(isbn)
|
||||
return {'print': value} if value else {}
|
||||
|
||||
def get_title(self):
|
||||
self.set('title', self.record.get('title', ''))
|
||||
|
||||
def get_keywords(self):
|
||||
self.set('subjects', self.record.get('keywords', []))
|
||||
|
||||
def get_publisher(self):
|
||||
self.set('publisher', self.record.get('publisher', ''))
|
||||
|
||||
def get_pubdate(self):
|
||||
self.set('publication_date', self.record.get('year', ''))
|
||||
|
||||
def get_description(self):
|
||||
notes = self.record.get('notes', [])
|
||||
self.set('description', '\r'.join(notes))
|
||||
|
||||
def get_genre(self):
|
||||
self.set('genre', self.record.get('type_of_reference', '').lower())
|
||||
|
||||
@classmethod
|
||||
def can_scrape(cls, url):
|
||||
''' return True if the class can scrape the URL '''
|
||||
return url.find('hathitrust.org') > 0 or url.find('hdl.handle.net/2027/') > 0
|
||||
|
||||
|
||||
def get_scraper(url):
|
||||
scrapers = [PressbooksScraper, BaseScraper]
|
||||
scrapers = [PressbooksScraper, HathitrustScraper, BaseScraper]
|
||||
for scraper in scrapers:
|
||||
if scraper.can_scrape(url):
|
||||
return scraper(url)
|
||||
|
|
|
@ -8,15 +8,15 @@ def delete_newest_ebooks(ebooks):
|
|||
"""
|
||||
for ebook in sorted(ebooks, key=lambda ebook: ebook.created)[1:]:
|
||||
print "deleting ebook.id {}, edition.id {} work.id {}".format(ebook.id,
|
||||
ebook.edition.id,
|
||||
ebook.edition.work.id)
|
||||
ebook.edition_id,
|
||||
ebook.edition.work_id)
|
||||
ebook.delete()
|
||||
|
||||
intact = ebooks[0]
|
||||
print "leaving undeleted: ebook.id {}, edition.id {} work.id {}".format(
|
||||
intact.id,
|
||||
intact.edition.id,
|
||||
intact.edition.work.id
|
||||
intact.edition_id,
|
||||
intact.edition.work_id
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0009_auto_20170808_0846'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='userprofile',
|
||||
name='works',
|
||||
field=models.ManyToManyField(related_name='contributors', to='core.Work', blank=True),
|
||||
),
|
||||
]
|
|
@ -134,8 +134,11 @@ class CeleryTask(models.Model):
|
|||
return f.AsyncResult(self.task_id)
|
||||
@property
|
||||
def state(self):
|
||||
f = getattr(regluit.core.tasks, self.function_name)
|
||||
return f.AsyncResult(self.task_id).state
|
||||
try:
|
||||
f = getattr(regluit.core.tasks, self.function_name)
|
||||
return f.AsyncResult(self.task_id).state
|
||||
except AttributeError:
|
||||
return None
|
||||
@property
|
||||
def result(self):
|
||||
f = getattr(regluit.core.tasks, self.function_name)
|
||||
|
@ -341,7 +344,7 @@ class Acq(models.Model):
|
|||
'exlibris':0,
|
||||
'chapterfooter': 0,
|
||||
'disclaimer':0,
|
||||
'referenceid': '%s:%s:%s' % (self.work.id, self.user.id, self.id) if do_watermark else 'N/A',
|
||||
'referenceid': '%s:%s:%s' % (self.work_id, self.user_id, self.id) if do_watermark else 'N/A',
|
||||
'kf8mobi': True,
|
||||
'epub': True,
|
||||
}
|
||||
|
@ -352,7 +355,7 @@ class Acq(models.Model):
|
|||
return self.watermarked
|
||||
|
||||
def _hash(self):
|
||||
return hashlib.md5('%s:%s:%s:%s'%(settings.SOCIAL_AUTH_TWITTER_SECRET, self.user.id, self.work.id, self.created)).hexdigest()
|
||||
return hashlib.md5('%s:%s:%s:%s'%(settings.SOCIAL_AUTH_TWITTER_SECRET, self.user_id, self.work_id, self.created)).hexdigest()
|
||||
|
||||
def expire_in(self, delta):
|
||||
self.expires = (now() + delta) if delta else now()
|
||||
|
@ -1077,7 +1080,7 @@ class Campaign(models.Model):
|
|||
format=format,
|
||||
rights=self.license,
|
||||
provider="Unglue.it",
|
||||
url=settings.BASE_URL_SECURE + reverse('download_campaign', args=[self.work.id, format]),
|
||||
url=settings.BASE_URL_SECURE + reverse('download_campaign', args=[self.work_id, format]),
|
||||
version='unglued',
|
||||
)
|
||||
old_ebooks = Ebook.objects.exclude(pk=ebook.pk).filter(
|
||||
|
@ -1102,7 +1105,7 @@ class Campaign(models.Model):
|
|||
'exlibris':0,
|
||||
'chapterfooter':0,
|
||||
'disclaimer':0,
|
||||
'referenceid': '%s:%s:%s' % (self.work.id, self.id, self.license),
|
||||
'referenceid': '%s:%s:%s' % (self.work_id, self.id, self.license),
|
||||
'kf8mobi': True,
|
||||
'epub': True,
|
||||
}
|
||||
|
@ -1211,6 +1214,9 @@ class UserProfile(models.Model):
|
|||
librarything_id = models.CharField(max_length=31, blank=True)
|
||||
badges = models.ManyToManyField('Badge', related_name='holders', blank=True)
|
||||
kindle_email = models.EmailField(max_length=254, blank=True)
|
||||
|
||||
# keep track of work the user adds
|
||||
works = models.ManyToManyField('Work', related_name='contributors', blank=True)
|
||||
|
||||
goodreads_user_id = models.CharField(max_length=32, null=True, blank=True)
|
||||
goodreads_user_name = models.CharField(max_length=200, null=True, blank=True)
|
||||
|
|
|
@ -82,11 +82,11 @@ class Identifier(models.Model):
|
|||
identifier = Identifier.objects.create(type=type, value=value, work=work)
|
||||
else:
|
||||
identifier = Identifier.objects.create(type=type, value=value, work=work, edition=edition)
|
||||
if identifier.work.id != work.id:
|
||||
if identifier.work_id != work.id:
|
||||
identifier.work = work
|
||||
identifier.save()
|
||||
if identifier.edition and edition:
|
||||
if identifier.edition.id != edition.id:
|
||||
if identifier.edition_id != edition.id:
|
||||
identifier.edition = edition
|
||||
identifier.save()
|
||||
others = Identifier.objects.filter(type=type, work=work, edition=edition).exclude(value=value)
|
||||
|
@ -961,7 +961,7 @@ class Edition(models.Model):
|
|||
return self.ebooks.filter(active=True)
|
||||
|
||||
def download_via_url(self):
|
||||
return settings.BASE_URL_SECURE + reverse('download', args=[self.work.id])
|
||||
return settings.BASE_URL_SECURE + reverse('download', args=[self.work_id])
|
||||
|
||||
def authnames(self):
|
||||
return [auth.last_name_first for auth in self.authors.all()]
|
||||
|
|
|
@ -107,8 +107,8 @@ from django_comments.signals import comment_was_posted
|
|||
|
||||
def notify_comment(comment, request, **kwargs):
|
||||
logger.info('comment %s notifying' % comment.pk)
|
||||
other_commenters = User.objects.filter(comment_comments__content_type=comment.content_type, comment_comments__object_pk=comment.object_pk).distinct().exclude(id=comment.user.id)
|
||||
all_wishers = comment.content_object.wished_by().exclude(id=comment.user.id)
|
||||
other_commenters = User.objects.filter(comment_comments__content_type=comment.content_type, comment_comments__object_pk=comment.object_pk).distinct().exclude(id=comment.user_id)
|
||||
all_wishers = comment.content_object.wished_by().exclude(id=comment.user_id)
|
||||
other_wishers = all_wishers.exclude(id__in=other_commenters)
|
||||
domain = Site.objects.get_current().domain
|
||||
if comment.content_object.last_campaign() and comment.user in comment.content_object.last_campaign().managers.all():
|
||||
|
@ -177,7 +177,7 @@ def handle_transaction_charged(sender,transaction=None, **kwargs):
|
|||
if transaction.offer.license == LIBRARY:
|
||||
library = Library.objects.get(id=transaction.extra['library_id'])
|
||||
new_acq = Acq.objects.create(user=library.user,work=transaction.campaign.work,license= LIBRARY)
|
||||
if transaction.user.id != library.user.id: # don't put it on reserve if purchased by the library
|
||||
if transaction.user_id != library.user_id: # don't put it on reserve if purchased by the library
|
||||
reserve_acq = Acq.objects.create(user=transaction.user,work=transaction.campaign.work,license= RESERVE, lib_acq = new_acq)
|
||||
reserve_acq.expire_in(datetime.timedelta(hours=2))
|
||||
copies = int(transaction.extra.get('copies',1))
|
||||
|
|
|
@ -154,15 +154,15 @@ class BookLoaderTests(TestCase):
|
|||
|
||||
def test_language_locale_mock(self):
|
||||
with requests_mock.Mocker(real_http=True) as m:
|
||||
with open(os.path.join(TESTDIR, 'zhTW.json')) as gb:
|
||||
with open(os.path.join(TESTDIR, 'zhCN.json')) as gb:
|
||||
m.get('https://www.googleapis.com/books/v1/volumes', content=gb.read())
|
||||
self.test_language_locale(mocking=True)
|
||||
|
||||
def test_language_locale(self, mocking=False):
|
||||
if not (mocking or settings.TEST_INTEGRATION):
|
||||
return
|
||||
edition = bookloader.add_by_isbn('9789570336467')
|
||||
self.assertEqual(edition.work.language, 'zh-TW')
|
||||
edition = bookloader.add_by_isbn('9787104030126')
|
||||
self.assertEqual(edition.work.language, 'zh-CN')
|
||||
|
||||
def test_update_edition_mock(self):
|
||||
with requests_mock.Mocker(real_http=True) as m:
|
||||
|
@ -230,7 +230,7 @@ class BookLoaderTests(TestCase):
|
|||
back_point = True
|
||||
to_works = [wr.to_work for wr in edition.work.works_related_from.all()]
|
||||
for to_work in to_works:
|
||||
if edition.work.id not in [wr1.from_work.id for wr1 in to_work.works_related_to.all()]:
|
||||
if edition.work_id not in [wr1.from_work.id for wr1 in to_work.works_related_to.all()]:
|
||||
back_point = False
|
||||
break
|
||||
self.assertTrue(back_point)
|
||||
|
|
|
@ -48,7 +48,7 @@ def isbn_cleaner(value):
|
|||
return value
|
||||
isbn=ISBN(value)
|
||||
if isbn.error:
|
||||
raise forms.ValidationError(isbn.error)
|
||||
raise ValidationError(isbn.error)
|
||||
isbn.validate()
|
||||
return isbn.to_string()
|
||||
|
||||
|
@ -94,18 +94,18 @@ def test_file(the_file, fformat):
|
|||
try:
|
||||
book = EPUB(the_file.file)
|
||||
except Exception as e:
|
||||
raise forms.ValidationError(_('Are you sure this is an EPUB file?: %s' % e) )
|
||||
raise ValidationError(_('Are you sure this is an EPUB file?: %s' % e) )
|
||||
elif fformat == 'mobi':
|
||||
try:
|
||||
book = Mobi(the_file.file)
|
||||
book.parse()
|
||||
except Exception as e:
|
||||
raise forms.ValidationError(_('Are you sure this is a MOBI file?: %s' % e) )
|
||||
raise ValidationError(_('Are you sure this is a MOBI file?: %s' % e) )
|
||||
elif fformat == 'pdf':
|
||||
try:
|
||||
doc = PdfFileReader(the_file.file)
|
||||
except Exception, e:
|
||||
raise forms.ValidationError(_('%s is not a valid PDF file' % the_file.name) )
|
||||
raise ValidationError(_('%s is not a valid PDF file' % the_file.name) )
|
||||
return True
|
||||
|
||||
def valid_xml_char_ordinal(c):
|
||||
|
@ -129,6 +129,18 @@ def valid_subject( subject_name ):
|
|||
return False
|
||||
return True
|
||||
|
||||
reverse_name_comma = re.compile(r',(?! *Jr[\., ])')
|
||||
|
||||
def unreverse_name(name):
|
||||
name = name.strip('.')
|
||||
if not reverse_name_comma.search(name):
|
||||
return name
|
||||
(last, rest) = name.split(',', 1)
|
||||
if not ',' in rest:
|
||||
return '%s %s' % (rest.strip(), last.strip())
|
||||
(first, rest) = rest.split(',', 1)
|
||||
return '%s %s, %s' % (first.strip(), last.strip(), rest.strip())
|
||||
|
||||
def authlist_cleaner(authlist):
|
||||
''' given a author string or list of author strings, checks that the author string
|
||||
is not a list of author names and that no author is repeated'''
|
||||
|
@ -144,16 +156,19 @@ def authlist_cleaner(authlist):
|
|||
# Match comma but not ", Jr"
|
||||
comma_list_delim = re.compile(r',(?! *Jr[\., ])')
|
||||
spaces = re.compile(r'\s+')
|
||||
_and_ = re.compile(r',? and ')
|
||||
_and_ = re.compile(r',? (and|\&) ')
|
||||
semicolon_list_delim = re.compile(r'[\;|\&]')
|
||||
reversed_name = re.compile(r'(de |la |los |von |van )*\w+, \w+.?( \w+.?)?(, Jr\.?)?')
|
||||
|
||||
def auth_cleaner(auth):
|
||||
''' given a author string checks that the author string
|
||||
is not a list of author names'''
|
||||
cleaned = []
|
||||
auth = _and_.sub(',', auth)
|
||||
if ';' in auth:
|
||||
authlist = auth.split(';')
|
||||
if ';' in auth or reversed_name.match(auth):
|
||||
authlist = semicolon_list_delim.split(auth)
|
||||
authlist = [unreverse_name(name) for name in authlist]
|
||||
else:
|
||||
auth = _and_.sub(',', auth)
|
||||
authlist = comma_list_delim.split(auth)
|
||||
for auth in authlist:
|
||||
cleaned.append(spaces.sub(' ', auth.strip()))
|
||||
|
|
|
@ -51,7 +51,7 @@ class IdentifierForm(forms.ModelForm):
|
|||
required=False,
|
||||
)
|
||||
make_new = forms.BooleanField(
|
||||
label='There\'s no existing Identifier, so please use an Unglue.it ID',
|
||||
label='There\'s no existing Identifier. ',
|
||||
required=False,
|
||||
)
|
||||
identifier = None
|
||||
|
@ -61,7 +61,7 @@ class IdentifierForm(forms.ModelForm):
|
|||
id_value = self.cleaned_data.get('id_value', '').strip()
|
||||
make_new = self.cleaned_data.get('make_new', False)
|
||||
if not make_new:
|
||||
self.cleaned_data['value'] = identifier_cleaner(id_type)(id_value)
|
||||
self.cleaned_data['id_value'] = identifier_cleaner(id_type)(id_value)
|
||||
return self.cleaned_data
|
||||
|
||||
class Meta:
|
||||
|
@ -154,7 +154,7 @@ class EditionForm(forms.ModelForm):
|
|||
if id_value:
|
||||
identifier = Identifier.objects.filter(type=id_type, value=id_value)
|
||||
if identifier:
|
||||
err_msg = "{} is a duplicate for work #{}.".format(identifier[0], identifier[0].work.id)
|
||||
err_msg = "{} is a duplicate for work #{}.".format(identifier[0], identifier[0].work_id)
|
||||
self.add_error('id_value', forms.ValidationError(err_msg))
|
||||
try:
|
||||
self.cleaned_data['value'] = identifier_cleaner(id_type)(id_value)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{% for ebook in work.ebooks_all %}
|
||||
<li>
|
||||
<a href="{{ ebook.url }}">{{ ebook.format }}, {{ ebook.rights }}</a>, created {{ ebook.created }}{% if ebook.user %},
|
||||
by <a href="{% url 'supporter' ebook.user.id %}">{{ ebook.user }}</a>{% endif %}.
|
||||
by <a href="{% url 'supporter' ebook.user_id %}">{{ ebook.user }}</a>{% endif %}.
|
||||
{% if ebook.filesize %}{{ ebook.filesize }}{% else %}??{% endif %}B
|
||||
{% if ebook.version_label %}{{ ebook.version }}{% endif %}
|
||||
{% if ebook.active %}<input type="submit" name="deactivate_ebook_{{ ebook.id }}" value="deactivate" class="deletebutton" title="deactivate ebook" />{% else %}<input type="submit" name="activate_ebook_{{ ebook.id }}" value="activate" class="deletebutton" title="activate ebook" />{% endif %}
|
||||
|
|
|
@ -59,7 +59,7 @@ ul.fancytree-container {
|
|||
|
||||
// perform action
|
||||
{% if edition.work %}
|
||||
jQuery.post('{% url 'kw_edit' edition.work.id %}', {'remove_kw': kw, 'csrfmiddlewaretoken': '{{ csrf_token }}' }, function(data) {
|
||||
jQuery.post('{% url 'kw_edit' edition.work_id %}', {'remove_kw': kw, 'csrfmiddlewaretoken': '{{ csrf_token }}' }, function(data) {
|
||||
li.html('kw removed');
|
||||
});
|
||||
{% else %}
|
||||
|
@ -88,7 +88,7 @@ ul.fancytree-container {
|
|||
{% block doccontent %}
|
||||
{% if admin %}
|
||||
{% if edition.pk %}
|
||||
<h2>Edit Edition for <a href="{% url 'work' edition.work.id %}">{{ edition.work.title }}</a></h2>
|
||||
<h2>Edit Edition for <a href="{% url 'work' edition.work_id %}">{{ edition.work.title }}</a></h2>
|
||||
{% else %}
|
||||
<h2>Create New Edition</h2>
|
||||
{% endif %}
|
||||
|
@ -225,20 +225,25 @@ ul.fancytree-container {
|
|||
|
||||
<h2>More Edition Management</h2>
|
||||
|
||||
<div><a href="{% url 'merge' edition.work.id %}">Merge other works into this one</a></div>
|
||||
<div><a href="{% url 'work_editions' edition.work.id %}">Remove editions from this work</a></div>
|
||||
<div><a href="{% url 'merge' edition.work_id %}">Merge other works into this one</a></div>
|
||||
<div><a href="{% url 'work_editions' edition.work_id %}">Remove editions from this work</a></div>
|
||||
{% if edition.id %}
|
||||
<div><a href="{% url 'manage_ebooks' edition.id %}">Add ebooks for this edition</a></div>
|
||||
{% endif %}
|
||||
{% if request.user.is_staff %}
|
||||
<div><a href="{% url 'feature' edition.work.id %}">Feature this work today</a></div>
|
||||
<div><a href="{% url 'feature' edition.work_id %}">Feature this work today</a></div>
|
||||
{% endif %}
|
||||
<br />
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
{% if edition.work %}
|
||||
<h2><a href="{% url 'work' edition.work_id %}">{{ edition.work.title }}</a> was added to Unglue.it on {{ edition.work.created }}</h2>
|
||||
{% include 'edition_display.html' %}
|
||||
<div class="launch_top pale">
|
||||
Are you the author or other rightsholder for this work?
|
||||
To edit the metadata or add editions, become an Unglue.it <a href="{% url 'rightsholders' %}">rights holder</a>.
|
||||
</div>
|
||||
{% else %}
|
||||
Sorry, there's no work specified.
|
||||
{% endif %}
|
||||
|
|
|
@ -39,11 +39,7 @@
|
|||
web: <a href="{{ edition.http_id }}">{{ edition.http_id }}</a><br />
|
||||
{% endif %}
|
||||
{% if not managing %}
|
||||
{% if user.is_staff %}
|
||||
<a href="{% url 'new_edition' work_id edition.id %}">Edit this edition</a><br />
|
||||
{% elif user in work.last_campaign.managers.all %}
|
||||
<a href="{% url 'new_edition' work_id edition.id %}">Edit this edition</a><br />
|
||||
{% elif user.rights_holder.count and not work.last_campaign %}
|
||||
{% if user_can_edit_work %}
|
||||
<a href="{% url 'new_edition' work_id edition.id %}">Edit this edition</a><br />
|
||||
{% endif %}
|
||||
{% if user.is_authenticated %}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
{% block doccontent %}
|
||||
<div class="work_campaigns">
|
||||
<b>Title</b>: <a href="{% url 'work' edition.work.id %}">{{ edition.title}}</a><br />
|
||||
<b>Title</b>: <a href="{% url 'work' edition.work_id %}">{{ edition.title}}</a><br />
|
||||
<b>Publisher</b> : {{ edition.publisher_name }}<br />
|
||||
<b>Authors</b>:
|
||||
<ul>
|
||||
|
@ -93,7 +93,7 @@ For ePUB files, use the <a href=https://code.google.com/p/epubcheck/">epubcheck<
|
|||
|
||||
<h2>More Edition Management</h2>
|
||||
|
||||
<div><a href="{% url 'new_edition' edition.work.id edition.id %}">Edit this edition</a></div>
|
||||
<div><a href="{% url 'new_edition' edition.work_id edition.id %}">Edit this edition</a></div>
|
||||
{% if edition.work.last_campaign %}
|
||||
<div><a href="{% url 'manage_campaign' edition.work.last_campaign.id %}">Manage this campaign</a></div>
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<div class="agate-info">
|
||||
<p>© {{ campaign.work.preferred_edition.publication_date }} by {{ campaign.work.authors_short }}</p>
|
||||
<p>ISBN: {{ campaign.work.preferred_edition.isbn_13 }} .</p>
|
||||
<p>URI: <a href="https://unglue.it/work/{{ campaign.work.id }}/">https://unglue.it/work/{{ campaign.work.id }}/</a> (this work).</p>
|
||||
<p>URI: <a href="https://unglue.it/work/{{ campaign.work_id }}/">https://unglue.it/work/{{ campaign.work_id }}/</a> (this work).</p>
|
||||
<p><img src="images/unglueitlogo.png" alt="unglue.it logo" /></p>
|
||||
<p>
|
||||
This <i>unglued</i> edition is distributed under the terms of the Creative Commons {{ campaign.license }} license. To view a copy of this license, visit <a href="{{ campaign.license_url }}">{{ campaign.license_url }}</a>.
|
||||
|
@ -97,7 +97,7 @@
|
|||
<p>
|
||||
If you're reading this book on an internet-connected device, you can also share it with your friends:
|
||||
<ul>
|
||||
{% url 'work' campaign.work.id as work_url %}
|
||||
{% url 'work' campaign.work_id as work_url %}
|
||||
<a href="mailto:?to=&subject=I%27m%20enjoying%20{{ campaign.work.title|urlencode }}%2C%20a%20free%2C%20DRM%2Dfree%20ebook%2E%20You%20can%20too%21&body=You%20can%20download%20it%20from%20Unglue%2Eit%20here%3A%20https://unglue.it{{ work_url|urlencode:"" }}%20%2E"><li>Email it</li></a>
|
||||
<a href="https://twitter.com/intent/tweet?url=https://unglue.it{{ work_url|urlencode:"" }}&text=I%27m%20enjoying%20{{ campaign.work.title|urlencode:"" }}%2C%20a%20free%2C%20DRM%2Dfree%20ebook%2E%20You%20can%20too%21"><li>Tweet it</li></a>
|
||||
<a href="https://www.facebook.com/sharer.php?u=https://unglue.it{{ work_url|urlencode:"" }}"><li>Share it on Facebook</li></a>
|
||||
|
|
|
@ -238,7 +238,7 @@ function put_un_in_cookie2(){
|
|||
{% elif object.campaign.type == 3 %}
|
||||
supported
|
||||
{% endif %}<br />
|
||||
<a class="user-book-name" href="{% url 'work' object.campaign.work.id %}">{{ object.campaign.work.title }}</a>
|
||||
<a class="user-book-name" href="{% url 'work' object.campaign.work_id %}">{{ object.campaign.work.title }}</a>
|
||||
</span>
|
||||
{% else %}
|
||||
<span class="user-avatar">
|
||||
|
@ -247,7 +247,7 @@ function put_un_in_cookie2(){
|
|||
<span class="user-book-info">
|
||||
Anonymous User<br />
|
||||
supported <br />
|
||||
<a class="user-book-name" href="{% url 'work' object.campaign.work.id %}">{{ object.campaign.work.title }}</a>
|
||||
<a class="user-book-name" href="{% url 'work' object.campaign.work_id %}">{{ object.campaign.work.title }}</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% elif event.2 == "comment" %}
|
||||
|
@ -266,7 +266,7 @@ function put_un_in_cookie2(){
|
|||
<span class="user-book-info">
|
||||
<a href="{% url 'supporter' object.wishlist.user.username %}">{{ object.wishlist.user.username }}</a><br />
|
||||
faved<br />
|
||||
<a class="user-book-name" href="{% url 'work' object.work.id %}">{{ object.work.title }}</a>
|
||||
<a class="user-book-name" href="{% url 'work' object.work_id %}">{{ object.work.title }}</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
{% 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 />
|
||||
<a href="{% url 'lockss' ebook.work_id %}">{{ ebook.work.title }}</a><br />
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -92,8 +92,8 @@ You can complete your last transaction by <a href="{% url 'fund' user.profile.la
|
|||
<h2 style="margin-top:8em">Your Pledges</h2>
|
||||
<dl>
|
||||
{% for transaction in request.user.profile.pledges %}
|
||||
<dt><i><a href="{% url 'work' transaction.campaign.work.id %}">{{ transaction.campaign.work.title }}</a></i>
|
||||
(<a href="{% url 'pledge_modify' transaction.campaign.work.id %}">modify pledge</a>)</dt>
|
||||
<dt><i><a href="{% url 'work' transaction.campaign.work_id %}">{{ transaction.campaign.work.title }}</a></i>
|
||||
(<a href="{% url 'pledge_modify' transaction.campaign.work_id %}">modify pledge</a>)</dt>
|
||||
<dd><div class="modify_notification">
|
||||
{% include "trans_summary.html" %}
|
||||
</div></dd>
|
||||
|
|
|
@ -94,9 +94,9 @@ Please fix the following before launching your campaign:
|
|||
|
||||
<div class="preview_campaign">
|
||||
{% ifequal campaign_status 'INITIALIZED' %}
|
||||
<a href="{% url 'work_preview' campaign.work.id %}" class="manage" target="_blank">Preview Your Campaign</a>
|
||||
<a href="{% url 'work_preview' campaign.work_id %}" class="manage" target="_blank">Preview Your Campaign</a>
|
||||
{% else %}
|
||||
<a href="{% url 'work' campaign.work.id %}" class="manage" target="_blank">See Your Campaign</a>
|
||||
<a href="{% url 'work' campaign.work_id %}" class="manage" target="_blank">See Your Campaign</a>
|
||||
{% endifequal %}
|
||||
</div>
|
||||
|
||||
|
@ -136,7 +136,7 @@ Please fix the following before launching your campaign:
|
|||
<div class="edition_form" id="edition_{{edition.id}}">
|
||||
<p> Edition {{ edition.id }}: <input type="radio" {% ifequal edition.id form.edition.value %}checked="checked" {% endifequal %}id="id_edition_{{forloop.counter}}" value="{{edition.id}}" name="edition" /><label for="id_edition_{{forloop.counter}}"> Prefer this edition </label>
|
||||
<ul style="text-indent:1em">
|
||||
<li style="text-indent:2.5em"><a href="{% url 'new_edition' edition.work.id edition.id %}"> Edit </a> this edition</li>
|
||||
<li style="text-indent:2.5em"><a href="{% url 'new_edition' edition.work_id edition.id %}"> Edit </a> this edition</li>
|
||||
{% ifnotequal campaign.type 1 %}
|
||||
{% if campaign.rh.can_sell %}
|
||||
{% if edition.ebook_files.all.0 %}
|
||||
|
@ -159,7 +159,7 @@ Please fix the following before launching your campaign:
|
|||
{% endif %}
|
||||
{% if campaign.work.epubfiles.0 %}
|
||||
{% for ebf in campaign.work.epubfiles %}
|
||||
<p>{% if ebf.active %}<span class="yikes">ACTIVE</span> {% elif ebf.ebook.active %} MIRROR {% endif %}EPUB file: <a href="{{ebf.file.url}}">{{ebf.file}}</a> <br />created {{ebf.created}} for edition <a href="#edition_{{ebf.edition.id}}">{{ebf.edition.id}}</a> {% if ebf.asking %}(This file has had the campaign 'ask' added.){% endif %}<br />{% if ebf.active %}{% ifequal action 'mademobi' %}<span class="yikes">A MOBI file is being generated. </span> (Takes a minute or two.) {% else %}You can <a href="{% url 'makemobi' campaign.id ebf.id %}">generate a MOBI file.</a> {% endifequal %}{% endif %}</p>
|
||||
<p>{% if ebf.active %}<span class="yikes">ACTIVE</span> {% elif ebf.ebook.active %} MIRROR {% endif %}EPUB file: <a href="{{ebf.file.url}}">{{ebf.file}}</a> <br />created {{ebf.created}} for edition <a href="#edition_{{ebf.edition_id}}">{{ebf.edition_id}}</a> {% if ebf.asking %}(This file has had the campaign 'ask' added.){% endif %}<br />{% if ebf.active %}{% ifequal action 'mademobi' %}<span class="yikes">A MOBI file is being generated. </span> (Takes a minute or two.) {% else %}You can <a href="{% url 'makemobi' campaign.id ebf.id %}">generate a MOBI file.</a> {% endifequal %}{% endif %}</p>
|
||||
{% endfor %}
|
||||
{% if campaign.work.test_acqs.0 %}
|
||||
<ul>
|
||||
|
@ -170,12 +170,12 @@ Please fix the following before launching your campaign:
|
|||
{% endif %}
|
||||
{% if campaign.work.mobifiles.0 %}
|
||||
{% for ebf in campaign.work.mobifiles %}
|
||||
<p>{% if ebf.active %}<span class="yikes">ACTIVE</span> {% endif %}MOBI file: <a href="{{ebf.file.url}}">{{ebf.file}}</a> <br />created {{ebf.created}} for edition <a href="#edition_{{ebf.edition.id}}">{{ebf.edition.id}}</a> {% if ebf.asking %}(This file has had the campaign 'ask' added.){% endif %}</p>
|
||||
<p>{% if ebf.active %}<span class="yikes">ACTIVE</span> {% endif %}MOBI file: <a href="{{ebf.file.url}}">{{ebf.file}}</a> <br />created {{ebf.created}} for edition <a href="#edition_{{ebf.edition_id}}">{{ebf.edition_id}}</a> {% if ebf.asking %}(This file has had the campaign 'ask' added.){% endif %}</p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if campaign.work.pdffiles.0 %}
|
||||
{% for ebf in campaign.work.pdffiles %}
|
||||
<p>{% if ebf.active %}<span class="yikes">ACTIVE</span> {% endif %}PDF file: <a href="{{ebf.file.url}}">{{ebf.file}}</a> <br />created {{ebf.created}} for edition <a href="#edition_{{ebf.edition.id}}">{{ebf.edition.id}}</a> {% if ebf.asking %}(This file has had the campaign 'ask' added.){% endif %}</p>
|
||||
<p>{% if ebf.active %}<span class="yikes">ACTIVE</span> {% endif %}PDF file: <a href="{{ebf.file.url}}">{{ebf.file}}</a> <br />created {{ebf.created}} for edition <a href="#edition_{{ebf.edition_id}}">{{ebf.edition_id}}</a> {% if ebf.asking %}(This file has had the campaign 'ask' added.){% endif %}</p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% ifnotequal campaign_status 'ACTIVE' %}
|
||||
|
@ -294,7 +294,7 @@ Please fix the following before launching your campaign:
|
|||
Once the user has clicked a "Download" button or a "Read it Now" button, you have a chance for an "ask" - that's where a user can decide to also make a thank-you contribution.
|
||||
The "ask" will be displayed to a user who has clicked a "Download" button. It's your chance to ask for their support.
|
||||
The user can decide to make a contribution and go enter a credit card, or can scroll down to download.
|
||||
To see your request in test mode, <a href="{% url 'download' campaign.work.id %}?testmode=1">click here</a>. </p>
|
||||
To see your request in test mode, <a href="{% url 'download' campaign.work_id %}?testmode=1">click here</a>. </p>
|
||||
<p>A strong ask/motivation combination:</p>
|
||||
{% else %}
|
||||
<p>This will be displayed in the Campaign tab for your work. It's your main pitch to supporters/purchasers, and your chance to share your passion for this work, and to inspire readers..</p>
|
||||
|
@ -485,7 +485,7 @@ Please fix the following before launching your campaign:
|
|||
<p>Before you hit launch:</p>
|
||||
<ul class="bullets">
|
||||
<li>Have you proofread your campaign? (Make sure to spellcheck!)</li>
|
||||
<li>Have you <a href="{% url 'work_preview' campaign.work.id %}">previewed your campaign</a>? Does it look how you want it to?</li>
|
||||
<li>Have you <a href="{% url 'work_preview' campaign.work_id %}">previewed your campaign</a>? Does it look how you want it to?</li>
|
||||
</ul>
|
||||
|
||||
<p>If it doesn't look exactly the way you like, or you're having any trouble with your description, we're happy to help; please <a href="{% url 'feedback' %}?page={{request.build_absolute_uri|urlencode:""}}">contact us</a>.</p>
|
||||
|
@ -529,7 +529,7 @@ Please fix the following before launching your campaign:
|
|||
{% endif %}
|
||||
{% ifequal campaign.type 1 %}
|
||||
<h3>Acknowledgements</h3>
|
||||
<p>When you're logged in, the "Ungluers" tab on the <a href="{% url 'work' work.id %}">campaign page</a> will tell you a bit about each ungluer- when they last pledged, for example, and you can send individual messages to each ungluer. Use this tool with care! You can see who your biggest supporters are by looking at the <a href="{% url 'work_acks' campaign.work.id %}">sample acknowledgement page</a>.
|
||||
<p>When you're logged in, the "Ungluers" tab on the <a href="{% url 'work' work.id %}">campaign page</a> will tell you a bit about each ungluer- when they last pledged, for example, and you can send individual messages to each ungluer. Use this tool with care! You can see who your biggest supporters are by looking at the <a href="{% url 'work_acks' campaign.work_id %}">sample acknowledgement page</a>.
|
||||
After your campaign succeeds, you can used this page to generate epub code for the acknowledgements section of your unglued ebook.
|
||||
</p>
|
||||
{% else %}
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
onload = function(){
|
||||
var urlInput = document.getElementById('id_url');
|
||||
var formatInput = document.getElementById('id_format');
|
||||
var fileInput = document.getElementById('id_file');
|
||||
urlInput.oninput = function(){
|
||||
if(urlInput.value.endsWith('.pdf')){
|
||||
formatInput.value = 'pdf'
|
||||
|
@ -24,6 +25,20 @@ onload = function(){
|
|||
formatInput.value = 'html'
|
||||
};
|
||||
};
|
||||
fileInput.onchange = function(){
|
||||
if(fileInput.value.endsWith('.pdf')){
|
||||
formatInput.value = 'pdf'
|
||||
}
|
||||
else if(fileInput.value.endsWith('.epub')){
|
||||
formatInput.value = 'epub'
|
||||
}
|
||||
else if(fileInput.value.endsWith('.mobi')){
|
||||
formatInput.value = 'mobi'
|
||||
}
|
||||
else if(fileInput.value.endsWith('.html')){
|
||||
formatInput.value = 'html'
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
</script>
|
||||
|
@ -31,7 +46,7 @@ onload = function(){
|
|||
|
||||
{% block doccontent %}
|
||||
|
||||
<h2>Add Ebook Links for <a href="{% url 'work' edition.work.id %}">{{ edition.work.title }}</a></h2>
|
||||
<h2>Add Ebook Links for <a href="{% url 'work' edition.work_id %}">{{ edition.work.title }}</a></h2>
|
||||
{% if edition.publisher %}
|
||||
Publisher: <a href="{% url 'bypubname_list' edition.publisher_name.id %}">{{edition.publisher}}</a><br />
|
||||
{% endif %}
|
||||
|
@ -51,10 +66,10 @@ onload = function(){
|
|||
{% if request.user.is_staff %}
|
||||
<h2>More Edition Management</h2>
|
||||
|
||||
<div><a href="{% url 'merge' edition.work.id %}">Merge other works into this one</a></div>
|
||||
<div><a href="{% url 'work_editions' edition.work.id %}">Remove editions from this work</a></div>
|
||||
<div><a href="{% url 'feature' edition.work.id %}">Feature this work today</a></div>
|
||||
<div><a href="{% url 'new_edition' edition.work.id edition.id %}">Edit the edition</a></div>
|
||||
<div><a href="{% url 'merge' edition.work_id %}">Merge other works into this one</a></div>
|
||||
<div><a href="{% url 'work_editions' edition.work_id %}">Remove editions from this work</a></div>
|
||||
<div><a href="{% url 'feature' edition.work_id %}">Feature this work today</a></div>
|
||||
<div><a href="{% url 'new_edition' edition.work_id edition.id %}">Edit the edition</a></div>
|
||||
{% endif %}
|
||||
<br />
|
||||
{% endblock %}
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
<ul class="terms">
|
||||
<li>{{ ebooks.today.count }} have been added today. {% if ebooks.today.count %}They are
|
||||
<ul class="terms">{% for ebook in ebooks.today %}
|
||||
<li><a href="{% url 'work' ebook.edition.work.id %}">{{ebook.edition.work.title}}</a></li>
|
||||
<li><a href="{% url 'work' ebook.edition.work_id %}">{{ebook.edition.work.title}}</a></li>
|
||||
{% endfor %}</ul>{% endif %}
|
||||
</li>
|
||||
<li>{{ ebooks.yesterday.count }} were added yesterday.
|
||||
|
@ -118,7 +118,7 @@
|
|||
<li>{{ ebookfiles.days7.count }} have been added in the past 7 days.{% if request.user.is_staff %}
|
||||
<ul class="terms">{% for ebook_file in ebookfiles.days7 %}
|
||||
<li>{{ebook_file.edition.work.title}}: <a href="{{ebook_file.file.url}}">{{ebook_file.file}}</a> created {{ebook_file.created}} by {{ebook_file.ebook.user}}<br/>
|
||||
({% if not ebook_file.ebook.active %}in{% endif %}active) <a href="{% url 'new_edition' ebook_file.edition.work.id ebook_file.edition.id %}">edit</a>
|
||||
({% if not ebook_file.ebook.active %}in{% endif %}active) <a href="{% url 'new_edition' ebook_file.edition.work_id ebook_file.edition_id %}">edit</a>
|
||||
</li>
|
||||
{% endfor %}</ul>{% endif %}
|
||||
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
|
||||
|
||||
<p>To add a work and edition to Unglue.it, we need to start with an identifier. We'll see if we can find some metadata based on the identifier you give us. If you give us an ISBN, we'll often be able to find some. If there's no ISBN, give us a URL (a web address) and we'll check the page for bibliographic info. </p>
|
||||
{% if not request.user.rights_holder.all.count %}
|
||||
<p>If someone else has already added the work to unglue.it, you may not be able to edit its metadata.</p>
|
||||
{% endif %}
|
||||
<form id="editform" enctype="multipart/form-data" method="POST" action="#">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
You have borrowed {{ acq.work.title }} from {{ acq.lib_acq.user.username }}. During the borrowing period, you can download the ebook at the book's download page:
|
||||
https://{{ current_site.domain }}{% url 'download' acq.work.id %}
|
||||
https://{{ current_site.domain }}{% url 'download' acq.work_id %}
|
||||
|
||||
This ebook is made available to you by {{ acq.lib_acq.user.username }} for your personal use only, and a personal license has been embedded in the ebook file. You may download as many times as you need to until {{ acq.expires }}. If you want to use the ebook after that, please consider buying a copy for yourself. Doing so will bring closer the day when this ebook is free for everyone to read.
|
||||
|
||||
For more information about the book, visit the book's unglue.it page at
|
||||
https://{{ current_site.domain }}{% url 'work' acq.work.id %}
|
||||
https://{{ current_site.domain }}{% url 'work' acq.work_id %}
|
||||
|
||||
Thank you again for your support.
|
||||
|
||||
|
|
|
@ -2,18 +2,18 @@
|
|||
|
||||
|
||||
{% block comments_book %}
|
||||
<a href="{% url 'work' acq.work.id %}"><img src="{{ acq.work.cover_image_small }}" alt="cover image for {{ acq.work.title }}" /></a>
|
||||
<a href="{% url 'work' acq.work_id %}"><img src="{{ acq.work.cover_image_small }}" alt="cover image for {{ acq.work.title }}" /></a>
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_graphical %}
|
||||
You have borrowed {{ acq.work.title }} from {{ acq.lib_acq.user.username }}. During the borrowing period, you can download the ebook at <a href="{% url 'download' acq.work.id %}">the book's download page.</a>
|
||||
You have borrowed {{ acq.work.title }} from {{ acq.lib_acq.user.username }}. During the borrowing period, you can download the ebook at <a href="{% url 'download' acq.work_id %}">the book's download page.</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_textual %}
|
||||
|
||||
<p>This ebook is made available to you by {{ acq.lib_acq.user.username }} for your personal use only, and a personal license has been embedded in the ebook file. You may download as many times as you need to until {{ acq.expires }}. If you want to use the ebook after that, please consider buying a copy for yourself. Doing so will bring closer the day when this ebook is free for everyone to read.</p>
|
||||
|
||||
<p>For more information about the book, visit the <a href="{% url 'work' acq.work.id %}">book's unglue.it page</a>.
|
||||
<p>For more information about the book, visit the <a href="{% url 'work' acq.work_id %}">book's unglue.it page</a>.
|
||||
</p>
|
||||
<p>{{ acq.lib_acq.user.username }} and the Unglue.it team
|
||||
</p>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{{ acq.work.title }} is reserved for you from {{ acq.lib_acq.user.username }} until {{ acq.expires }}. You can borrow the ebook by downloading it from the book's download page:
|
||||
https://{{ current_site.domain }}{% url 'download' acq.work.id %}
|
||||
https://{{ current_site.domain }}{% url 'download' acq.work_id %}
|
||||
|
||||
If you don't download the book before {{ acq.expires }}, other members of {{ acq.lib_acq.user.username }} will be able to use it instead.
|
||||
|
||||
This ebook is made available to you by {{ acq.lib_acq.user.username }} for your personal use only, and a personal license will be embedded in the ebook file. If you do not download the ebook before then, the ebook may be borrowed by another {{ acq.lib_acq.user.username }} member.
|
||||
|
||||
For more information about the book, visit the book's unglue.it page at
|
||||
https://{{ current_site.domain }}{% url 'work' acq.work.id %}
|
||||
https://{{ current_site.domain }}{% url 'work' acq.work_id %}
|
||||
|
||||
{{ acq.lib_acq.user.username }} and the Unglue.it team
|
|
@ -2,18 +2,18 @@
|
|||
|
||||
|
||||
{% block comments_book %}
|
||||
<a href="{% url 'work' acq.work.id %}"><img src="{{ acq.work.cover_image_small }}" alt="cover image for {{ acq.work.title }}" /></a>
|
||||
<a href="{% url 'work' acq.work_id %}"><img src="{{ acq.work.cover_image_small }}" alt="cover image for {{ acq.work.title }}" /></a>
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_graphical %}
|
||||
{{ acq.work.title }} is reserved for you from {{ acq.lib_acq.user.username }} until {{ acq.expires }}. Until then, you can borrow the ebook at <a href="{% url 'download' acq.work.id %}">the book's download page.</a>
|
||||
{{ acq.work.title }} is reserved for you from {{ acq.lib_acq.user.username }} until {{ acq.expires }}. Until then, you can borrow the ebook at <a href="{% url 'download' acq.work_id %}">the book's download page.</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_textual %}
|
||||
|
||||
<p>This ebook is made available to you by {{ acq.lib_acq.user.username }} for your personal use only, and a personal license will be embedded in the ebook file. If you do not download the ebook before then, the ebook may be borrowed by another {{ acq.lib_acq.user.username }} member.</p>
|
||||
|
||||
<p>For more information about the book, visit the <a href="{% url 'work' acq.work.id %}">book's unglue.it page</a>.
|
||||
<p>For more information about the book, visit the <a href="{% url 'work' acq.work_id %}">book's unglue.it page</a>.
|
||||
</p>
|
||||
<p>{{ acq.lib_acq.user.username }} and the Unglue.it team
|
||||
</p>
|
||||
|
|
|
@ -8,7 +8,7 @@ Pledge summary
|
|||
We will notify you when the unglued ebook is available for you to read. If you've requested special premiums, the campaign manager, {{ transaction.campaign.rightsholder }}, will be in touch with you via email to request any information needed to deliver your premium.
|
||||
|
||||
If you'd like to visit the campaign page, click here:
|
||||
https://{{ current_site.domain }}{% url 'work' transaction.campaign.work.id %}
|
||||
https://{{ current_site.domain }}{% url 'work' transaction.campaign.work_id %}
|
||||
|
||||
Thank you again for your support.
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
{% load humanize %}
|
||||
|
||||
{% block comments_book %}
|
||||
<a href="{% url 'work' transaction.campaign.work.id %}"><img src="{{ transaction.campaign.work.cover_image_small }}" alt="cover image for {{ transaction.campaign.work.title }}" /></a>
|
||||
<a href="{% url 'work' transaction.campaign.work_id %}"><img src="{{ transaction.campaign.work.cover_image_small }}" alt="cover image for {{ transaction.campaign.work.title }}" /></a>
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_graphical %}
|
||||
Hooray! The campaign for <a href="{% url 'work' transaction.campaign.work.id %}">{{ transaction.campaign.work.title }}</a> has succeeded. Your credit card has been charged ${{ transaction.amount|floatformat:2|intcomma }}. Thank you again for your help.
|
||||
Hooray! The campaign for <a href="{% url 'work' transaction.campaign.work_id %}">{{ transaction.campaign.work.title }}</a> has succeeded. Your credit card has been charged ${{ transaction.amount|floatformat:2|intcomma }}. Thank you again for your help.
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_textual %}
|
||||
|
@ -21,7 +21,7 @@
|
|||
</p>
|
||||
<p>We will notify you when the unglued ebook is available for you to read. If you've requested special premiums, the campaign manager, {{ transaction.campaign.rightsholder }}, will be in touch with you via email to request any information needed to deliver your premium.
|
||||
</p>
|
||||
<p>For more information, visit the <a href="{% url 'work' transaction.campaign.work.id %}">campaign page</a>.
|
||||
<p>For more information, visit the <a href="{% url 'work' transaction.campaign.work_id %}">campaign page</a>.
|
||||
|
||||
</p>
|
||||
<p>Thank you again for your support.
|
||||
|
|
|
@ -11,7 +11,7 @@ Transaction summary {% endifequal %}
|
|||
{% include "notification/pledge_summary.txt" %}
|
||||
|
||||
If you'd like to visit the campaign page, click here:
|
||||
https://{{ current_site.domain }}{% url 'work' transaction.campaign.work.id %}
|
||||
https://{{ current_site.domain }}{% url 'work' transaction.campaign.work_id %}
|
||||
|
||||
Thank you again for your support.
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
{% load humanize %}
|
||||
|
||||
{% block comments_book %}
|
||||
<a href="{% url 'work' transaction.campaign.work.id %}"><img src="{{ transaction.campaign.work.cover_image_small }}" alt="cover image for {{ transaction.campaign.work.title }}" /></a>
|
||||
<a href="{% url 'work' transaction.campaign.work_id %}"><img src="{{ transaction.campaign.work.cover_image_small }}" alt="cover image for {{ transaction.campaign.work.title }}" /></a>
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_graphical %}
|
||||
{% ifequal transaction.campaign.type 1 %}The campaign for <a href="{% url 'work' transaction.campaign.work.id %}">{{ transaction.campaign.work.title }}</a> has succeeded. However, our attempt to charge your pledge for ${{ transaction.amount|floatformat:2|intcomma }} to your credit card failed ({{transaction.error}}). Will you help us fix that?{% else %}Our attempt to charge a purchase of ${{ transaction.amount|floatformat:2|intcomma }} to your credit card failed ({{transaction.error}}).{% endifequal %}
|
||||
{% ifequal transaction.campaign.type 1 %}The campaign for <a href="{% url 'work' transaction.campaign.work_id %}">{{ transaction.campaign.work.title }}</a> has succeeded. However, our attempt to charge your pledge for ${{ transaction.amount|floatformat:2|intcomma }} to your credit card failed ({{transaction.error}}). Will you help us fix that?{% else %}Our attempt to charge a purchase of ${{ transaction.amount|floatformat:2|intcomma }} to your credit card failed ({{transaction.error}}).{% endifequal %}
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_textual %}
|
||||
|
@ -33,7 +33,7 @@
|
|||
Amount of purchase: {{ transaction.amount|floatformat:2|intcomma }}<br />
|
||||
</p>
|
||||
{% endifequal %}
|
||||
<p>For more information, visit the <a href="{% url 'work' transaction.campaign.work.id %}">campaign page</a>.
|
||||
<p>For more information, visit the <a href="{% url 'work' transaction.campaign.work_id %}">campaign page</a>.
|
||||
|
||||
</p>
|
||||
<p>Thank you again for your support.
|
||||
|
|
|
@ -11,7 +11,7 @@ Your new pledge summary
|
|||
{% endif %}
|
||||
|
||||
If you'd like to visit the campaign page or make changes, click here:
|
||||
https://{{current_site.domain}}{% url 'work' transaction.campaign.work.id %}
|
||||
https://{{current_site.domain}}{% url 'work' transaction.campaign.work_id %}
|
||||
|
||||
Thank you again for your support.
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{% load humanize %}
|
||||
|
||||
{% block comments_book %}
|
||||
<a href="{% url 'work' transaction.campaign.work.id %}"><img src="{{ transaction.campaign.work.cover_image_small }}" alt="cover image for {{ transaction.campaign.work.title }}" /></a>
|
||||
<a href="{% url 'work' transaction.campaign.work_id %}"><img src="{{ transaction.campaign.work.cover_image_small }}" alt="cover image for {{ transaction.campaign.work.title }}" /></a>
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_graphical %}
|
||||
|
|
|
@ -10,7 +10,7 @@ You will also be acknowledged as follows:
|
|||
- You will be listed in the ebook as a Bibliophile using the name "{{ transaction.extra.ack_name }}" with a link to your Unglue.it supporter page.{% endifequal %}{% endif %}{% ifequal transaction.tier 3 %}{% if transaction.extra.ack_dedication %}
|
||||
- The following dedication will be included in the ebook:
|
||||
{{ transaction.extra.ack_dedication }}{% else %}
|
||||
- You were eligible to include a dedication in the unglued ebook, but did not choose to do so. If you like, you can change this at https://{{ current_site.domain }}{% url 'pledge_modify' work_id=transaction.campaign.work.id %}.
|
||||
- You were eligible to include a dedication in the unglued ebook, but did not choose to do so. If you like, you can change this at https://{{ current_site.domain }}{% url 'pledge_modify' work_id=transaction.campaign.work_id %}.
|
||||
{% endif %}{% endifequal %}{% else %}
|
||||
Amount charged: ${{ transaction.amount|floatformat:2|intcomma }}
|
||||
|
||||
|
|
|
@ -6,16 +6,16 @@ Pledge summary
|
|||
|
||||
You can help even more by sharing this campaign with your friends.
|
||||
|
||||
Facebook: https://www.facebook.com/sharer.php?u=https://{{ current_site.domain }}{% url 'work' transaction.campaign.work.id %}
|
||||
Facebook: https://www.facebook.com/sharer.php?u=https://{{ current_site.domain }}{% url 'work' transaction.campaign.work_id %}
|
||||
|
||||
Twitter: https://twitter.com/intent/tweet?url=https://{{ current_site.domain }}{% url 'work' transaction.campaign.work.id %}&text=I%27m%20ungluing%20{{ title|urlencode }}%20at%20%40unglueit.%20Join%20me%21"
|
||||
Twitter: https://twitter.com/intent/tweet?url=https://{{ current_site.domain }}{% url 'work' transaction.campaign.work_id %}&text=I%27m%20ungluing%20{{ title|urlencode }}%20at%20%40unglueit.%20Join%20me%21"
|
||||
|
||||
You can also embed a widget for {{ transaction.campaign.work.title }} in your web site by copy/pasting the following:
|
||||
<iframe src="https://{{ current_site.domain }}/api/widget/{{ transaction.campaign.work.first_isbn_13 }}/" width="152" height="325" frameborder="0"></iframe>
|
||||
|
||||
Or the best idea: talk about it with those you love. We'll need lots of help from lots of people to make this a success.
|
||||
|
||||
If you want to change your pledge, just use the button at https://{{ current_site.domain }}{% url 'work' transaction.campaign.work.id %}
|
||||
If you want to change your pledge, just use the button at https://{{ current_site.domain }}{% url 'work' transaction.campaign.work_id %}
|
||||
|
||||
If you have any problems with your pledge, don't hesitate to contact us at support@gluejar.com
|
||||
|
||||
|
|
|
@ -3,19 +3,19 @@
|
|||
{% load humanize %}
|
||||
|
||||
{% block comments_book %}
|
||||
<a href="{% url 'work' transaction.campaign.work.id %}?tab=2"><img src="{{ transaction.campaign.work.cover_image_thumbnail }}" alt="cover image for {{ transaction.campaign.work.title }}" /></a>
|
||||
<a href="{% url 'work' transaction.campaign.work_id %}?tab=2"><img src="{{ transaction.campaign.work.cover_image_thumbnail }}" alt="cover image for {{ transaction.campaign.work.title }}" /></a>
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_graphical %}
|
||||
You've just pledged ${{ transaction.amount|floatformat:2|intcomma }} to <a href="{% url 'work' transaction.campaign.work.id %}">{{ transaction.campaign.work.title }}</a>.
|
||||
You've just pledged ${{ transaction.amount|floatformat:2|intcomma }} to <a href="{% url 'work' transaction.campaign.work_id %}">{{ transaction.campaign.work.title }}</a>.
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_textual %}
|
||||
<p>Thank you, {{ transaction.user.username }}!</p>
|
||||
<p>You've just pledged ${{ transaction.amount|floatformat:2|intcomma }} to <a href="{% url 'work' transaction.campaign.work.id %}">{{ transaction.campaign.work.title }}</a>. If it reaches its goal of ${{ transaction.campaign.target|intcomma }} by {{ transaction.campaign.deadline|date:"M d Y"}}, it will be unglued for all to enjoy.</p>
|
||||
<p>You've just pledged ${{ transaction.amount|floatformat:2|intcomma }} to <a href="{% url 'work' transaction.campaign.work_id %}">{{ transaction.campaign.work.title }}</a>. If it reaches its goal of ${{ transaction.campaign.target|intcomma }} by {{ transaction.campaign.deadline|date:"M d Y"}}, it will be unglued for all to enjoy.</p>
|
||||
<p>You can help even more by sharing this campaign with your friends!</p>
|
||||
|
||||
{% url 'work' transaction.campaign.work.id as work_url %}
|
||||
{% url 'work' transaction.campaign.work_id as work_url %}
|
||||
{% include "notification/sharing_block.html" %}
|
||||
|
||||
<p>Thanks for being part of Unglue.it.</p>
|
||||
|
|
|
@ -10,19 +10,19 @@ https://{{ current_site.domain }}{% url 'receive_gift' gift.acq.nonce %}
|
|||
You can send the url yourself if there's been any problem with the email.
|
||||
|
||||
{% else %}If you have not already done so, download your ebook at
|
||||
https://{{ current_site.domain }}{% url 'download' transaction.campaign.work.id %}
|
||||
https://{{ current_site.domain }}{% url 'download' transaction.campaign.work_id %}
|
||||
|
||||
{% endif %}{% endifequal %}{% ifequal transaction.campaign.type 2 %}Thanks to you and other ungluers, {{ transaction.campaign.work.title }} will be eventually be released to the world in an unglued ebook edition. Thanks to your purchase, the ungluing date advanced {{ transaction.offer.days_per_copy|floatformat }}{% ifnotequal transaction.extra.copies 1 %} x {{ transaction.extra.copies }}{% endifnotequal %} days to {{ transaction.campaign.cc_date }}.
|
||||
{% ifequal transaction.offer.license 1 %}{% if not gift %}
|
||||
This ebook is licensed to you personally, and your personal license has been embedded in the ebook file. You may download as many times as you need to, but you can't make copies for the use of others until the ungluing date. You can make that date come sooner by encouraging your friends to buy a copy.
|
||||
{% endif %}{% else %}
|
||||
This ebook {% ifnotequal transaction.extra.copies 1 %}({{ transaction.extra.copies }} copies){% endifnotequal %} is licensed to your library and its license has been embedded in the ebook file. If you'd like to be the first to use it, please get your copy now at
|
||||
https://{{ current_site.domain }}{% url 'borrow' transaction.campaign.work.id %}
|
||||
https://{{ current_site.domain }}{% url 'borrow' transaction.campaign.work_id %}
|
||||
After an hour, the ebook will be available to all of your library's users on a one-user-per two weeks basis until the ungluing date, when it will be free to all. You can make that date come sooner by encouraging your friends to buy a copy.{% endifequal %}{% endifequal %}{% ifequal transaction.campaign.type 3 %}The creators of {{ transaction.campaign.work.title }} would like to thank you for showing your appreciation for making it free.{% endifequal %}
|
||||
|
||||
|
||||
For more information about the book, visit the book's unglue.it page at
|
||||
https://{{ current_site.domain }}{% url 'work' transaction.campaign.work.id %}
|
||||
https://{{ current_site.domain }}{% url 'work' transaction.campaign.work_id %}
|
||||
|
||||
Thank you again for your support.
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{% load humanize %}
|
||||
|
||||
{% block comments_book %}
|
||||
<a href="{% url 'work' transaction.campaign.work.id %}"><img src="{{ transaction.campaign.work.cover_image_small }}" alt="cover image for {{ transaction.campaign.work.title }}" /></a>
|
||||
<a href="{% url 'work' transaction.campaign.work_id %}"><img src="{{ transaction.campaign.work.cover_image_small }}" alt="cover image for {{ transaction.campaign.work.title }}" /></a>
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_graphical %}
|
||||
|
@ -31,7 +31,7 @@ https://{{ current_site.domain }}{% url 'receive_gift' gift.acq.nonce %}
|
|||
You can send the url yourself if there's been any problem with the email.
|
||||
|
||||
{% else %}
|
||||
If you have not already done so, download your ebook at <a href="{% url 'download' transaction.campaign.work.id %}">the book's download page.</a>
|
||||
If you have not already done so, download your ebook at <a href="{% url 'download' transaction.campaign.work_id %}">the book's download page.</a>
|
||||
{% endif %}{% endifequal %}
|
||||
|
||||
{% endblock %}
|
||||
|
@ -43,14 +43,14 @@ If you have not already done so, download your ebook at <a href="{% url 'downloa
|
|||
{% ifequal transaction.offer.license 1 %}{% if not gift %}
|
||||
<p>This ebook is licensed to you personally, and your personal license has been embedded in the ebook file. You may download as many times as you need to, but you can't make copies for the use of others until the ungluing date. You can make that date come sooner by encouraging your friends to buy a copy.</p>
|
||||
{% endif %}{% else %}
|
||||
<p>This ebook {% ifnotequal transaction.extra.copies 1 %}({{ transaction.extra.copies }} copies){% endifnotequal %} is licensed to your library and its license has been embedded in the ebook file. If you'd like to be the first to use it, please <a href="{% url 'borrow' transaction.campaign.work.id %}">get your copy now</a>. After an hour, the ebook will be available to all of your library's users on a one-user-per two weeks basis until the ungluing date, when it will be free to all. You can make that date come sooner by encouraging your friends to buy a copy.</p>
|
||||
<p>This ebook {% ifnotequal transaction.extra.copies 1 %}({{ transaction.extra.copies }} copies){% endifnotequal %} is licensed to your library and its license has been embedded in the ebook file. If you'd like to be the first to use it, please <a href="{% url 'borrow' transaction.campaign.work_id %}">get your copy now</a>. After an hour, the ebook will be available to all of your library's users on a one-user-per two weeks basis until the ungluing date, when it will be free to all. You can make that date come sooner by encouraging your friends to buy a copy.</p>
|
||||
{% endifequal %}
|
||||
{% endifequal %}
|
||||
{% ifequal transaction.campaign.type 3 %}
|
||||
<p>The creators of <i>{{ transaction.campaign.work.title }}</i> would like to thank you for showing your appreciation for making it free.
|
||||
</p>
|
||||
{% endifequal %}
|
||||
<p>For more information about the book, visit the <a href="{% url 'work' transaction.campaign.work.id %}">book's unglue.it page</a>.
|
||||
<p>For more information about the book, visit the <a href="{% url 'work' transaction.campaign.work_id %}">book's unglue.it page</a>.
|
||||
</p>
|
||||
<p>Thank you again for your support.
|
||||
</p>
|
||||
|
|
|
@ -16,7 +16,7 @@ Unglue.it is a website whose purpose is to help ebooks become free. Thanks to "{
|
|||
|
||||
|
||||
For more information about the book, visit the book's unglue.it page at
|
||||
https://{{ current_site.domain }}{% url 'work' gift.acq.work.id %}
|
||||
https://{{ current_site.domain }}{% url 'work' gift.acq.work_id %}
|
||||
|
||||
We hope enjoy your new ebook, and we hope you like Unglue.it!
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{% load humanize %}
|
||||
|
||||
{% block comments_book %}
|
||||
<a href="{% url 'work' gift.acq.work.id %}"><img src="{{ gift.acq.work.cover_image_small }}" alt="cover image for {{ gift.acq.work.title }}" /></a>
|
||||
<a href="{% url 'work' gift.acq.work_id %}"><img src="{{ gift.acq.work.cover_image_small }}" alt="cover image for {{ gift.acq.work.title }}" /></a>
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_graphical %}
|
||||
|
@ -22,10 +22,10 @@ To pick up <i>{{ gift.acq.work.title }}</i>, the ebook that <a href="{% url 'sup
|
|||
The ebook will be licensed to you personally, and your license has been embedded in the ebook file. You may download as many times as you need to, but you can't make copies for the use of others until the ungluing date. You can make that date come sooner by encouraging your friends to buy a copy.
|
||||
</p>
|
||||
<p>
|
||||
Thanks to <a href="{% url 'supporter' gift.giver %}">{{ gift.giver }}</a> and other ungluers, <a href="{% url 'work' gift.acq.work.id %}">{{ gift.acq.work.title }}</a> will be eventually be released to the world in an unglued ebook edition.
|
||||
Thanks to <a href="{% url 'supporter' gift.giver %}">{{ gift.giver }}</a> and other ungluers, <a href="{% url 'work' gift.acq.work_id %}">{{ gift.acq.work.title }}</a> will be eventually be released to the world in an unglued ebook edition.
|
||||
</p>
|
||||
<p>
|
||||
For more information about the book, visit the book's <a href="{% url 'work' gift.acq.work.id %}">unglue.it page</a>
|
||||
For more information about the book, visit the book's <a href="{% url 'work' gift.acq.work_id %}">unglue.it page</a>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
|
|
|
@ -16,7 +16,7 @@ The ebook will be licensed to you personally, and the license will be embedded i
|
|||
Unglue.it is a website whose purpose is to help ebooks become free. Thanks to "{{ gift.giver }}" and other "ungluers", "{{ gift.acq.work.title }}" will be eventually be released in an "unglued" ebook edition, i.e. free to everyone. Purchases of "{{ gift.acq.work.title }}" are helping to make that free edition financially possible.
|
||||
|
||||
For more information about the book, visit the book's unglue.it page at
|
||||
https://{{ current_site.domain }}{% url 'work' gift.acq.work.id %}
|
||||
https://{{ current_site.domain }}{% url 'work' gift.acq.work_id %}
|
||||
|
||||
We hope enjoy your new ebook, and we hope you like Unglue.it!
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{% load humanize %}
|
||||
|
||||
{% block comments_book %}
|
||||
<a href="{% url 'work' gift.acq.work.id %}"><img src="{{ gift.acq.work.cover_image_small }}" alt="cover image for {{ gift.acq.work.title }}" /></a>
|
||||
<a href="{% url 'work' gift.acq.work_id %}"><img src="{{ gift.acq.work.cover_image_small }}" alt="cover image for {{ gift.acq.work.title }}" /></a>
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_graphical %}
|
||||
|
@ -22,10 +22,10 @@ To pick up <i>{{ gift.acq.work.title }}</i>, the ebook that <a href="{% url 'sup
|
|||
The ebook will be licensed to you personally, and your license has been embedded in the ebook file. You may download as many times as you need to, but you can't make copies for the use of others until the ungluing date. You can make that date come sooner by encouraging your friends to buy a copy.
|
||||
</p>
|
||||
<p>
|
||||
Thanks to <a href="{% url 'supporter' gift.giver %}">{{ gift.giver }}</a> and other ungluers, <a href="{% url 'work' gift.acq.work.id %}">{{ gift.acq.work.title }}</a> will be eventually be released to the world in an unglued ebook edition.
|
||||
Thanks to <a href="{% url 'supporter' gift.giver %}">{{ gift.giver }}</a> and other ungluers, <a href="{% url 'work' gift.acq.work_id %}">{{ gift.acq.work.title }}</a> will be eventually be released to the world in an unglued ebook edition.
|
||||
</p>
|
||||
<p>
|
||||
For more information about the book, visit the book's <a href="{% url 'work' gift.acq.work.id %}">unglue.it page</a>
|
||||
For more information about the book, visit the book's <a href="{% url 'work' gift.acq.work_id %}">unglue.it page</a>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{% load humanize %}
|
||||
|
||||
{% block comments_book %}
|
||||
<a href="{% url 'work' gift.acq.work.id %}"><img src="{{ gift.acq.work.cover_image_small }}" alt="cover image for {{ gift.acq.work.title }}" /></a>
|
||||
<a href="{% url 'work' gift.acq.work_id %}"><img src="{{ gift.acq.work.cover_image_small }}" alt="cover image for {{ gift.acq.work.title }}" /></a>
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_graphical %}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{% load humanize %}
|
||||
|
||||
{% block comments_book %}
|
||||
<a href="{% url 'work' gift.acq.work.id %}"><img src="{{ gift.acq.work.cover_image_small }}" alt="cover image for {{ gift.acq.work.title }}" /></a>
|
||||
<a href="{% url 'work' gift.acq.work_id %}"><img src="{{ gift.acq.work.cover_image_small }}" alt="cover image for {{ gift.acq.work.title }}" /></a>
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_graphical %}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
You are now free to start a campaign to sell or unglue your work. If you're logged in, you will see the option to open a campaign at https://{{ current_site.domain }}/rightsholders . (You can also find this page by clicking on "Rights Holder Tools" at the bottom of any Unglue.it page.)
|
||||
|
||||
To run a campaign, you'll need to set up campaign parameters. You'll also need to write a pitch. For Pledge-to-Unglue and Buy-to-Unglue campaigns, this will appear in the Description tab on your book's page (https://{{ current_site.domain }}{% url 'work' claim.work.id %}). Think about who your book's audience is, and remind them why they'll love this book -- your pitch is not a catalog page! We encourage video, audio, and links to make your pitch come alive. For Thanks-for-Ungluing, your pitch will occur when the user clicks a Download button. You should emphasize how the ungluer's support enables you to keep doing what you do. Feel free to email us (rights@gluejar.com) if you need any help with this.
|
||||
To run a campaign, you'll need to set up campaign parameters. You'll also need to write a pitch. For Pledge-to-Unglue and Buy-to-Unglue campaigns, this will appear in the Description tab on your book's page (https://{{ current_site.domain }}{% url 'work' claim.work_id %}). Think about who your book's audience is, and remind them why they'll love this book -- your pitch is not a catalog page! We encourage video, audio, and links to make your pitch come alive. For Thanks-for-Ungluing, your pitch will occur when the user clicks a Download button. You should emphasize how the ungluer's support enables you to keep doing what you do. Feel free to email us (rights@gluejar.com) if you need any help with this.
|
||||
|
||||
If you're running a Buy-to-Unglue or Thanks-for-Ungluing Campaign, now is the time to upload your digital files. For Buy-to-Unglue, you need to decide on revenue targets and pricing for individual and library licenses.
|
||||
|
||||
|
@ -14,10 +14,10 @@ Finally, think about how you're going to publicize your campaign: social media,
|
|||
We're thrilled to be working with you.
|
||||
{% endifequal %}
|
||||
{% ifequal claim.status 'pending' %}
|
||||
{{ claim.rights_holder }}'s claim to {{ claim.work.title }} (https://{{ current_site.domain }}{% url 'work' claim.work.id %}) on Unglue.it has been entered. Our team will examine the claim and get back to you soon.
|
||||
{{ claim.rights_holder }}'s claim to {{ claim.work.title }} (https://{{ current_site.domain }}{% url 'work' claim.work_id %}) on Unglue.it has been entered. Our team will examine the claim and get back to you soon.
|
||||
{% endifequal %}
|
||||
{% ifequal claim.status 'release' %}
|
||||
{{ claim.rights_holder }}'s claim to {{ claim.work.title }} (https://{{ current_site.domain }}{% url 'work' claim.work.id %}) on Unglue.it has been released. email us (rights@gluejar.com) if you have any questions about this.
|
||||
{{ claim.rights_holder }}'s claim to {{ claim.work.title }} (https://{{ current_site.domain }}{% url 'work' claim.work_id %}) on Unglue.it has been released. email us (rights@gluejar.com) if you have any questions about this.
|
||||
{% endifequal %}
|
||||
|
||||
The Unglue.it team
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
|
||||
{% block comments_book %}
|
||||
<a href="{% url 'work' claim.work.id %}"><img src="{{ claim.work.cover_image_small }}" alt="cover image for {{ claim.work.title }}" /></a>
|
||||
<a href="{% url 'work' claim.work_id %}"><img src="{{ claim.work.cover_image_small }}" alt="cover image for {{ claim.work.title }}" /></a>
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_graphical %}
|
||||
|
@ -17,7 +17,7 @@
|
|||
<br /><br />
|
||||
You are now free to start a campaign to sell or unglue your work. If you're logged in, you can <a href="{% url 'rightsholders' %}">open a campaign</a>. (You can also find this page by clicking on "Rights Holder Tools" at the bottom of any Unglue.it page.)
|
||||
<br /><br />
|
||||
To run a campaign, you'll need to set up campaign parameters. You'll also need to write a pitch. For Pledge-to-Unglue and Buy-to-Unglue campaigns, this will appear in the Description tab on your book's <a href="{% url 'work' claim.work.id %}">work page</a>. Think about who your book's audience is, and remind them why they'll love this book -- your pitch is not a catalog page! We encourage video, audio, and links to make your pitch come alive. For Thanks-for-Ungluing, your pitch will occur when the user clicks a Download button. You should emphasize how the ungluer's support enables you to keep doing what you do. Feel free to email us (rights@gluejar.com) if you need any help with this.
|
||||
To run a campaign, you'll need to set up campaign parameters. You'll also need to write a pitch. For Pledge-to-Unglue and Buy-to-Unglue campaigns, this will appear in the Description tab on your book's <a href="{% url 'work' claim.work_id %}">work page</a>. Think about who your book's audience is, and remind them why they'll love this book -- your pitch is not a catalog page! We encourage video, audio, and links to make your pitch come alive. For Thanks-for-Ungluing, your pitch will occur when the user clicks a Download button. You should emphasize how the ungluer's support enables you to keep doing what you do. Feel free to email us (rights@gluejar.com) if you need any help with this.
|
||||
<br /><br />
|
||||
If you're running a Buy-to-Unglue or Thanks-for-Ungluing Campaign, now is the time to upload your digital files. For Buy-to-Unglue, you need to decide on revenue targets and pricing for individual and library licenses.
|
||||
<br /><br />
|
||||
|
@ -28,9 +28,9 @@ Finally, think about how you're going to publicize your campaign: social media,
|
|||
We're thrilled to be working with you.
|
||||
{% endifequal %}
|
||||
{% ifequal claim.status 'pending' %}
|
||||
The claim for <a href="{% url 'work' claim.work.id %}">{{ claim.work.title }}</a> will be examined, and we'll email you. <a href="{% url 'feedback' %}?page={{request.build_absolute_uri|urlencode:""}}">Contact us</a> if you need any help.
|
||||
The claim for <a href="{% url 'work' claim.work_id %}">{{ claim.work.title }}</a> will be examined, and we'll email you. <a href="{% url 'feedback' %}?page={{request.build_absolute_uri|urlencode:""}}">Contact us</a> if you need any help.
|
||||
{% endifequal %}
|
||||
{% ifequal claim.status 'release' %}
|
||||
The claim for <a href="{% url 'work' claim.work.id %}">{{ claim.work.title }}</a> has been released. Contact us at rights@gluejar.com if you have questions.
|
||||
The claim for <a href="{% url 'work' claim.work_id %}">{{ claim.work.title }}</a> has been released. Contact us at rights@gluejar.com if you have questions.
|
||||
{% endifequal %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -2,22 +2,22 @@
|
|||
|
||||
You can help!
|
||||
|
||||
Pledge toward ungluing. https://{{ current_site.domain }}{% url 'pledge' work_id=campaign.work.id %}
|
||||
Pledge toward ungluing. https://{{ current_site.domain }}{% url 'pledge' work_id=campaign.work_id %}
|
||||
{% endifequal %}{% ifequal campaign.type 2 %}Great, you wished for it, and now there is a campaign for {{ campaign.work.title }} to be unglued. Someday, the book will be released under a Creative Commons license for everyone to enjoy. Every copy purchased until then brings that day {{ campaign.day_per_copy|floatformat }} days sooner.
|
||||
|
||||
You can help!
|
||||
|
||||
Buy a copy to help unglue the book. https://{{ current_site.domain }}{% url 'purchase' work_id=campaign.work.id %}
|
||||
Buy a copy to help unglue the book. https://{{ current_site.domain }}{% url 'purchase' work_id=campaign.work_id %}
|
||||
|
||||
{% endifequal %}{% ifequal campaign.type 3 %}There is a new "Thanks for Ungluing" campaign for {{ campaign.work.title }} one of your Creative Commons license favorites.
|
||||
|
||||
Join us in thanking the creators! Download a copy and leave a contribution. https://{{ current_site.domain }}{% url 'download' work_id=campaign.work.id %}
|
||||
Join us in thanking the creators! Download a copy and leave a contribution. https://{{ current_site.domain }}{% url 'download' work_id=campaign.work_id %}
|
||||
|
||||
{% endifequal %}
|
||||
|
||||
Tell your friends -- there are handy share options on the campaign page. There's even a widget you can put on your blog or home page. https://{{ current_site.domain }}{% url 'work' campaign.work.id %}
|
||||
Tell your friends -- there are handy share options on the campaign page. There's even a widget you can put on your blog or home page. https://{{ current_site.domain }}{% url 'work' campaign.work_id %}
|
||||
|
||||
Join the discussion: share why you love {{ campaign.work.title }} and the world will too. https://{{ current_site.domain }}{% url 'work' campaign.work.id %}?tab=2
|
||||
Join the discussion: share why you love {{ campaign.work.title }} and the world will too. https://{{ current_site.domain }}{% url 'work' campaign.work_id %}?tab=2
|
||||
|
||||
Thank you!
|
||||
|
||||
|
|
|
@ -3,24 +3,24 @@
|
|||
{% load humanize %}
|
||||
|
||||
{% block comments_book %}
|
||||
<a href="{% url 'work' campaign.work.id %}"><img src="{{ campaign.work.cover_image_small }}" alt="cover image for {{ campaign.work.title }}" /></a>
|
||||
<a href="{% url 'work' campaign.work_id %}"><img src="{{ campaign.work.cover_image_small }}" alt="cover image for {{ campaign.work.title }}" /></a>
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_graphical %}
|
||||
<span>The rights holder, {{ campaign.rightsholder }}, has launched a campaign for <a href="{% url 'work' campaign.work.id %}">{{ campaign.work.title }}</a>!</span>
|
||||
<span>The rights holder, {{ campaign.rightsholder }}, has launched a campaign for <a href="{% url 'work' campaign.work_id %}">{{ campaign.work.title }}</a>!</span>
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_textual %}
|
||||
{% ifequal campaign.type 1 %}
|
||||
<div>Congratulations! You wished for a campaign, and here it is. If ungluers like you pledge {{ campaign.target|intcomma }} by {{ campaign.deadline|date:"M d, Y" }}, <I>{{ campaign.work.title }}</i> will be released under a <a href="https://creativecommons.org">Creative Commons</a> license for all to enjoy.</div>
|
||||
<div>You can help! <a href="{% url 'pledge' campaign.work.id %}">Pledge</a> any amount, and use the sharing options on the <a href="{% url 'work' campaign.work.id %}">campaign page</a> to tell your friends.</a></div>
|
||||
<div>You can help! <a href="{% url 'pledge' campaign.work_id %}">Pledge</a> any amount, and use the sharing options on the <a href="{% url 'work' campaign.work_id %}">campaign page</a> to tell your friends.</a></div>
|
||||
{% endifequal %}
|
||||
{% ifequal campaign.type 2 %}
|
||||
<div>Great! You wished for a campaign, and here it is. Someday, the book will be released under a <a href="https://creativecommons.org">Creative Commons license</a> for everyone to enjoy. Every copy purchased brings that day {{ campaign.days_per_copy|floatformat }} days sooner.</div>
|
||||
<div>You can help! <a href="{% url 'purchase' campaign.work.id %}">Purchase</a> a copy, and use the sharing options on the <a href="{% url 'work' campaign.work.id %}">campaign page</a> to tell your friends.</a></div>
|
||||
<div>You can help! <a href="{% url 'purchase' campaign.work_id %}">Purchase</a> a copy, and use the sharing options on the <a href="{% url 'work' campaign.work_id %}">campaign page</a> to tell your friends.</a></div>
|
||||
{% endifequal %}
|
||||
{% ifequal campaign.type 3 %}
|
||||
<div>There is a new "Thanks for Ungluing" campaign for {{ campaign.work.title }} one of your Creative Commons license favorites.</div>
|
||||
<div>Please join us! <a href="{% url 'download' campaign.work.id %}">Download</a> a copy, leave a contribution, and use the sharing options on the <a href="{% url 'work' campaign.work.id %}">campaign page</a> to tell your friends.</a></div>
|
||||
<div>Please join us! <a href="{% url 'download' campaign.work_id %}">Download</a> a copy, leave a contribution, and use the sharing options on the <a href="{% url 'work' campaign.work_id %}">campaign page</a> to tell your friends.</a></div>
|
||||
{% endifequal %}
|
||||
{% endblock %}
|
|
@ -1,11 +1,11 @@
|
|||
{% load humanize %}{% if campaign.left > 0 %} The campaign to unglue a book you've faved, {{ campaign.work.title}}, is almost out of time. We need to raise ${{ campaign.left|intcomma }} more by {{ campaign.deadline }} in order to give this book to the world.
|
||||
|
||||
{% if pledged %}
|
||||
Your pledge is helping {{ campaign.work.title }} to reach its goal, but we can only unglue this book if the campaign succeeds. You can help your pledge go farther by sharing the campaign ({{ domain }}{% url 'work' work_id=campaign.work.id %}) with your friends through your favorite media: tweet, Facebook, Tumblr, blog, G+, Pinterest, email, carrier pigeon, or good old-fashioned conversation.
|
||||
Your pledge is helping {{ campaign.work.title }} to reach its goal, but we can only unglue this book if the campaign succeeds. You can help your pledge go farther by sharing the campaign ({{ domain }}{% url 'work' work_id=campaign.work_id %}) with your friends through your favorite media: tweet, Facebook, Tumblr, blog, G+, Pinterest, email, carrier pigeon, or good old-fashioned conversation.
|
||||
{% else %}
|
||||
If you've been meaning to get around to pledging, now's your chance. Any amount helps. You can chip in towards giving this book to the world at {{ domain }}{% url 'pledge' work_id=campaign.work.id %} .
|
||||
If you've been meaning to get around to pledging, now's your chance. Any amount helps. You can chip in towards giving this book to the world at {{ domain }}{% url 'pledge' work_id=campaign.work_id %} .
|
||||
|
||||
You can also help by sharing the campaign ({{ domain }}{% url 'work' work_id=campaign.work.id %}) with your friends through your favorite media: tweet, Facebook, Tumblr, blog, G+, Pinterest, email, carrier pigeon, or good old-fashioned conversation.
|
||||
You can also help by sharing the campaign ({{ domain }}{% url 'work' work_id=campaign.work_id %}) with your friends through your favorite media: tweet, Facebook, Tumblr, blog, G+, Pinterest, email, carrier pigeon, or good old-fashioned conversation.
|
||||
{% endif %}
|
||||
|
||||
Thank you!
|
||||
|
@ -16,7 +16,7 @@
|
|||
{% if pledged %}
|
||||
Your pledge is helping us give this book to the world. Thank you! When the campaign closes, we'll be in touch about how and when you'll receive your premiums.
|
||||
{% else %}
|
||||
If you wanted to support this campaign, this is your last chance. Pledge by midnight (Eastern US time) if you want to help the campaign or receive any premiums: {{ domain }}{% url 'pledge' work_id=campaign.work.id %}
|
||||
If you wanted to support this campaign, this is your last chance. Pledge by midnight (Eastern US time) if you want to help the campaign or receive any premiums: {{ domain }}{% url 'pledge' work_id=campaign.work_id %}
|
||||
{% endif %}
|
||||
|
||||
Thanks to ungluers like you, we'll soon be able to give this book to the world together. Hooray!
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
|
||||
{% block comments_book %}
|
||||
<a href="{% url 'work' campaign.work.id %}"><img src="{{ campaign.work.cover_image_small }}" alt="cover image for {{ campaign.work.title }}" /></a>
|
||||
<a href="{% url 'work' campaign.work_id %}"><img src="{{ campaign.work.cover_image_small }}" alt="cover image for {{ campaign.work.title }}" /></a>
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_graphical %}
|
||||
|
@ -16,10 +16,10 @@
|
|||
Your pledge is helping us reach that goal. Will you help again by sharing this campaign with your friends?
|
||||
|
||||
{% else %}
|
||||
If you've been meaning to pledge, <a href="{% url 'pledge' work_id=campaign.work.id %}">now's your chance</a>. You can also help by sharing this campaign with your friends.
|
||||
If you've been meaning to pledge, <a href="{% url 'pledge' work_id=campaign.work_id %}">now's your chance</a>. You can also help by sharing this campaign with your friends.
|
||||
{% endif %}
|
||||
|
||||
{% url 'work' campaign.work.id as work_url %}
|
||||
{% url 'work' campaign.work_id as work_url %}
|
||||
{% include "notification/sharing_block.html" %}
|
||||
|
||||
Thank you!
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{% load humanize %}The campaign to unglue a book you've faved, {{ campaign.work.title}}, is close to succeeding! We only need to raise ${{ campaign.left|intcomma }} more by {{ campaign.deadline }} in order to give this book to the world.
|
||||
|
||||
{% if pledged %}
|
||||
Your pledge of {{ amount|intcomma }} is helping {{ campaign.work.title }} to reach its goal, but we can only unglue this book if the campaign succeeds. You can tip the balance by sharing the campaign (https://{{ current_site.domain }}{% url 'work' work_id=campaign.work.id %}) with your friends through your favorite media: tweet, Facebook, Tumblr, blog, G+, Pinterest, email, carrier pigeon, or good old-fashioned conversation.
|
||||
Your pledge of {{ amount|intcomma }} is helping {{ campaign.work.title }} to reach its goal, but we can only unglue this book if the campaign succeeds. You can tip the balance by sharing the campaign (https://{{ current_site.domain }}{% url 'work' work_id=campaign.work_id %}) with your friends through your favorite media: tweet, Facebook, Tumblr, blog, G+, Pinterest, email, carrier pigeon, or good old-fashioned conversation.
|
||||
{% else %}
|
||||
We need your pledge to reach this target. Any amount helps. You can chip in towards giving this book to the world at https://{{ current_site.domain }}{% url 'pledge' work_id=campaign.work.id %} .
|
||||
We need your pledge to reach this target. Any amount helps. You can chip in towards giving this book to the world at https://{{ current_site.domain }}{% url 'pledge' work_id=campaign.work_id %} .
|
||||
|
||||
You can also help by sharing the campaign (https://{{ current_site.domain }}{% url 'work' work_id=campaign.work.id %}) with your friends through your favorite media: tweet, Facebook, Tumblr, blog, G+, Pinterest, email, carrier pigeon, or good old-fashioned conversation.
|
||||
You can also help by sharing the campaign (https://{{ current_site.domain }}{% url 'work' work_id=campaign.work_id %}) with your friends through your favorite media: tweet, Facebook, Tumblr, blog, G+, Pinterest, email, carrier pigeon, or good old-fashioned conversation.
|
||||
{% endif %}
|
||||
|
||||
Thank you!
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{% load humanize %}
|
||||
|
||||
{% block comments_book %}
|
||||
<a href="{% url 'work' campaign.work.id %}"><img src="{{ campaign.work.cover_image_small }}" alt="cover image for {{ campaign.work.title }}" /></a>
|
||||
<a href="{% url 'work' campaign.work_id %}"><img src="{{ campaign.work.cover_image_small }}" alt="cover image for {{ campaign.work.title }}" /></a>
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_graphical %}
|
||||
|
@ -15,10 +15,10 @@
|
|||
{% if pledged %}
|
||||
Your pledge is helping us reach the campaign's target price of {{ campaign.target }}. Will you help again by sharing this campaign with your friends?
|
||||
{% else %}
|
||||
You can help us give this book to the world by <a href="{% url 'pledge' work_id=campaign.work.id %}">pledging</a> or by sharing this campaign with your friends.
|
||||
You can help us give this book to the world by <a href="{% url 'pledge' work_id=campaign.work_id %}">pledging</a> or by sharing this campaign with your friends.
|
||||
{% endif %}
|
||||
|
||||
{% url 'work' campaign.work.id as work_url %}
|
||||
{% url 'work' campaign.work_id as work_url %}
|
||||
{% include "notification/sharing_block.html" %}
|
||||
|
||||
Thank you!
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
Premium: {{ premium.description }}
|
||||
Minimum pledge: {{ premium.amount|intcomma }}
|
||||
|
||||
If you'd like to claim the last one, pledge here: https://{{ current_site.domain }}{% url 'pledge' work_id=campaign.work.id %}
|
||||
If you'd like to claim the last one, pledge here: https://{{ current_site.domain }}{% url 'pledge' work_id=campaign.work_id %}
|
||||
|
||||
{{ campaign.rightsholder }} (rights holder for {{ campaign.work.title }}) and the Unglue.it team
|
|
@ -3,7 +3,7 @@
|
|||
{% load humanize %}
|
||||
|
||||
{% block comments_book %}
|
||||
<a href="{% url 'work' campaign.work.id %}"><img src="{{ campaign.work.cover_image_small }}" alt="cover image for {{ campaign.work.title }}" /></a>
|
||||
<a href="{% url 'work' campaign.work_id %}"><img src="{{ campaign.work.cover_image_small }}" alt="cover image for {{ campaign.work.title }}" /></a>
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_graphical %}
|
||||
|
@ -16,5 +16,5 @@
|
|||
Premium: {{ premium.description }}
|
||||
Minimum pledge: {{ premium.amount|intcomma }}
|
||||
|
||||
If you'd like to claim the last one, pledge here: https://{{ current_site.domain }}{% url 'pledge' work_id=campaign.work.id %}
|
||||
If you'd like to claim the last one, pledge here: https://{{ current_site.domain }}{% url 'pledge' work_id=campaign.work_id %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{% load humanize %}Good news! The rights holder, {{ campaign.rightsholder }}, has lowered the target price to ${{ campaign.target|intcomma }} for {{ campaign.work.title }}. Now we only need to raise ${{ campaign.left|intcomma }} by {{ campaign.deadline }} in order to give this book to the world.
|
||||
|
||||
{% if pledged %}
|
||||
Your pledge of {{ amount|intcomma }} is now going even farther toward helping {{ campaign.work.title }} to reach its goal. Still, we can only unglue this book if the campaign succeeds. You can help by sharing the campaign (https://{{ current_site.domain }}{% url 'work' work_id=campaign.work.id %}) with your friends through your favorite media: tweet, Facebook, Tumblr, blog, G+, Pinterest, email, carrier pigeon, or good old-fashioned conversation.
|
||||
Your pledge of {{ amount|intcomma }} is now going even farther toward helping {{ campaign.work.title }} to reach its goal. Still, we can only unglue this book if the campaign succeeds. You can help by sharing the campaign (https://{{ current_site.domain }}{% url 'work' work_id=campaign.work_id %}) with your friends through your favorite media: tweet, Facebook, Tumblr, blog, G+, Pinterest, email, carrier pigeon, or good old-fashioned conversation.
|
||||
{% else %}
|
||||
The target may be lower, but we still need your help to reach it. Pledges of any amount help. You can chip in towards giving this book to the world at https://{{ current_site.domain }}{% url 'pledge' work_id=campaign.work.id %} .
|
||||
The target may be lower, but we still need your help to reach it. Pledges of any amount help. You can chip in towards giving this book to the world at https://{{ current_site.domain }}{% url 'pledge' work_id=campaign.work_id %} .
|
||||
|
||||
You can also help by sharing the campaign (https://{{ current_site.domain }}{% url 'work' work_id=campaign.work.id %}) with your friends through your favorite media: tweet, Facebook, Tumblr, blog, G+, Pinterest, email, carrier pigeon, or good old-fashioned conversation.
|
||||
You can also help by sharing the campaign (https://{{ current_site.domain }}{% url 'work' work_id=campaign.work_id %}) with your friends through your favorite media: tweet, Facebook, Tumblr, blog, G+, Pinterest, email, carrier pigeon, or good old-fashioned conversation.
|
||||
{% endif %}
|
||||
|
||||
Thank you!
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{% load humanize %}
|
||||
|
||||
{% block comments_book %}
|
||||
<a href="{% url 'work' campaign.work.id %}"><img src="{{ campaign.work.cover_image_small }}" alt="cover image for {{ campaign.work.title }}" /></a>
|
||||
<a href="{% url 'work' campaign.work_id %}"><img src="{{ campaign.work.cover_image_small }}" alt="cover image for {{ campaign.work.title }}" /></a>
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_graphical %}
|
||||
|
@ -14,9 +14,9 @@
|
|||
{% if pledged %}
|
||||
Your pledge of {{ amount|intcomma }} is now going even farther toward helping {{ campaign.work.title }} to reach its goal. Still, we can only unglue this book if the campaign succeeds. You can help again by sharing this campaign:
|
||||
{% else %}
|
||||
The target may be lower, but we still need your help to reach it. Pledges of any amount help. You can chip in towards giving this book to the world at https://{{ current_site.domain }}{% url 'pledge' campaign.work.id %} . You can also help by sharing this campaign:
|
||||
The target may be lower, but we still need your help to reach it. Pledges of any amount help. You can chip in towards giving this book to the world at https://{{ current_site.domain }}{% url 'pledge' campaign.work_id %} . You can also help by sharing this campaign:
|
||||
{% endif %}
|
||||
|
||||
{% url 'work' campaign.work.id as work_url %}
|
||||
{% url 'work' campaign.work_id as work_url %}
|
||||
{% include "notification/sharing_block.html" %}
|
||||
{% endblock %}
|
|
@ -1,4 +1,4 @@
|
|||
{% if pledged %}You pledged toward it{% else %}You put it on your list{% endif %}, and now the campaign for {{ campaign.work.title}} (https://{{current_site.domain}}{% url 'work' campaign.work.id %}) has succeeded.
|
||||
{% if pledged %}You pledged toward it{% else %}You put it on your list{% endif %}, and now the campaign for {{ campaign.work.title}} (https://{{current_site.domain}}{% url 'work' campaign.work_id %}) has succeeded.
|
||||
{% ifequal campaign.type 1 %}
|
||||
You will notified when an Unglued ebook edition is available, within 90 days.
|
||||
{% if pledged %}
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
|
||||
{% block comments_book %}
|
||||
<a href="{% url 'work' campaign.work.id %}"><img src="{{ campaign.work.cover_image_small }}" alt="cover image for {{ campaign.work.title }}" /></a>
|
||||
<a href="{% url 'work' campaign.work_id %}"><img src="{{ campaign.work.cover_image_small }}" alt="cover image for {{ campaign.work.title }}" /></a>
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_graphical %}
|
||||
The campaign to unglue <a href="{% url 'work' campaign.work.id %}">{{ campaign.work.title }}</a> has succeeded!
|
||||
The campaign to unglue <a href="{% url 'work' campaign.work_id %}">{{ campaign.work.title }}</a> has succeeded!
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_textual %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Alas. The campaign to unglue {{ campaign.work.title }} (https://{{current_site.domain}}{% url 'work' campaign.work.id %}) has not succeeded.
|
||||
Alas. The campaign to unglue {{ campaign.work.title }} (https://{{current_site.domain}}{% url 'work' campaign.work_id %}) has not succeeded.
|
||||
|
||||
If you pledged toward this work, your pledge will expire shortly and your credit card will not be charged, nor will you receive any premiums.
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
|
||||
{% block comments_book %}
|
||||
<a href="{% url 'work' campaign.work.id %}"><img src="{{ campaign.work.cover_image_small }}" alt="cover image for {{ campaign.work.title }}" /></a>
|
||||
<a href="{% url 'work' campaign.work_id %}"><img src="{{ campaign.work.cover_image_small }}" alt="cover image for {{ campaign.work.title }}" /></a>
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_graphical %}
|
||||
Alas. The campaign to unglue <a href="{% url 'work' campaign.work.id %}">{{ campaign.work.title }}</a> did not succeed.
|
||||
Alas. The campaign to unglue <a href="{% url 'work' campaign.work_id %}">{{ campaign.work.title }}</a> did not succeed.
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_textual %}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Amazon Payments has informed us that they will no longer process pledge payments for new crowdfunding companies, including Unglue.it. Therefore the campaign to unglue {{ campaign.work.title }} (https://{{current_site.domain}}{% url 'work' campaign.work.id %}) has been closed.
|
||||
Amazon Payments has informed us that they will no longer process pledge payments for new crowdfunding companies, including Unglue.it. Therefore the campaign to unglue {{ campaign.work.title }} (https://{{current_site.domain}}{% url 'work' campaign.work_id %}) has been closed.
|
||||
|
||||
If you pledged toward this work, your pledge will expire shortly and your credit card will not be charged, nor will you receive any premiums.
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
|
||||
{% block comments_book %}
|
||||
<a href="{% url 'work' campaign.work.id %}"><img src="{{ campaign.work.cover_image_small }}" alt="cover image for {{ campaign.work.title }}" /></a>
|
||||
<a href="{% url 'work' campaign.work_id %}"><img src="{{ campaign.work.cover_image_small }}" alt="cover image for {{ campaign.work.title }}" /></a>
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_graphical %}
|
||||
Amazon has shut off payment processing for new crowdfunding companies. Therefore the campaign to unglue <a href="{% url 'work' campaign.work.id %}">{{ campaign.work.title }}</a> has been closed.
|
||||
Amazon has shut off payment processing for new crowdfunding companies. Therefore the campaign to unglue <a href="{% url 'work' campaign.work_id %}">{{ campaign.work.title }}</a> has been closed.
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_textual %}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
There's new information about a work on your wishlist! {{ campaign.rightsholder }}, the rights holder for {{ campaign.work.title}}, has updated the campaign. See the details at https://{{current_site.domain}}{% url 'work' campaign.work.id %}.
|
||||
There's new information about a work on your wishlist! {{ campaign.rightsholder }}, the rights holder for {{ campaign.work.title}}, has updated the campaign. See the details at https://{{current_site.domain}}{% url 'work' campaign.work_id %}.
|
||||
|
||||
{{ campaign.rightsholder }} and the Unglue.it team
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
|
||||
{% block comments_book %}
|
||||
<a href="{% url 'work' campaign.work.id %}"><img src="{{ campaign.work.cover_image_small }}" alt="cover image for {{ cmapaign.work.title }}" /></a>
|
||||
<a href="{% url 'work' campaign.work_id %}"><img src="{{ campaign.work.cover_image_small }}" alt="cover image for {{ cmapaign.work.title }}" /></a>
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_graphical %}
|
||||
The rights holder, {{ campaign.rightsholder }}, has updated the campaign to unglue {{ campaign.work.title }}. For details, see the <a href="{% url 'work' campaign.work.id %}">campaign page</a>.
|
||||
The rights holder, {{ campaign.rightsholder }}, has updated the campaign to unglue {{ campaign.work.title }}. For details, see the <a href="{% url 'work' campaign.work_id %}">campaign page</a>.
|
||||
{% endblock %}
|
|
@ -2,7 +2,7 @@ Hooray! A rights holder, {{ rightsholder }}, has claimed {{ claim.work.title }}
|
|||
|
||||
What does this mean for you? Rights holders are the people who are legally authorized to license works. This means they're the only people who can run campaigns on Unglue.it.
|
||||
|
||||
{{ rightsholder }} may be running a campaign soon, or later, but isn't obligated to. Want to make that campaign happen? Leave a comment (https://{{current_site.domain}}{% url 'work' campaign.work.id %}?tab=2) and tell your friends: make sure {{ rightsholder }} knows how much you want to give this book to the world.
|
||||
{{ rightsholder }} may be running a campaign soon, or later, but isn't obligated to. Want to make that campaign happen? Leave a comment (https://{{current_site.domain}}{% url 'work' campaign.work_id %}?tab=2) and tell your friends: make sure {{ rightsholder }} knows how much you want to give this book to the world.
|
||||
|
||||
Thanks for your help!
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
|
||||
{% block comments_book %}
|
||||
<a href="{% url 'work' claim.work.id %}"><img src="{{ claim.work.cover_image_small }}" alt="cover image for {{ claim.work.title }}" /></a>
|
||||
<a href="{% url 'work' claim.work_id %}"><img src="{{ claim.work.cover_image_small }}" alt="cover image for {{ claim.work.title }}" /></a>
|
||||
{% endblock %}
|
||||
|
||||
{% block comments_graphical %}
|
||||
|
@ -12,9 +12,9 @@
|
|||
{% block comments_textual %}
|
||||
What does this mean for you? Rights holders are the people who are legally authorized to license works. This means they're the only people who can run campaigns on Unglue.it.
|
||||
|
||||
{{ rightsholder }} may be running a campaign soon, or later, but isn't obligated to. Want to make that campaign happen? <a href="https://{{current_site.domain}}{% url 'work' claim.work.id %}?tab=2">Leave a comment</a> and tell your friends:
|
||||
{{ rightsholder }} may be running a campaign soon, or later, but isn't obligated to. Want to make that campaign happen? <a href="https://{{current_site.domain}}{% url 'work' claim.work_id %}?tab=2">Leave a comment</a> and tell your friends:
|
||||
|
||||
{% url 'work' claim.work.id as work_url %}
|
||||
{% url 'work' claim.work_id as work_url %}
|
||||
{% include "notification/sharing_block.html" %}
|
||||
|
||||
Make sure {{ rightsholder }} knows how much you want to give this book to the world.
|
||||
|
|
|
@ -50,7 +50,7 @@ If you're an author, publisher, or other rights holder, you can participate more
|
|||
<h2 id="managed_campaigns">Campaigns You Manage</h2>
|
||||
<dl>
|
||||
{% for campaign in campaigns %}
|
||||
<dt><a href="{% url 'work' work_id=campaign.work.id %}">{{campaign.name }}</a></dt>
|
||||
<dt><a href="{% url 'work' work_id=campaign.work_id %}">{{campaign.name }}</a></dt>
|
||||
<dd>
|
||||
<div class="work_campaigns clearfix">
|
||||
<div class="campaign_info">
|
||||
|
@ -66,7 +66,7 @@ If you're an author, publisher, or other rights holder, you can participate more
|
|||
Created: {{ campaign.created }}<br />
|
||||
${{ campaign.current_total }} sold. ${{ campaign.target }} to go. Ungluing Date: {{ campaign.cc_date }}<br />
|
||||
{% with campaign.work.preferred_edition as edition %}
|
||||
<a href="{% url 'new_edition' edition.work.id edition.id %}"> Edit </a> the preferred edition<br />
|
||||
<a href="{% url 'new_edition' edition.work_id edition.id %}"> Edit </a> the preferred edition<br />
|
||||
You can also <a href="{% url 'edition_uploads' edition.id %}"> Load a file</a> for this edition.<br />
|
||||
{% endwith %}
|
||||
{% endifequal %}
|
||||
|
@ -76,7 +76,7 @@ If you're an author, publisher, or other rights holder, you can participate more
|
|||
Created: {{ campaign.created }}<br />
|
||||
${{ campaign.current_total }} raised from {{ campaign.supporters_count }} ungluers, {{ campaign.anon_count }} others.
|
||||
{% with campaign.work.preferred_edition as edition %}
|
||||
<a href="{% url 'new_edition' edition.work.id edition.id %}"> Edit </a> the preferred edition<br />
|
||||
<a href="{% url 'new_edition' edition.work_id edition.id %}"> Edit </a> the preferred edition<br />
|
||||
You can also <a href="{% url 'edition_uploads' edition.id %}"> Load a file</a> for this edition.<br />
|
||||
{% endwith %}
|
||||
{% endifequal %}
|
||||
|
@ -104,7 +104,7 @@ If you're an author, publisher, or other rights holder, you can participate more
|
|||
<h2 id="open_campaigns">Works You Have Claimed</h2>
|
||||
<dl>
|
||||
{% for claim in claims %}
|
||||
<dt>Title: <a href="{% url 'work' work_id=claim.work.id %}">{{claim.work.title }}</a> (work #{{ claim.work.id }})</dt>
|
||||
<dt>Title: <a href="{% url 'work' work_id=claim.work_id %}">{{claim.work.title }}</a> (work #{{ claim.work_id }})</dt>
|
||||
<dd>Author: {{claim.work.authors_short }}
|
||||
<br />On Behalf of: {{ claim.rights_holder.rights_holder_name }}
|
||||
<br />PSA #: {{ claim.rights_holder.id }}
|
||||
|
@ -189,7 +189,7 @@ If you're an author, publisher, or other rights holder, you can participate more
|
|||
<div class="work_campaigns">
|
||||
<ul>
|
||||
{% for ebook in claim.work.ebooks_all %}
|
||||
<li> edition #{{ebook.edition.id}} {{ ebook.format }} {% if not ebook.active %}(inactive){% endif %}
|
||||
<li> edition #{{ebook.edition_id}} {{ ebook.format }} {% if not ebook.active %}(inactive){% endif %}
|
||||
{{ ebook.download_count }} downloads
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
{% csrf_token %}
|
||||
<dl>
|
||||
{% for claim, claim_form in pending %}
|
||||
<dt>Title: <a href="{% url 'work' work_id=claim.work.id %}">{{claim.work.title }}</a></dt>
|
||||
<dt>Title: <a href="{% url 'work' work_id=claim.work_id %}">{{claim.work.title }}</a></dt>
|
||||
<dd>Author: {{claim.work.authors_short }}</dd>
|
||||
<dd>By: {{ claim.user.username }}</dd>
|
||||
<dd>On Behalf of: {{ claim.rights_holder.rights_holder_name }}</dd>
|
||||
|
@ -72,7 +72,7 @@
|
|||
<h3> Active Claims: {{ active_data.count }} </h3>
|
||||
<dl>
|
||||
{% for claim in active_data %}
|
||||
<dt>Title: <a href="{% url 'work' work_id=claim.work.id %}">{{claim.work.title }}</a></dt>
|
||||
<dt>Title: <a href="{% url 'work' work_id=claim.work_id %}">{{claim.work.title }}</a></dt>
|
||||
<dd>Author: {{claim.work.authors_short }}</dd>
|
||||
<dd>By: {{ claim.user.username }}</dd>
|
||||
<dd>On Behalf of: {{ claim.rights_holder.rights_holder_name }}</dd>
|
||||
|
|
|
@ -476,7 +476,7 @@
|
|||
<ul id="kw_list"></ul>
|
||||
|
||||
{% endif %}
|
||||
{% if user.is_staff or user in work.last_campaign.managers.all %}
|
||||
{% if user_can_edit_work %}
|
||||
<form method="POST" id="kw_add_form">{% csrf_token %}
|
||||
{{ kwform.add_kw }}<input type="hidden" name="kw_add" value="true"> <input type="submit" name="kw_add_fake" value="add keyword" id="kw_add_form_submit" />
|
||||
</form>
|
||||
|
@ -486,7 +486,7 @@
|
|||
{% if alert %}
|
||||
<div class="yikes"><br />{{ alert }}</div>
|
||||
{% endif %}
|
||||
{% if user.is_staff or user in work.last_campaign.managers.all %}
|
||||
{% if user_can_edit_work %}
|
||||
<div><a href="{% url 'new_edition' work_id edition.id %}">Create a new edition for this work</a><br /><br /></div>
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -396,6 +396,7 @@ def work(request, work_id, action='display'):
|
|||
|
||||
return render(request, 'work.html', {
|
||||
'work': work,
|
||||
'user_can_edit_work': user_can_edit_work(request.user, work),
|
||||
'premiums': premiums,
|
||||
'ungluers': userlists.supporting_users(work, 5),
|
||||
'claimform': claimform,
|
||||
|
@ -641,12 +642,14 @@ def googlebooks(request, googlebooks_id):
|
|||
if edition.new:
|
||||
# add related editions asynchronously
|
||||
tasks.populate_edition.delay(edition.isbn_13)
|
||||
if request.user.is_authenticated():
|
||||
request.user.profile.works.add(edition.work)
|
||||
except bookloader.LookupFailure:
|
||||
logger.warning("failed to load googlebooks_id %s" % googlebooks_id)
|
||||
return HttpResponseNotFound("failed looking up googlebooks id %s" % googlebooks_id)
|
||||
if not edition:
|
||||
return HttpResponseNotFound("invalid googlebooks id")
|
||||
work_url = reverse('work', kwargs={'work_id': edition.work.id})
|
||||
work_url = reverse('work', kwargs={'work_id': edition.work_id})
|
||||
|
||||
# process waiting add request
|
||||
if not request.user.is_anonymous() and request.session.has_key("add_wishlist"):
|
||||
|
@ -1269,7 +1272,7 @@ class FundView(FormView):
|
|||
data.update(
|
||||
{'preapproval_amount':self.transaction.needed_amount,
|
||||
'username':self.request.user.username if self.request.user.is_authenticated() else None,
|
||||
'work_id':self.transaction.campaign.work.id if self.transaction.campaign else None,
|
||||
'work_id':self.transaction.campaign.work_id if self.transaction.campaign else None,
|
||||
'title':self.transaction.campaign.work.title if self.transaction.campaign else COMPANY_TITLE}
|
||||
)
|
||||
return kwargs
|
||||
|
@ -1462,7 +1465,7 @@ class FundCompleteView(TemplateView):
|
|||
if self.user_is_ok():
|
||||
return self.render_to_response(context)
|
||||
else:
|
||||
return HttpResponseRedirect(reverse('work', kwargs={'work_id': self.transaction.campaign.work.id}))
|
||||
return HttpResponseRedirect(reverse('work', kwargs={'work_id': self.transaction.campaign.work_id}))
|
||||
else:
|
||||
return redirect_to_login(request.get_full_path())
|
||||
else:
|
||||
|
@ -1475,7 +1478,7 @@ class FundCompleteView(TemplateView):
|
|||
# to handle anonymous donors- leakage not an issue
|
||||
return True
|
||||
else:
|
||||
return self.request.user.id == self.transaction.user.id
|
||||
return self.request.user.id == self.transaction.user_id
|
||||
|
||||
|
||||
|
||||
|
@ -1621,7 +1624,7 @@ class PledgeCancelView(FormView):
|
|||
from regluit.payment.signals import pledge_modified
|
||||
pledge_modified.send(sender=self, transaction=transaction, up_or_down="canceled")
|
||||
logger.info("pledge_modified notice for cancellation: sender {0}, transaction {1}".format(self, transaction))
|
||||
return HttpResponseRedirect(reverse('work', kwargs={'work_id': campaign.work.id}))
|
||||
return HttpResponseRedirect(reverse('work', kwargs={'work_id': campaign.work_id}))
|
||||
else:
|
||||
logger.error("Attempt to cancel transaction id {0} failed".format(transaction.id))
|
||||
return HttpResponse("Our attempt to cancel your transaction failed. We have logged this error.")
|
||||
|
@ -1728,7 +1731,7 @@ def new_survey(request, work_id):
|
|||
if form.is_valid():
|
||||
if not work and form.work:
|
||||
for my_work in my_works:
|
||||
print '{} {}'.format(my_work.id, form.work.id)
|
||||
print '{} {}'.format(my_work.id, form.work_id)
|
||||
if my_work == form.work:
|
||||
work = form.work
|
||||
break
|
||||
|
@ -1757,7 +1760,7 @@ def rh_tools(request):
|
|||
return render(request, "rh_tools.html")
|
||||
for claim in claims:
|
||||
if claim.can_open_new:
|
||||
if request.method == 'POST' and request.POST.has_key('cl_%s-work' % claim.id) and int(request.POST['cl_%s-work' % claim.id]) == claim.work.id :
|
||||
if request.method == 'POST' and request.POST.has_key('cl_%s-work' % claim.id) and int(request.POST['cl_%s-work' % claim.id]) == claim.work_id :
|
||||
claim.campaign_form = OpenCampaignForm(data = request.POST, prefix = 'cl_'+str(claim.id),)
|
||||
if claim.campaign_form.is_valid():
|
||||
new_campaign = claim.campaign_form.save(commit=False)
|
||||
|
@ -2677,7 +2680,7 @@ def ask_rh(request, campaign_id):
|
|||
campaign = get_object_or_404(models.Campaign, id=campaign_id)
|
||||
return feedback(request, recipient=campaign.email, template="ask_rh.html",
|
||||
message_template="ask_rh.txt",
|
||||
redirect_url = reverse('work', args=[campaign.work.id]),
|
||||
redirect_url = reverse('work', args=[campaign.work_id]),
|
||||
extra_context={'campaign':campaign, 'subject':campaign })
|
||||
|
||||
def feedback(request, recipient='support@gluejar.com', template='feedback.html', message_template='feedback.txt', extra_context=None, redirect_url=None):
|
||||
|
@ -3015,7 +3018,7 @@ def receive_gift(request, nonce):
|
|||
if gift.used:
|
||||
if request.user.is_authenticated():
|
||||
#check that user hasn't redeemed the gift themselves
|
||||
if (gift.acq.user.id == request.user.id) and not gift.acq.expired:
|
||||
if (gift.acq.user_id == request.user.id) and not gift.acq.expired:
|
||||
return HttpResponseRedirect(reverse('display_gift', args=[gift.id,'existing']))
|
||||
return render(request, 'gift_error.html', context)
|
||||
if request.user.is_authenticated():
|
||||
|
@ -3066,7 +3069,7 @@ def display_gift(request, gift_id, message):
|
|||
gift = models.Gift.objects.get(id=gift_id)
|
||||
except models.Gift.DoesNotExist:
|
||||
return render(request, 'gift_error.html',)
|
||||
if request.user.id != gift.acq.user.id :
|
||||
if request.user.id != gift.acq.user_id :
|
||||
return HttpResponse("this is not your gift")
|
||||
redeemed_gift = request.session.get('gift_nonce', None) == gift.acq.nonce
|
||||
context = {'gift': gift, 'work': gift.acq.work , 'message':message }
|
||||
|
|
|
@ -29,15 +29,19 @@ def user_can_edit_work(user, work):
|
|||
'''
|
||||
Check if a user is allowed to edit the work
|
||||
'''
|
||||
if user.is_staff :
|
||||
if user.is_anonymous():
|
||||
return False
|
||||
elif user.is_staff :
|
||||
return True
|
||||
elif work and work.last_campaign():
|
||||
return user in work.last_campaign().managers.all()
|
||||
elif user.rights_holder.count() and (work == None or not work.last_campaign()):
|
||||
# allow rights holders to edit unless there is a campaign
|
||||
return True
|
||||
elif work and work.claim.all():
|
||||
return True if work.claim.filter(user=user) else False
|
||||
else:
|
||||
return False
|
||||
return user.profile in work.contributors.all()
|
||||
|
||||
def safe_get_work(work_id):
|
||||
"""
|
||||
|
@ -68,6 +72,11 @@ def get_edition(edition_id):
|
|||
except models.Edition.DoesNotExist:
|
||||
raise Http404 (duplicate-code)
|
||||
|
||||
def user_edition(edition, user):
|
||||
if user and user.is_authenticated() and edition:
|
||||
user.profile.works.add(edition.work)
|
||||
return edition
|
||||
|
||||
def get_edition_for_id(id_type, id_value, user=None):
|
||||
''' the identifier is assumed to not be in database '''
|
||||
identifiers = {id_type: id_value}
|
||||
|
@ -87,17 +96,18 @@ def get_edition_for_id(id_type, id_value, user=None):
|
|||
if identifiers.has_key('goog'):
|
||||
edition = add_by_googlebooks_id(identifiers['goog'])
|
||||
if edition:
|
||||
return edition
|
||||
|
||||
return user_edition(edition, user)
|
||||
|
||||
if identifiers.has_key('isbn'):
|
||||
edition = add_by_isbn(identifiers['isbn'])
|
||||
if edition:
|
||||
return edition
|
||||
return user_edition(edition, user)
|
||||
|
||||
if identifiers.has_key('oclc'):
|
||||
edition = add_by_oclc(identifiers['oclc'])
|
||||
if edition:
|
||||
return edition
|
||||
return user_edition(edition, user)
|
||||
|
||||
if identifiers.has_key('glue'):
|
||||
try:
|
||||
|
@ -108,7 +118,7 @@ def get_edition_for_id(id_type, id_value, user=None):
|
|||
|
||||
if identifiers.has_key('http'):
|
||||
edition = add_by_webpage(identifiers['http'], user=user)
|
||||
return edition
|
||||
return user_edition(edition, user)
|
||||
|
||||
|
||||
# return a dummy edition and identifier
|
||||
|
@ -126,7 +136,7 @@ def get_edition_for_id(id_type, id_value, user=None):
|
|||
models.Identifier.objects.create(type=key, value=id_value, work=work, edition=None)
|
||||
else:
|
||||
models.Identifier.objects.create(type=key, value=id_value, work=work, edition=edition)
|
||||
return edition
|
||||
return user_edition(edition, user)
|
||||
|
||||
@login_required
|
||||
def new_edition(request, by=None):
|
||||
|
@ -138,7 +148,7 @@ def new_edition(request, by=None):
|
|||
form = IdentifierForm(data=request.POST)
|
||||
if form.is_valid():
|
||||
if form.cleaned_data.get('make_new', False):
|
||||
edition = get_edition_for_id('glue', 'new')
|
||||
edition = get_edition_for_id('glue', 'new', user=request.user)
|
||||
else:
|
||||
id_type = form.cleaned_data['id_type']
|
||||
id_value = form.cleaned_data['id_value']
|
||||
|
@ -153,7 +163,7 @@ def new_edition(request, by=None):
|
|||
|
||||
return HttpResponseRedirect(
|
||||
reverse('new_edition', kwargs={
|
||||
'work_id': edition.work.id,
|
||||
'work_id': edition.work_id,
|
||||
'edition_id': edition.id
|
||||
})
|
||||
)
|
||||
|
@ -238,17 +248,14 @@ def edit_edition(request, work_id, edition_id, by=None):
|
|||
ebookchange = True
|
||||
if ebookchange:
|
||||
form = EditionForm(instance=edition, data=request.POST, files=request.FILES)
|
||||
if request.POST.has_key('add_author_submit') and admin:
|
||||
|
||||
if request.POST.get('add_author', None) and admin:
|
||||
new_author_name = request.POST['add_author'].strip()
|
||||
new_author_relation = request.POST['add_author_relation']
|
||||
try:
|
||||
author = models.Author.objects.get(name=new_author_name)
|
||||
except models.Author.DoesNotExist:
|
||||
author = models.Author.objects.create(name=new_author_name)
|
||||
edition.new_authors.append((new_author_name, new_author_relation))
|
||||
form = EditionForm(instance=edition, data=request.POST, files=request.FILES)
|
||||
elif not form and admin:
|
||||
form = EditionForm(instance=edition, data=request.POST, files=request.FILES)
|
||||
if (new_author_name, new_author_relation) not in edition.new_authors:
|
||||
edition.new_authors.append((new_author_name, new_author_relation))
|
||||
form = EditionForm(instance=edition, data=request.POST, files=request.FILES)
|
||||
if not request.POST.has_key('add_author_submit') and admin:
|
||||
if form.is_valid():
|
||||
form.save()
|
||||
if not work:
|
||||
|
@ -267,7 +274,13 @@ def edit_edition(request, work_id, edition_id, by=None):
|
|||
work.publication_range = None # will reset on next access
|
||||
work.language = form.cleaned_data['language']
|
||||
work.age_level = form.cleaned_data['age_level']
|
||||
work.save()
|
||||
work.save(update_fields=[
|
||||
'title',
|
||||
'description',
|
||||
'publication_range',
|
||||
'language',
|
||||
'age_level'
|
||||
])
|
||||
|
||||
id_type = form.cleaned_data['id_type']
|
||||
id_val = form.cleaned_data['id_value']
|
||||
|
@ -303,7 +316,7 @@ def edit_edition(request, work_id, edition_id, by=None):
|
|||
bisacsh = bisacsh.parent
|
||||
for subject_name in edition.new_subjects:
|
||||
add_subject(subject_name, work)
|
||||
work_url = reverse('work', kwargs={'work_id': edition.work.id})
|
||||
work_url = reverse('work', kwargs={'work_id': edition.work_id})
|
||||
cover_file = form.cleaned_data.get("coverfile", None)
|
||||
if cover_file:
|
||||
# save it
|
||||
|
|
|
@ -103,3 +103,4 @@ pycparser==2.14
|
|||
setuptools==25.0.0
|
||||
urllib3==1.16
|
||||
beautifulsoup4==4.6.0
|
||||
RISparser==0.4.2
|
||||
|
|
|
@ -0,0 +1,271 @@
|
|||
{
|
||||
"kind": "books#volumes",
|
||||
"totalItems": 3,
|
||||
"items": [
|
||||
{
|
||||
"kind": "books#volume",
|
||||
"id": "JikgAgAAQBAJ",
|
||||
"etag": "HZe9MmdRNx0",
|
||||
"selfLink": "https://www.googleapis.com/books/v1/volumes/JikgAgAAQBAJ",
|
||||
"volumeInfo": {
|
||||
"title": "大宋王朝4",
|
||||
"subtitle": "",
|
||||
"authors": [
|
||||
"王新龙"
|
||||
],
|
||||
"publisher": "青苹果数据中心",
|
||||
"publishedDate": "2013-11-21",
|
||||
"description": "?大宋王朝,武运国势萎弱不振,但经济繁荣,文化昌盛,政治军事与经济文化形成极其鲜明的对照,貌似不和谐地并存于一体,本书从经济、文化、科技等不同的层面重新审视两宋,试图全方位地向读者展示大宋历史的始末。",
|
||||
"readingModes": {
|
||||
"text": true,
|
||||
"image": true
|
||||
},
|
||||
"printType": "BOOK",
|
||||
"maturityRating": "NOT_MATURE",
|
||||
"allowAnonLogging": false,
|
||||
"contentVersion": "1.1.1.0.preview.3",
|
||||
"panelizationSummary": {
|
||||
"containsEpubBubbles": false,
|
||||
"containsImageBubbles": false
|
||||
},
|
||||
"imageLinks": {
|
||||
"smallThumbnail": "http://books.google.com/books/content?id=JikgAgAAQBAJ&printsec=frontcover&img=1&zoom=5&edge=curl&source=gbs_api",
|
||||
"thumbnail": "http://books.google.com/books/content?id=JikgAgAAQBAJ&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api"
|
||||
},
|
||||
"language": "zh-CN",
|
||||
"previewLink": "http://books.google.com/books?id=JikgAgAAQBAJ&printsec=frontcover&dq=isbn:9787104030126&hl=&cd=1&source=gbs_api",
|
||||
"infoLink": "https://play.google.com/store/books/details?id=JikgAgAAQBAJ&source=gbs_api",
|
||||
"canonicalVolumeLink": "https://market.android.com/details?id=book-JikgAgAAQBAJ"
|
||||
},
|
||||
"saleInfo": {
|
||||
"country": "US",
|
||||
"saleability": "FOR_SALE",
|
||||
"isEbook": true,
|
||||
"listPrice": {
|
||||
"amount": 0.99,
|
||||
"currencyCode": "USD"
|
||||
},
|
||||
"retailPrice": {
|
||||
"amount": 0.99,
|
||||
"currencyCode": "USD"
|
||||
},
|
||||
"buyLink": "https://play.google.com/store/books/details?id=JikgAgAAQBAJ&rdid=book-JikgAgAAQBAJ&rdot=1&source=gbs_api",
|
||||
"offers": [
|
||||
{
|
||||
"finskyOfferType": 1,
|
||||
"listPrice": {
|
||||
"amountInMicros": 990000.0,
|
||||
"currencyCode": "USD"
|
||||
},
|
||||
"retailPrice": {
|
||||
"amountInMicros": 990000.0,
|
||||
"currencyCode": "USD"
|
||||
},
|
||||
"giftable": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"accessInfo": {
|
||||
"country": "US",
|
||||
"viewability": "PARTIAL",
|
||||
"embeddable": true,
|
||||
"publicDomain": false,
|
||||
"textToSpeechPermission": "ALLOWED",
|
||||
"epub": {
|
||||
"isAvailable": true,
|
||||
"acsTokenLink": "http://books.google.com/books/download/%E5%A4%A7%E5%AE%8B%E7%8E%8B%E6%9C%9D4-sample-epub.acsm?id=JikgAgAAQBAJ&format=epub&output=acs4_fulfillment_token&dl_type=sample&source=gbs_api"
|
||||
},
|
||||
"pdf": {
|
||||
"isAvailable": true,
|
||||
"acsTokenLink": "http://books.google.com/books/download/%E5%A4%A7%E5%AE%8B%E7%8E%8B%E6%9C%9D4-sample-pdf.acsm?id=JikgAgAAQBAJ&format=pdf&output=acs4_fulfillment_token&dl_type=sample&source=gbs_api"
|
||||
},
|
||||
"webReaderLink": "http://play.google.com/books/reader?id=JikgAgAAQBAJ&hl=&printsec=frontcover&source=gbs_api",
|
||||
"accessViewStatus": "SAMPLE",
|
||||
"quoteSharingAllowed": false
|
||||
},
|
||||
"searchInfo": {
|
||||
"textSnippet": "大宋王朝,武运国势萎弱不振,但经济繁荣,文化昌盛,政治军事与经济文化形成极其鲜明的对照,貌似不和谐地并存于一体,本书从经济、文化、科技等不同的层面重新审视两宋, ..."
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "books#volume",
|
||||
"id": "McQdAgAAQBAJ",
|
||||
"etag": "qTN9nxDWgE0",
|
||||
"selfLink": "https://www.googleapis.com/books/v1/volumes/McQdAgAAQBAJ",
|
||||
"volumeInfo": {
|
||||
"title": "大宋王朝1",
|
||||
"subtitle": "",
|
||||
"authors": [
|
||||
"王新龙"
|
||||
],
|
||||
"publisher": "青苹果数据中心",
|
||||
"publishedDate": "2013-11-20",
|
||||
"description": "大宋王朝,武运国势萎弱不振,但经济繁荣,文化昌盛,政治军事与经济文化形成极其鲜明的对照,貌似不和谐地并存于一体,本书从经济、文化、科技等不同的层面重新审视两宋,试图全方位地向读者展示大宋历史的始末。",
|
||||
"industryIdentifiers": [
|
||||
{
|
||||
"type": "ISBN_13",
|
||||
"identifier": "9787104030126"
|
||||
},
|
||||
{
|
||||
"type": "ISBN_10",
|
||||
"identifier": "7104030123"
|
||||
}
|
||||
],
|
||||
"readingModes": {
|
||||
"text": true,
|
||||
"image": true
|
||||
},
|
||||
"printType": "BOOK",
|
||||
"maturityRating": "NOT_MATURE",
|
||||
"allowAnonLogging": false,
|
||||
"contentVersion": "1.1.1.0.preview.3",
|
||||
"panelizationSummary": {
|
||||
"containsEpubBubbles": false,
|
||||
"containsImageBubbles": false
|
||||
},
|
||||
"imageLinks": {
|
||||
"smallThumbnail": "http://books.google.com/books/content?id=McQdAgAAQBAJ&printsec=frontcover&img=1&zoom=5&edge=curl&source=gbs_api",
|
||||
"thumbnail": "http://books.google.com/books/content?id=McQdAgAAQBAJ&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api"
|
||||
},
|
||||
"language": "zh-CN",
|
||||
"previewLink": "http://books.google.com/books?id=McQdAgAAQBAJ&printsec=frontcover&dq=isbn:9787104030126&hl=&cd=2&source=gbs_api",
|
||||
"infoLink": "https://play.google.com/store/books/details?id=McQdAgAAQBAJ&source=gbs_api",
|
||||
"canonicalVolumeLink": "https://market.android.com/details?id=book-McQdAgAAQBAJ"
|
||||
},
|
||||
"saleInfo": {
|
||||
"country": "US",
|
||||
"saleability": "FOR_SALE",
|
||||
"isEbook": true,
|
||||
"listPrice": {
|
||||
"amount": 0.99,
|
||||
"currencyCode": "USD"
|
||||
},
|
||||
"retailPrice": {
|
||||
"amount": 0.99,
|
||||
"currencyCode": "USD"
|
||||
},
|
||||
"buyLink": "https://play.google.com/store/books/details?id=McQdAgAAQBAJ&rdid=book-McQdAgAAQBAJ&rdot=1&source=gbs_api",
|
||||
"offers": [
|
||||
{
|
||||
"finskyOfferType": 1,
|
||||
"listPrice": {
|
||||
"amountInMicros": 990000.0,
|
||||
"currencyCode": "USD"
|
||||
},
|
||||
"retailPrice": {
|
||||
"amountInMicros": 990000.0,
|
||||
"currencyCode": "USD"
|
||||
},
|
||||
"giftable": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"accessInfo": {
|
||||
"country": "US",
|
||||
"viewability": "PARTIAL",
|
||||
"embeddable": true,
|
||||
"publicDomain": false,
|
||||
"textToSpeechPermission": "ALLOWED",
|
||||
"epub": {
|
||||
"isAvailable": true,
|
||||
"acsTokenLink": "http://books.google.com/books/download/%E5%A4%A7%E5%AE%8B%E7%8E%8B%E6%9C%9D1-sample-epub.acsm?id=McQdAgAAQBAJ&format=epub&output=acs4_fulfillment_token&dl_type=sample&source=gbs_api"
|
||||
},
|
||||
"pdf": {
|
||||
"isAvailable": true,
|
||||
"acsTokenLink": "http://books.google.com/books/download/%E5%A4%A7%E5%AE%8B%E7%8E%8B%E6%9C%9D1-sample-pdf.acsm?id=McQdAgAAQBAJ&format=pdf&output=acs4_fulfillment_token&dl_type=sample&source=gbs_api"
|
||||
},
|
||||
"webReaderLink": "http://play.google.com/books/reader?id=McQdAgAAQBAJ&hl=&printsec=frontcover&source=gbs_api",
|
||||
"accessViewStatus": "SAMPLE",
|
||||
"quoteSharingAllowed": false
|
||||
},
|
||||
"searchInfo": {
|
||||
"textSnippet": "大宋王朝,武运国势萎弱不振,但经济繁荣,文化昌盛,政治军事与经济文化形成极其鲜明的对照,貌似不和谐地并存于一体,本书从经济、文化、科技等不同的层面重新审视两宋, ..."
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "books#volume",
|
||||
"id": "oMQdAgAAQBAJ",
|
||||
"etag": "6h2krng35eI",
|
||||
"selfLink": "https://www.googleapis.com/books/v1/volumes/oMQdAgAAQBAJ",
|
||||
"volumeInfo": {
|
||||
"title": "大宋王朝3",
|
||||
"subtitle": "",
|
||||
"authors": [
|
||||
"王新龙"
|
||||
],
|
||||
"publisher": "青苹果数据中心",
|
||||
"publishedDate": "2013-11-20",
|
||||
"description": "?大宋王朝,武运国势萎弱不振,但经济繁荣,文化昌盛,政治军事与经济文化形成极其鲜明的对照,貌似不和谐地并存于一体,本书从经济、文化、科技等不同的层面重新审视两宋,试图全方位地向读者展示大宋历史的始末。",
|
||||
"readingModes": {
|
||||
"text": true,
|
||||
"image": true
|
||||
},
|
||||
"printType": "BOOK",
|
||||
"maturityRating": "NOT_MATURE",
|
||||
"allowAnonLogging": false,
|
||||
"contentVersion": "2.1.1.0.preview.3",
|
||||
"panelizationSummary": {
|
||||
"containsEpubBubbles": false,
|
||||
"containsImageBubbles": false
|
||||
},
|
||||
"imageLinks": {
|
||||
"smallThumbnail": "http://books.google.com/books/content?id=oMQdAgAAQBAJ&printsec=frontcover&img=1&zoom=5&edge=curl&source=gbs_api",
|
||||
"thumbnail": "http://books.google.com/books/content?id=oMQdAgAAQBAJ&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api"
|
||||
},
|
||||
"language": "zh-CN",
|
||||
"previewLink": "http://books.google.com/books?id=oMQdAgAAQBAJ&printsec=frontcover&dq=isbn:9787104030126&hl=&cd=3&source=gbs_api",
|
||||
"infoLink": "https://play.google.com/store/books/details?id=oMQdAgAAQBAJ&source=gbs_api",
|
||||
"canonicalVolumeLink": "https://market.android.com/details?id=book-oMQdAgAAQBAJ"
|
||||
},
|
||||
"saleInfo": {
|
||||
"country": "US",
|
||||
"saleability": "FOR_SALE",
|
||||
"isEbook": true,
|
||||
"listPrice": {
|
||||
"amount": 0.99,
|
||||
"currencyCode": "USD"
|
||||
},
|
||||
"retailPrice": {
|
||||
"amount": 0.99,
|
||||
"currencyCode": "USD"
|
||||
},
|
||||
"buyLink": "https://play.google.com/store/books/details?id=oMQdAgAAQBAJ&rdid=book-oMQdAgAAQBAJ&rdot=1&source=gbs_api",
|
||||
"offers": [
|
||||
{
|
||||
"finskyOfferType": 1,
|
||||
"listPrice": {
|
||||
"amountInMicros": 990000.0,
|
||||
"currencyCode": "USD"
|
||||
},
|
||||
"retailPrice": {
|
||||
"amountInMicros": 990000.0,
|
||||
"currencyCode": "USD"
|
||||
},
|
||||
"giftable": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"accessInfo": {
|
||||
"country": "US",
|
||||
"viewability": "PARTIAL",
|
||||
"embeddable": true,
|
||||
"publicDomain": false,
|
||||
"textToSpeechPermission": "ALLOWED",
|
||||
"epub": {
|
||||
"isAvailable": true,
|
||||
"acsTokenLink": "http://books.google.com/books/download/%E5%A4%A7%E5%AE%8B%E7%8E%8B%E6%9C%9D3-sample-epub.acsm?id=oMQdAgAAQBAJ&format=epub&output=acs4_fulfillment_token&dl_type=sample&source=gbs_api"
|
||||
},
|
||||
"pdf": {
|
||||
"isAvailable": true,
|
||||
"acsTokenLink": "http://books.google.com/books/download/%E5%A4%A7%E5%AE%8B%E7%8E%8B%E6%9C%9D3-sample-pdf.acsm?id=oMQdAgAAQBAJ&format=pdf&output=acs4_fulfillment_token&dl_type=sample&source=gbs_api"
|
||||
},
|
||||
"webReaderLink": "http://play.google.com/books/reader?id=oMQdAgAAQBAJ&hl=&printsec=frontcover&source=gbs_api",
|
||||
"accessViewStatus": "SAMPLE",
|
||||
"quoteSharingAllowed": false
|
||||
},
|
||||
"searchInfo": {
|
||||
"textSnippet": "大宋王朝,武运国势萎弱不振,但经济繁荣,文化昌盛,政治军事与经济文化形成极其鲜明的对照,貌似不和谐地并存于一体,本书从经济、文化、科技等不同的层面重新审视两宋, ..."
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
{
|
||||
"kind": "books#volumes",
|
||||
"totalItems": 1,
|
||||
"items": [
|
||||
{
|
||||
"kind": "books#volume",
|
||||
"id": "LoUSHMjFmtMC",
|
||||
"etag": "DIlHxPcIxnI",
|
||||
"selfLink": "https://www.googleapis.com/books/v1/volumes/LoUSHMjFmtMC",
|
||||
"volumeInfo": {
|
||||
"title": "西洋文學導讀下冊",
|
||||
"subtitle": "",
|
||||
"publisher": "知書房出版集團",
|
||||
"publishedDate": "2000",
|
||||
"industryIdentifiers": [
|
||||
{
|
||||
"type": "ISBN_10",
|
||||
"identifier": "9570336463"
|
||||
},
|
||||
{
|
||||
"type": "ISBN_13",
|
||||
"identifier": "9789570336467"
|
||||
}
|
||||
],
|
||||
"readingModes": {
|
||||
"text": false,
|
||||
"image": true
|
||||
},
|
||||
"pageCount": 668,
|
||||
"printType": "BOOK",
|
||||
"categories": [
|
||||
"English literature"
|
||||
],
|
||||
"maturityRating": "NOT_MATURE",
|
||||
"allowAnonLogging": false,
|
||||
"contentVersion": "0.1.1.0.preview.1",
|
||||
"imageLinks": {
|
||||
"smallThumbnail": "http://books.google.com/books/content?id=LoUSHMjFmtMC&printsec=frontcover&img=1&zoom=5&edge=curl&source=gbs_api",
|
||||
"thumbnail": "http://books.google.com/books/content?id=LoUSHMjFmtMC&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api"
|
||||
},
|
||||
"language": "zh-TW",
|
||||
"previewLink": "http://books.google.com/books?id=LoUSHMjFmtMC&printsec=frontcover&dq=isbn:9789570336467&hl=&cd=1&source=gbs_api",
|
||||
"infoLink": "http://books.google.com/books?id=LoUSHMjFmtMC&dq=isbn:9789570336467&hl=&source=gbs_api",
|
||||
"canonicalVolumeLink": "http://books.google.com/books/about/%E8%A5%BF%E6%B4%8B%E6%96%87%E5%AD%B8%E5%B0%8E%E8%AE%80%E4%B8%8B%E5%86%8A.html?hl=&id=LoUSHMjFmtMC"
|
||||
},
|
||||
"saleInfo": {
|
||||
"country": "US",
|
||||
"saleability": "NOT_FOR_SALE",
|
||||
"isEbook": false
|
||||
},
|
||||
"accessInfo": {
|
||||
"country": "US",
|
||||
"viewability": "PARTIAL",
|
||||
"embeddable": true,
|
||||
"publicDomain": false,
|
||||
"textToSpeechPermission": "ALLOWED",
|
||||
"epub": {
|
||||
"isAvailable": false
|
||||
},
|
||||
"pdf": {
|
||||
"isAvailable": false
|
||||
},
|
||||
"webReaderLink": "http://books.google.com/books/reader?id=LoUSHMjFmtMC&hl=&printsec=frontcover&output=reader&source=gbs_api",
|
||||
"accessViewStatus": "SAMPLE",
|
||||
"quoteSharingAllowed": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue