Permalink
Browse files

Complete refactoring

Removed everything but the core wiqi functionality. Everything else
moved to Qwyre repo.
  • Loading branch information...
turukawa committed Apr 8, 2016
1 parent 908aea2 commit 2ab630da1271807e023ab2aabeed60b233b0e07c
Showing with 886 additions and 3,952 deletions.
  1. +678 −0 LICENCE
  2. +9 −0 manifest.in
  3. +22 −25 readme.md
  4. BIN requirements.txt
  5. +38 −0 setup.py
  6. 0 whyqd/novel/__init__.py
  7. +0 −20 whyqd/novel/admin.py
  8. +0 −48 whyqd/novel/forms.py
  9. +0 −86 whyqd/novel/migrations/0001_initial.py
  10. +0 −20 whyqd/novel/migrations/0002_token_stripe_id.py
  11. +0 −20 whyqd/novel/migrations/0003_novel_show_charge.py
  12. +0 −19 whyqd/novel/migrations/0004_auto_20150226_1256.py
  13. +0 −27 whyqd/novel/migrations/0005_auto_20160322_1756.py
  14. 0 whyqd/novel/migrations/__init__.py
  15. +0 −3 whyqd/novel/models/__init__.py
  16. +0 −234 whyqd/novel/models/novels.py
  17. +0 −154 whyqd/novel/models/token.py
  18. +0 −15 whyqd/novel/templates/novel/administer_novel.html
  19. +0 −49 whyqd/novel/templates/novel/buy_novel.html
  20. +0 −88 whyqd/novel/templates/novel/create_novel.html
  21. +0 −47 whyqd/novel/templates/novel/docxtract.html
  22. +0 −20 whyqd/novel/templates/novel/download_novel.html
  23. +0 −169 whyqd/novel/templates/novel/issue_tokens.html
  24. +0 −121 whyqd/novel/templates/novel/price_novel.html
  25. +0 −147 whyqd/novel/templates/novel/redeem_token.html
  26. +0 −15 whyqd/novel/templates/novel/test_novel.html
  27. +0 −25 whyqd/novel/templates/novel/user_account.html
  28. +0 −85 whyqd/novel/templates/novel/view_chapters.html
  29. 0 whyqd/novel/templatetags/__init__.py
  30. +0 −57 whyqd/novel/templatetags/novel_tags.py
  31. +0 −69 whyqd/novel/urls.py
  32. +0 −625 whyqd/novel/views.py
  33. +1 −1 whyqd/snippets/diff2merge.py
  34. +1 −1 whyqd/static/css/whyqd_theme.min.css
  35. +5 −4 whyqd/static/js/jquery.whyqd.buy.js
  36. +15 −4 whyqd/static/js/jquery.whyqd.docx.js
  37. +5 −27 whyqd/templates/base.html
  38. +0 −26 whyqd/templates/mail/gift_lend.txt
  39. +0 −30 whyqd/templates/mail/gift_purchase.txt
  40. +0 −23 whyqd/templates/mail/issue_lend.txt
  41. +0 −31 whyqd/templates/mail/issue_purchase.txt
  42. +0 −34 whyqd/templates/mail/purchase.txt
  43. +0 −19 whyqd/templates/mail/refund.txt
  44. +0 −16 whyqd/templates/mail/test_mail.txt
  45. +0 −46 whyqd/templates/wiqinav.html
  46. +2 −7 whyqd/templates/wrapper.html
  47. +2 −57 whyqd/urls.py
  48. 0 whyqd/usr/__init__.py
  49. +0 −11 whyqd/usr/admin.py
  50. +0 −10 whyqd/usr/forms.py
  51. +0 −57 whyqd/usr/migrations/0001_initial.py
  52. +0 −43 whyqd/usr/migrations/0002_auto_20160322_1756.py
  53. 0 whyqd/usr/migrations/__init__.py
  54. +0 −116 whyqd/usr/models.py
  55. +0 −16 whyqd/usr/urls.py
  56. +0 −81 whyqd/usr/views.py
  57. +1 −1 whyqd/wiqi/forms.py
  58. +45 −37 whyqd/wiqi/migrations/0001_initial.py
  59. +0 −26 whyqd/wiqi/migrations/0002_auto_20150210_0848.py
  60. +0 −28 whyqd/wiqi/migrations/0003_auto_20160322_1756.py
  61. +0 −25 whyqd/wiqi/migrations/0004_auto_20160330_0955.py
  62. +0 −20 whyqd/wiqi/migrations/0005_auto_20160330_0957.py
  63. +16 −25 whyqd/wiqi/models/base.py
  64. +7 −3 whyqd/wiqi/models/text.py
  65. +0 −94 whyqd/wiqi/templates/wiqi/about.html
  66. +1 −9 whyqd/wiqi/templates/wiqi/edit_text.html
  67. +0 −312 whyqd/wiqi/templates/wiqi/legal.html
  68. +0 −84 whyqd/wiqi/templates/wiqi/manage.html
  69. +0 −69 whyqd/wiqi/templates/wiqi/resellers.html
  70. +2 −70 whyqd/wiqi/templates/wiqi/view_text.html
  71. +1 −13 whyqd/wiqi/urls.py
  72. +30 −163 whyqd/wiqi/views.py
  73. +5 −125 whyqd/wiqi/wiqi.py
678 LICENCE

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,9 @@
include LICENCE
include README.rst
include requirements.txt
recursive-exclude whyqd *.pyc
recursive-exclude whyqd/media *
recursive-exclude whyqd/static *
recursive-exclude whyqd/templates *
recursive-include whyqd/wiqi *.py *.html
recursive-include whyqd/snippets *.py
@@ -5,47 +5,44 @@ Whyqd is an extensible object-based wiki bringing revision control, content pres

Features:

- HTML-based presentation of complete novel;;
- Import novel source DOCX and convert to individual HTML pages for each chapter;
- Price and set permissions for each chapter (as open, login or own);
- Structure the Contents page;
- Manage currency conversion, sales and distribution of the novel, including refunds;
- Create one-time / time-limited download tokens for distribution;
- Manage marketing and distribution of free review copies by author;
- Fully-implemented a text wiki, with a base wiqi for developing other types of wiki;
- Wiki can be branched, as well as the usual tools for version control;

In the future, Whyqd will allow:
Whyqd is written in Python and Django, with Jquery for the client side.

- Online creation and editing of a novel;
- Online conversion of HTML pages into epub, mobi and pdf ebooks;
- Readers can fork, change and re-release books they buy;
Quick start
-----------

Whyqd allows content creators to publish and sell via a personal demand pricing model (e.g. the further a user reads into your novel, the higher the final price will be), and allow users to remix and republish the content after they've bought it.
1. Add "whyqd" to your INSTALLED_APPS setting like this::

Remixing means that users could translate a novel, write their own fan-fiction, or expand on existing work all without having to do more than start editing.
`INSTALLED_APPS = [
...
'whyqd',
]`

Whyqd is written in Python and Django, with Jquery for the client side.
2. Include the whyqd URLconf in your project urls.py like this::

`url(r'^wiqi/', include('whyqd.urls')),`

3. Run `python manage.py migrate` to create the whyqd models.

4. Start the development server and visit http://127.0.0.1:8000/create/
to create your first Text wiqi.

5. Visit http://127.0.0.1:8000/ to view the list of wiqis.

Roadmap
-------

##### Current version (0.2):

- Updated libraries to latest (Django 1.9);
- Deprecated Mandrill, since they no longer offer this service, and replaced with Django mail;
- Text pages can have custom class defined in div;
- Imported DOCX can set a default price for each chapter;

##### Previous version (0.1):

- The following wiqi objects are supported: Text, Images (not live), Maps (not live, handlers still to be written);
- [Facebook auth system](https://github.com/tschellenbach/Django-facebook) along with per-object permissions;
- A "book" model so that individual texts can be arranged as a single work;
- Book management system (shuffling order of chapters);
- Integration of python-docx for upload of Docx files;
- [Stripe](https://stripe.com/gb) integration to support author sales of books;
- [AWS Boto](https://github.com/boto/boto) integration for S3 time-limited download of books;
- [Open Exchange Rates](https://openexchangerates.org/) for currency conversion;
- [Mandrill](https://mandrill.com/) integration for distributed mail;

##### Next steps:

@@ -59,7 +56,7 @@ While maintaining the ability to publish only a single book, the next version sh

##### Long-term roadmap:

Once the basic system is up and stable, then adding in new wiqi objects to support a much richer environment of book creation, including technical textbooks. I would also like the software to handle multiple books (requiring a search interface and a completely different approach to presenting the content).
Once the basic system is up and stable, then adding in new wiqi objects to support a much richer environment of book creation, including technical textbooks.

There's a long way to go and I would be grateful for code review and forks.

@@ -73,6 +70,6 @@ My thanks to everyone, too numerous across the community of coders, are offered
License
-------

Whyqd is copyright Gavin Chait and [Whythawk](http://www.whythawk.com). The software is released under the [GNU Affero General Public License](http://www.gnu.org/licenses/agpl-3.0.html). All visual and design elements are copyright Gavin Chait. The Red Maple image is copyright [Rodd Halstead](http://www.gettyimages.co.uk/detail/photo/red-maple-fruit-samara-royalty-free-image/89736283).
Whyqd is copyright Gavin Chait and [Whythawk](http://www.whythawk.com). The software is released under the [GNU Affero General Public License](http://www.gnu.org/licenses/agpl-3.0.html). All visual and design elements are copyright Gavin Chait.

The **personal demand pricing** approach adopted here is similar to that in use by airlines, congestion charging in cities, and is documented extensively (cf. peak pricing, demand pricing, Pareto efficiency, etc.). It is not patented and this implementation serves as prior art for anyone wanting to implement such a system in their own publication platform.
BIN -96 Bytes (86%) requirements.txt
Binary file not shown.
@@ -0,0 +1,38 @@
import os
from setuptools import find_packages, setup

print os.path.dirname('__file__')
print os.path.join(os.path.dirname('__file__'), 'README.rst')

with open(os.path.join(os.path.dirname('__file__'), 'README.rst')) as readme:
README = readme.read()

# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath('__file__'), os.pardir)))

# Info from http://stackoverflow.com/a/11669299

setup(
name='whyqd',
version='0.2',
packages=find_packages(),
include_package_data=True,
license='GNU Affero General Public License',
description='Whyqd is an extensible object-based wiki bringing revision control, content presentation, branching and embedding to any type of digital object.',
long_description=README,
url='https://github.com/turukawa/whyqd',
author='Gavin Chait',
author_email='gchait@whythawk.com',
classifiers=[
'Environment :: Web Environment',
'Framework :: Django',
'Framework :: Django :: 1.9',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Affero General Public License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
],
)
No changes.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 2ab630d

Please sign in to comment.