diff --git a/.gitignore b/.gitignore
index b9fcb214..4a693c5d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,5 +13,4 @@ logs/*
celerybeat.pid
celerybeat-schedule
.gitignore~
-static/scss/*.css
static/scss/*.css.map
diff --git a/README.md b/README.md
index 6a7c4be1..5eaf79d2 100644
--- a/README.md
+++ b/README.md
@@ -41,11 +41,13 @@ to install python-setuptools in step 1:
1. `django-admin.py celeryd --loglevel=INFO` start the celery daemon to perform asynchronous tasks like adding related editions, and display logging information in the foreground.
1. `django-admin.py celerybeat -l INFO` to start the celerybeat daemon to handle scheduled tasks.
1. `django-admin.py runserver 0.0.0.0:8000` (you can change the port number from the default value of 8000)
+1. make sure a [redis server](https://redis.io/topics/quickstart) is running
1. Point your browser to http://localhost:8000/
CSS development
-1. We are using Less version 2.8 for CSS. http://incident57.com/less/. We use minified CSS.
+1. We used Less version 2.8 for CSS. http://incident57.com/less/. We use minified CSS.
+1. New CSS development is using SCSS. Install libsass and django-compressor.
Production Deployment
---------------------
diff --git a/api/onix.py b/api/onix.py
index 8b84c1fc..6506f936 100644
--- a/api/onix.py
+++ b/api/onix.py
@@ -42,7 +42,7 @@ def header(facet=None):
header_node = etree.Element("Header")
sender_node = etree.Element("Sender")
sender_node.append(text_node("SenderName", "unglue.it"))
- sender_node.append(text_node("EmailAddress", "support@gluejar.com"))
+ sender_node.append(text_node("EmailAddress", "unglueit@ebookfoundation.org"))
header_node.append(sender_node)
header_node.append(text_node("SentDateTime", pytz.utc.localize(datetime.datetime.utcnow()).strftime('%Y%m%dT%H%M%SZ')))
header_node.append(text_node("MessageNote", facet.title if facet else "Unglue.it Editions"))
diff --git a/api/templates/api_help.html b/api/templates/api_help.html
index 02e4ba62..97fd8239 100644
--- a/api/templates/api_help.html
+++ b/api/templates/api_help.html
@@ -76,6 +76,20 @@ XML: OPDS feeds. You don't need a key to use them. The starting point is {{base_url}}{% url 'opds' %}
+ Examples: +
{{base_url}}{% url 'opds_acqusition' 'epub' %}
{{base_url}}{% url 'opds_acqusition' 'by-sa' %}
{{base_url}}{% url 'opds_acqusition' 's.open' %}
{{base_url}}{% url 'opds_acqusition' 'kw.fiction' %}
{{base_url}}{% url 'opds_acqusition' '@eric' %}
There's also an OPDS record available for every work on unglue.it. For example, requesting, {{base_url}}{% url 'opds_acqusition' 'all'%}?work=13950
get you to the web page or opds record for A Christmas Carol.
You have uploaded ebook files for this work.
{% else %} - {% ifequal work.last_campaign.type 2 %} + {% if work.last_campaign.type == 2 %}To sell ebooks as part of a buy to unglue campaign, you will need to upload an EPUB file for the ebook you want to sell.
- {% endifequal %} - {% ifequal work.last_campaign.type 3 %} + {% elif work.last_campaign.type == 3 %}To distribute ebooks as part of a thanks for ungluing campaign, you will need to upload the ebook files to unglue.it.
- {% endifequal %} + {% endif %} {% endif %} - {% endif %}Please choose the edition that most closely matches the edition to be unglued. This is the edition whose cover image will display on your book's page. Your unglued edition should be identical to this edition if possible; you should note any differences under Rights Details below.
{{ form.edition.errors }} {% for edition in campaign.work.editions.all %}Edition {{ edition.id }}: +
Edition {{ edition.id }}:
{% if ebf.active %}ACTIVE {% elif ebf.ebook.active %} MIRROR {% endif %}EPUB file: {{ebf.file}}
created {{ebf.created}} for edition {{ebf.edition_id}} {% if ebf.asking %}(This file has had the campaign 'ask' added.){% endif %}
{% if ebf.active %}{% ifequal action 'mademobi' %}A MOBI file is being generated. (Takes a minute or two.) {% else %}You can generate a MOBI file. {% endifequal %}{% endif %}
{% if ebf.active %}ACTIVE {% elif ebf.ebook.active %} MIRROR {% endif %}EPUB file: {{ebf.file}}
created {{ebf.created}} for edition {{ebf.edition_id}} {% if ebf.asking %}(This file has had the campaign 'ask' added.){% endif %}
{% if ebf.active %}{% if action == 'mademobi' %}A MOBI file is being generated. (Takes a minute or two.) {% else %}You can generate a MOBI file. {% endif %}{% endif %}
{% if ebf.active %}ACTIVE {% endif %}PDF file: {{ebf.file}}
created {{ebf.created}} for edition {{ebf.edition_id}} {% if ebf.asking %}(This file has had the campaign 'ask' added.){% endif %}
This is the license you are offering to use once the campaign succeeds. For more information on the licenses you can use, see Creative Commons: About the Licenses. Once your campaign is active, you'll be able to switch to a less restrictive license, but not a more restrictive one. We encourage you to pick the least restrictive license you are comfortable with, as this will increase the ways people can use your unglued ebook and motivate more people to donate.
{% else %} @@ -188,11 +193,11 @@ Please fix the following before launching your campaign: Once your campaign is active, you'll be able to switch to a less restrictive license, but not a more restrictive one. We encourage you to pick the least restrictive license you are comfortable with, as this will increase the ways people can use your unglued ebook and motivate more people to participate. - {% endifnotequal %} + {% endif %}This is the target price for your campaign. The minimum target is ${{form.minimum_target|intcomma}}.
@@ -209,8 +214,7 @@ Please fix the following before launching your campaign:The ending date can't be more than six months away- that's a practical limit for credit card authorizations. The latest ending you can choose right now is {{ campaign.latest_ending }}
{{ form.deadline.errors }}{{ form.deadline }} - {% endifequal %} - {% ifequal campaign.type 2 %} + {% elif campaign.type == 2 %}This is the initial revenue goal for your campaign. Once the campaign starts, the actual revenue goal will decrement every day. When your actual revenue meets your actual revenue goal, your book gets released immediately, for free, under the Creative Commons License that you've specified.
@@ -230,43 +234,40 @@ Please fix the following before launching your campaign:Before launching a campaign, you'll need to select Your initial Ungluing Date. Together with your campaign revenue goal, this will define when your book becomes "unglued". Check out the the ungluing date calculator to see how this works. Your starting Ungluing Date must be before {{ form.max_cc_date }}
{{ form.cc_date_initial.errors }}{{ form.cc_date_initial }} - {% endifequal %} - {% ifequal campaign.type 3 %} + {% elif campaign.type == 3 %} - {% endifequal %} + {% endif %} {% else %}If your campaign succeeds, you will be offering your ebook under a {{ campaign.license }} license.
{% else %}You are offering your ebook under a {{ campaign.license }} license.
- {% endifnotequal %} + {% endif %}Since your campaign is active, you may only change the license to remove restrictions. For more information on the licenses you can use, see Creative Commons: About the Licenses.
The current target revenue for your campaign is ${{ campaign.target|intcomma }}. Since your campaign is active, you may lower, but not raise, this target. You can get a feel for the interplay between revenue target and ungluing date with the the ungluing date calculator
The initial revenue goal for your campaign was ${{ campaign.target|intcomma }}; the current amount remaining is ${{ campaign.left|intcomma }}. Since your campaign is active, you may lower, but not raise, this goal. Before you change this, try different parameters with the ungluing date calculator.
The ending date of your campaign is {{ campaign.deadline }}. Your campaign will conclude on this date or when you meet your target price, whichever is earlier. You may not change the ending date of an active campaign.
This campaign was launched with a Ungluing Date of {{ campaign.cc_date_initial }}.
Based on a total revenue of {{ campaign.current_total }} the Ungluing Date has been advanced to {{ campaign.cc_date }}.
@@ -276,20 +277,19 @@ Please fix the following before launching your campaign: - {% endifequal %} - {% ifequal campaign.type 3 %} + {% elif campaign.type == 3 %} - {% endifequal %} -{% endifnotequal %} -{% ifequal campaign.type 2 %} + {% endif %} +{% endif %} +{% if campaign.type == 2 %}If you do not want Unglue.it to use digital watermarking techniques to encode a transaction number into the ebook files, uncheck this box. Either way, ebook files will be personalized; the difference is whether personalization is easy or hard to remove.
In a "thanks for ungluing" campaign, you want to first "motivate" your book- that is, you want to get the user to download the book. 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. @@ -299,40 +299,38 @@ Please fix the following before launching your campaign: {% else %}
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..
A strong ask:
- {% endifequal %} + {% endif %}Unglue.it can add your "Ask" along with a link to your book's "thank the creators" page into your ebook files. That way, people who download the book without making a contribution will be reminded that they can do it later.
This will be displayed on the More... tab for your work. It's the fine print for your campaign. {% ifequal campaign.type 1 %}Make sure to disclose any ways the unglued edition will differ from the existing edition; for example: +
This will be displayed on the More... tab for your work. It's the fine print for your campaign. {% if campaign.type == 1 %}Make sure to disclose any ways the unglued edition will differ from the existing edition; for example:
In short, is there a fact about this campaign that you think would matter to your agent or another publishing wonk, but that no one else is likely to care about? Put it here. If your campaign doesn't have any fine print, you can leave this blank.
{{ form.details.errors }}{{ form.details }} @@ -359,12 +357,12 @@ Please fix the following before launching your campaign:If you are set up as an unglue.it publisher (send us a url, logo, description and list of ways your name might appear) you can link your campaign by selecting the publisher here:
{{ form.publisher.errors }}{{ form.publisher }}
{% endif %} - {% ifequal campaign_status 'ACTIVE' %} + {% if campaign_status == 'ACTIVE' %}ebook files for this work need to be loaded!
@@ -476,10 +473,10 @@ Please fix the following before launching your campaign: {% endfor %}When a contribution>$1 is made by a library, the library's verified users on unglue.it are not asked to make another contribution.
Before you hit launch:
@@ -494,47 +491,45 @@ Please fix the following before launching your campaign: {% else %} - {% ifequal campaign.type 1 %} + {% if campaign.type == 1 %}Please make sure you've selected your campaign's edition and entered its description, funding goal, deadline, premiums, and previewed your campaign, before launching.
- {% endifequal %} - {% ifequal campaign.type 2 %} + {% elif campaign.type == 2 %}Please make sure you've selected your campaign's edition and entered its description, funding goal, initial ungluing date, prices, and previewed your campaign, before launching.
Buy To Unglue campaigns can't be launched until ebook files have been loaded and pricing has been set and made active
- {% endifequal %} - {% ifequal campaign.type 3 %} + {% elif campaign.type == 3 %}Please make sure you've selected your campaign's edition and entered its description and previewed your campaign, before launching.
Thanks for Ungluing campaigns can't be launched until ebook files have been loaded and a suggested contribution has been set
- {% endifequal %} + {% endif %} {% endif %}When you're logged in, the "Ungluers" tab on the campaign page 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 sample acknowledgement page. -After your campaign succeeds, you can used this page to generate epub code for the acknowledgements section of your unglued ebook. -
+{% if campaign.type == 1 %} +When you're logged in, the "Ungluers" tab on the campaign page 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 sample acknowledgement page. + After your campaign succeeds, you can used this page to generate epub code for the acknowledgements section of your unglued ebook. +
{% else %} -{% comment %}This might be a good place to put a sales report. {% endcomment %} -{% endifequal %} + {% comment %}This might be a good place to put a sales report. {% endcomment %} +{% endif %} {% endif %}