Commit Graph

1522 Commits (lencrypt)

Author SHA1 Message Date
eric 4499b556c6 protect long descriptions
scraper was over-writing edited descriptions
2017-12-11 13:45:47 -05:00
eric 886068a6ee clean up after change to work id
doi and http_id were changed to work only
2017-12-10 17:05:58 -05:00
eric ebf68befeb add Springer publisher 2017-12-10 16:38:30 -05:00
eric 678474b985 do conversion before making ebf 2017-12-10 16:33:59 -05:00
eric cc1c5b6ee8 add management command 2017-12-10 16:33:07 -05:00
eric 3c7c9ade00 add Springer to get_scraper 2017-12-07 17:36:35 -05:00
eric d53b3bcc8d delint 2017-12-07 17:36:08 -05:00
eric 5ccd7a0a47 add get_role to scraper 2017-12-07 17:35:52 -05:00
eric a3f1509cc2 fix multiple editor setting 2017-12-07 17:33:29 -05:00
eric c6885ff84b fix springer descriptions 2017-12-07 16:35:11 -05:00
eric 81c3268f70 fix license url 2017-12-07 16:34:25 -05:00
eric 6bba688f03 fix kw loading 2017-12-07 16:33:53 -05:00
eric 5c3137a85d delint 2017-12-07 12:50:08 -05:00
eric 82784778c4 add springer scraper 2017-12-06 18:13:46 -05:00
eric 5f39729d74 fix doi validation 2017-12-06 18:12:46 -05:00
Raymond Yee d134ef0606 core.WorkTests.test_valid_subject were technically not working correctly because the test strings should be unicode not str 2017-11-27 12:40:03 -08:00
eric af4cac5cf8 http should be a work id 2017-11-21 15:47:02 -05:00
eric 28fa60ffba fix cover finding 2017-11-21 11:10:46 -05:00
eric a09f3907b3 add pressbooks sites, improve pubdata scraper 2017-11-20 18:05:07 -05:00
eshellman 36385ffc54
Merge pull request #719 from Gluejar/revise-new-rh
Revise new rh process and docs
2017-11-18 16:36:03 -05:00
eric ce003c5607 revise rh signup workflow 2017-11-13 15:30:00 -05:00
eric 50a0296eee add supporter facet 2017-11-08 17:29:41 -05:00
eric 96f40a8514 add rh agreement form 2017-11-07 10:43:40 -05:00
eric 98cbef7104 gather isbns from schema.org
and stop raising unwanted exceptions
2017-11-06 12:42:52 -05:00
eric 6487916adb omit review metadata 2017-11-06 12:38:06 -05:00
eric d04ebbb694 also add http ids 2017-10-30 19:52:21 -04:00
eric b5e52effd9 optimize id access
See
https://docs.djangoproject.com/en/1.11/topics/db/optimization/#use-forei
gn-key-values-directly
2017-10-28 18:33:58 -04:00
eric e5c9864c16 fix celery admin 2017-10-27 15:13:53 -04:00
eric 2a7773fafa add hathitrust scraper 2017-10-27 12:09:03 -04:00
eric 12bd17497b fix exception, refine auth parsing 2017-10-27 12:08:27 -04:00
eshellman a1ab17f150 Merge pull request #709 from Gluejar/open-edition-edit
Open edition editing
2017-10-26 13:34:10 -04:00
eric efbffa683c Open up editing privileges
keep track of who has added the work with a many-to-many table
2017-10-26 13:03:05 -04:00
eric 7e190f7e96 fix locale test
The isbn we were using has inexplicably fallen out of google books
index. now testing a zh-CN book
2017-10-26 10:44:26 -04:00
eric 86e38d08bb improve namelist parsing 2017-10-06 16:04:59 -04:00
eric f2fb171708 fix bug 2017-09-28 14:17:12 -04:00
eric 0ef4d4c297 handle " and " 2017-09-28 13:36:03 -04:00
eric fa4573a74d authlist cleaner, definition lists 2017-09-28 13:25:56 -04:00
eric 467ab8a425 add scraper selector 2017-09-27 19:20:14 -04:00
eric db03b59fb4 add code for pressbooks scraping 2017-09-27 17:54:44 -04:00
eric 2651afd02f old test book not in GB anymore 2017-09-22 18:31:06 -04:00
eric 326dc6442f tg for tests 2017-09-15 16:50:31 -04:00
eric 1ce4323bc4 precheck every new subject
fix bug with '/' in subject
interpret ';' as list delimiter
add cleaner script
2017-09-15 15:55:37 -04:00
eric 26ddf79945 add filesize to mobi ebooks 2017-09-06 18:04:09 -04:00
eric fc23d6bbab fixed issue with no ebook on ebf 2017-09-06 18:02:40 -04:00
eric 302f70c2fb bad variable reference 2017-09-04 16:10:55 -04:00
eric 5bbeb45053 improve merge_works
work_relations were not being updated
2017-09-04 16:10:24 -04:00
eric 6895302338 add OpenGraph type, title, and cover to scraper 2017-08-24 14:43:31 -04:00
eric e2e1eac41e merge works when appropriate
pandata bookloader was not merging works
2017-08-24 14:42:35 -04:00
eric e7847ae349 remove debug code 2017-08-23 12:24:04 -04:00
eric 0c687fdad4 add command to load from sitemaps 2017-08-23 12:21:56 -04:00
eric 1bd1f943f6 fix bug in edition assignment 2017-08-18 16:39:11 -04:00
eric 3993ffa04a add id links, refactor 2017-08-16 15:46:19 -04:00
eric 2a8dff4336 loader shouldn't always believe metadata 2017-08-15 16:51:35 -04:00
eric ca5d9e1053 fix edition note aignment 2017-08-09 21:14:38 -04:00
eric 22e2b8587e fix edition asignment, add doi 2017-08-08 14:06:29 -04:00
eric 2514dfa08d ebookfile admin 2017-08-08 13:08:18 -04:00
eric 8de43cfda8 set user on ebooks loaded from webpage 2017-08-08 12:38:54 -04:00
eric 0ebbb21d47 add source to EbookFile
Want to be able to avoid downloading duplicate ebooks
2017-08-08 10:02:25 -04:00
eric f9d31b0f51 fix glue resolution 2017-08-07 21:46:21 -04:00
eric 489790fa2f add ebook loading code 2017-08-07 16:17:00 -04:00
eric 389e9a1749 'format' is a built-in
test_file was not doing anything because format parameter not passed.
Didn't raise error because 'format' is a built-in function
2017-08-07 16:13:22 -04:00
eric e8bd8725cc handle edition ids better
also, allow contributor to request unglue.it id
2017-08-04 17:12:05 -04:00
eric d9979ff45b delint, pass tests 2017-08-03 17:31:12 -04:00
eric ada73a909c nits and tests 2017-08-03 17:09:42 -04:00
eric 08702a7b08 scrapes the metadata
also moves id validation to core
2017-08-03 16:15:06 -04:00
eric 7bc72692c5 add exception handling 2017-07-30 13:55:46 -04:00
eric aaef670798 add scraper for webpages
gets title, description, language

adds beautiful soup to requirements
updates gitenberg.metadata import
2017-07-29 20:46:22 -04:00
eric 05af45d13e delint 2017-07-28 12:45:17 -04:00
eric 2adf3cc7cd handle isbn and goog lookups 2017-07-27 15:13:04 -04:00
eric db97a98ae8 https 2017-07-27 10:33:13 -04:00
eric 52127faec9 put id creation at start of new edition form
this reworks the identifier creation UI
2017-07-26 17:33:38 -04:00
eric babe1a1152 also add EbookFileAdmin 2017-07-19 15:21:51 -04:00
eric 7aea18f39d make campaign admin usable 2017-07-19 14:27:07 -04:00
eric 3f9f84218e update admin style 2017-07-19 14:26:04 -04:00
eric 4cc0e0fe4f delete regluit.questionnaire 2017-06-20 11:08:14 -04:00
eric 0ea3fc1781 add get_archive method to acq.mock_ebook 2017-05-08 17:22:02 -04:00
eric d7917a24d1 add oapen to supported targets 2017-04-17 13:47:51 -04:00
eric 097d9db9b6 fix exception with missing format 2017-04-17 13:47:40 -04:00
eric f65c7735f8 handle donations for failed charges 2017-04-04 18:39:40 -04:00
Raymond Yee 5756f171dc Merge pull request #665 from Gluejar/donations
add donation box to homepage
2017-04-03 16:59:52 -07:00
eric ad8de40cd7 set filesize 2017-03-23 13:30:05 -04:00
eric fe823979fd add "order_by=none" option
in json-opds, allows a large record dump
2017-03-21 12:00:55 -04:00
eric 4cac608362 forgot to move reference 2017-03-16 11:50:10 -04:00
eric 7294a5c679 update doi regexp and display
https://www.crossref.org/display-guidelines/
2017-02-22 11:21:24 -05:00
eric 417f9eac58 add donation box to homepage 2017-02-13 13:33:26 -05:00
eric 7f5ffee7b7 more alignment 2017-02-11 21:33:32 -05:00
Raymond Yee b1ec19eb85 Merge branch 'master' into add-doab-authlist 2017-01-12 14:27:56 -08:00
eric b9053183ba passes all tests without secret keys 2016-12-30 22:26:16 -05:00
eric cf57c78686 bookloader is mocked 2016-12-30 17:24:20 -05:00
eric 31b6187a5c fix #120246845
2 isbns map to one google id
2016-12-30 10:24:01 -05:00
eric fffd5012ad api tests now run on a fixture 2016-12-29 13:44:26 -05:00
Raymond Yee 56081b643d Merge branch 'master' into open_source 2016-12-17 18:12:51 -08:00
eric 1b8a3b03a5 fix truncated image file problems
update Pillow while we're at it.
2016-12-12 21:42:29 -05:00
Raymond Yee 247e53d44a Merge branch 'master' into open_source 2016-12-07 14:34:20 -08:00
Raymond Yee b5b6b5f6ae make it easier to identify just and please in notifications 2016-12-07 14:28:18 -08:00
eric 652d9a3456 modify doab load to handle authlists
also fix a few encoding issues and null data problems resulting in
non-loading and ftp redirects
2016-12-02 15:50:07 -05:00
eric 1c52c42e60 doab author parsing and loader command 2016-11-29 15:37:02 -05:00
Raymond Yee b7f2fb196c print current work and number of covers added so far 2016-11-21 15:51:26 -08:00
eric 8a73ec6ecf management command to add missing 2016-11-18 13:47:26 -05:00
eric 671017fced pass edition to update_cover_doab 2016-11-18 13:28:59 -05:00
Raymond Yee 405af3b2e7 Merge pull request #646 from Gluejar/id-facets
Id facets
2016-11-14 11:21:40 -08:00
eric 59e92b8efc add facets for doab and gtbg 2016-11-10 16:21:57 -05:00
eric ab57985b33 expose gutenberg and doab status on work page
also, refactor id properties on work
2016-11-10 16:21:21 -05:00
eric a49be9e61f blank=True, not null=True 2016-11-09 14:55:37 -05:00
Raymond Yee 5572608b39 Merge pull request #641 from Gluejar/improve-doab-import
Improve doab import
2016-11-02 06:06:41 -07:00
eric 60e4994756 remove debugging prints 2016-11-01 13:42:40 -04:00
eric b82b51f358 forgot to re-enable error catching 2016-10-31 22:19:00 -04:00
eric 1c7df5e00e get rid of some loader issues 2016-10-28 14:40:16 -04:00
eric 39cf8c9c0b fix load errors 2016-10-27 20:05:43 -04:00
eric 8697aec989 management command to clean the db 2016-10-20 15:25:09 -04:00
eric d95f81030f add sanitization code to edition form 2016-10-20 15:24:47 -04:00
eric 182887fdc2 remove async option 2016-10-12 16:19:43 -04:00
eric 167c7fc60a update doab loader 2016-10-12 16:07:54 -04:00
eric d4f47b2a5e handle age_level in merge_works 2016-10-12 13:55:27 -04:00
eric 3ac7769656 move doab.py into loaders 2016-10-11 15:46:03 -04:00
Raymond Yee 9a15a1c832 Merge pull request #638 from Gluejar/questionnaire_export
Questionnaire export
2016-10-11 08:26:03 -07:00
Raymond Yee f7338f2276 delete core/models.py because we already have core/__init__.py 2016-10-10 15:07:14 -07:00
eric b0663d435b Merge branch 'master' into questionnaire_export 2016-10-05 15:43:51 -04:00
eric 0e7320d4e8 integrate exports into unglue.it surveys 2016-10-05 15:36:20 -04:00
eric 6c4874c3b2 tighten ebook notifications
The 0006_auto_20160818_1809 migration created inactive ebooks for
campaign books. These new ebooks triggered user notifications. Now the
new ebook notification is only sent if there's a new ebook. Also, it's
been a known issue #76568402 that we should stop notifying ebooks for
users who fave newly available ebooks.
2016-10-04 13:22:01 -04:00
eric 23439bebe8 fix missing import 2016-09-30 17:55:27 -04:00
Raymond Yee 4405b4ee73 change regluit.core.tests.BookLoaderTests.test_add_related to test whether every WorkRelation points back properly 2016-09-29 15:15:46 -07:00
Raymond Yee 2e9ff2bf1c got regluit.core.tests.BookLoaderTests.test_add_related to work now -- but have to check
with Eric to see whether it's exactly the right test
2016-09-29 15:02:27 -07:00
eric 5fc4d631ff split version into label and iter 2016-09-23 14:53:58 -04:00
Raymond Yee e8d4ab82be add comments to this migration 2016-09-22 14:28:49 -07:00
Raymond Yee 0e75a750ab an extra migration produced by `makemigrations` 2016-09-15 11:50:31 -07:00
Raymond Yee 243e7d8029 fix error:
======================================================================
ERROR: test_nix (regluit.api.tests.FeedTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/raymondyee/D/Document/Gluejar/Gluejar.github/regluit/api/tests.py", line 173, in test_nix
    r = self.client.get('/api/onix/by/')
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/site-packages/django/test/client.py", line 500, in get
    **extra)
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/site-packages/django/test/client.py", line 303, in get
    return self.generic('GET', path, secure=secure, **r)
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/site-packages/django/test/client.py", line 379, in generic
    return self.request(**r)
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/site-packages/django/test/client.py", line 466, in request
    six.reraise(*exc_info)
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/site-packages/django/views/generic/base.py", line 89, in dispatch
    return handler(request, *args, **kwargs)
  File "/Users/raymondyee/D/Document/Gluejar/Gluejar.github/regluit/api/views.py", line 208, in get
    return HttpResponse(onix.onix_feed(facet_class, max),
  File "/Users/raymondyee/D/Document/Gluejar/Gluejar.github/regluit/api/onix.py", line 25, in onix_feed
    editions = facet.facet_object.filter_model("Edition",editions).distinct()
  File "/Users/raymondyee/D/Document/Gluejar/Gluejar.github/regluit/core/facets.py", line 44, in filter_model
    return model_filter( self._filter_model(model, query_set))
  File "/Users/raymondyee/D/Document/Gluejar/Gluejar.github/regluit/core/facets.py", line 147, in edition_license_filter
    return query_set.filter(ebooks__rights=cc.ccinfo(facet_name))
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/site-packages/django/db/models/query.py", line 679, in filter
    return self._filter_or_exclude(False, *args, **kwargs)
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/site-packages/django/db/models/query.py", line 697, in _filter_or_exclude
    clone.query.add_q(Q(*args, **kwargs))
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/site-packages/django/db/models/sql/query.py", line 1310, in add_q
    clause, require_inner = self._add_q(where_part, self.used_aliases)
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/site-packages/django/db/models/sql/query.py", line 1338, in _add_q
    allow_joins=allow_joins, split_subq=split_subq,
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/site-packages/django/db/models/sql/query.py", line 1177, in build_filter
    if isinstance(value, Iterator):
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/abc.py", line 144, in __instancecheck__
    return cls.__subclasscheck__(subtype)
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/abc.py", line 180, in __subclasscheck__
    if issubclass(subclass, scls):
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/abc.py", line 161, in __subclasscheck__
    ok = cls.__subclasshook__(subclass)
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/site-packages/backports_abc.py", line 66, in __subclasshook__
    mro = C.__mro__
AttributeError: class ccinfo has no attribute '__mro__'
2016-09-12 10:42:12 -07:00
eric 64de760d63 test was non-deterministic 2016-08-26 13:10:43 -04:00
eric f2e6afc3af clean up admin 2016-08-25 17:56:16 -04:00
eric c0efbf86ea add unglueitar fix 2016-08-25 17:55:29 -04:00
eric 205af6876d fix unicode unglueitar 2016-08-25 16:02:54 -04:00
eric 5eabbbb4d2 implement versions in api 2016-08-24 15:43:28 -04:00
eric 7ad0d7f494 implemented ebook versions
It turned out that ebookfile handling needed revamping with the
addition of ebook versions; so this change turned out to be rather big.
2016-08-24 15:41:29 -04:00
eric 651f45f624 fix short authors
ordering by relation_code didn't pick up the author when ther was an
"author of introduction"
2016-08-18 15:56:25 -04:00
eric 363c86fd94 implement EditionNote 2016-08-16 17:16:44 -04:00
eric aafbd7c70b set translation relation in add_related 2016-08-16 11:42:58 -04:00
eric b3cefc2d3c implement related works 2016-08-15 18:28:39 -04:00
eric abedff089c add direct support for doi 2016-08-08 16:27:12 -04:00
eric c650c672c2 change the models 2016-08-05 15:53:29 -04:00
eric 1e7ea4b43c finish the refactor 2016-07-30 14:25:49 -04:00
eric 24c1cf8a03 refactor the models 2016-07-30 02:36:01 -04:00
eric c97888df82 pylint the models 2016-07-30 02:35:32 -04:00
eric 33a1482cc7 refactor libraryauth
try to keep all the user reg stuff in libraryauth, in prep for
splitting it off
2016-07-28 15:28:05 -04:00
eric 65007e1c9d contenttypes.generic is deprecated 2016-07-26 17:43:19 -04:00
eric 4adf6917ff refactor admin 2016-07-26 10:34:45 -04:00
eric 06d240f5e4 Fix a TypeError raised by a thanks campaign with no ebook
https://docs.djangoproject.com/en/1.9/releases/1.7/#templates
2016-07-25 13:15:53 -04:00
eric 09fe1a5d32 switch from deprecated get_model a app registry 2016-07-24 18:39:36 -04:00
eric da7b3171ce Use django's system check instead 2016-07-24 16:28:07 -04:00
eric b1e6dcec4f update tests for explicit fixture loading 2016-07-23 12:08:28 -04:00
eric 9e3fef8e9e fix models so django migrate can build an empty db 2016-07-22 18:49:19 -04:00