Commit graph

6953 commits

Author SHA1 Message Date
Bart Schuurmans bd95bcd50b Add test for special character in cover filename 2024-03-25 18:14:45 +01:00
Bart Schuurmans f721289b1d Simplify logic for rendering user exports 2024-03-25 18:14:45 +01:00
Bart Schuurmans a51402241b Refactor creation of user export archive 2024-03-25 18:14:45 +01:00
Bart Schuurmans e0decbfd1d Fix urlescaped relative path to cover image in export
Fixes #3292
2024-03-25 17:59:39 +01:00
Bart Schuurmans aee8dc16af Fix pylint warning 2024-03-24 13:27:01 +01:00
Bart Schuurmans 5bd66cb3f7 Only generate signed S3 link to user export when user clicks download 2024-03-24 13:08:33 +01:00
Bart Schuurmans ab7b0893e0 User exports: handle files that no longer exist on file storage 2024-03-24 12:47:26 +01:00
Bart Schuurmans 471233c1dc Use different export job fields for the different storage backends
This way, the database definition is not depdendent on the runtime configuration.
2024-03-24 12:46:42 +01:00
Bart Schuurmans a770689245 Merge branch 'main' into user-export 2024-03-24 12:07:14 +01:00
Bart Schuurmans 69f464418d Remove problematic migration
This migration is dependent on the runtime configuration (.env); a structural fix will follow.
2024-03-24 12:06:44 +01:00
Hugh Rundle 03587dfdc7
migrations 2024-03-24 20:56:20 +11:00
Hugh Rundle dd27684d4b
set signed s3 url expiry with env value
Adds S3_SIGNED_URL_EXPIRY val to .env and settings (defaults to 15 mins)
Note that this is reset every time the user loads the exports page
and is independent of the _creation_ of export files.
2024-03-24 20:53:49 +11:00
Bart Schuurmans 592914dc91 Render series number with comma and outside of link on book page 2024-03-23 19:51:20 +01:00
Bart Schuurmans 2915133223
Merge branch 'main' into book-series-3256 2024-03-23 19:37:07 +01:00
Bart Schuurmans 2d2ccd51df Factor out book series info into separate template 2024-03-23 19:35:24 +01:00
Bart Schuurmans 4a690e675a BookDataModel: add dry_run argument to merge_into 2024-03-23 19:28:57 +01:00
Bart Schuurmans fb82c7a579 Add test for merging authors 2024-03-23 19:28:57 +01:00
Bart Schuurmans 6f191acb27 BookDataModel: fix absorbing data from array and partial date fields 2024-03-23 19:28:57 +01:00
Bart Schuurmans 7fb079cb43 PartialDate: fix __eq__ method 2024-03-23 19:28:57 +01:00
Bart Schuurmans 7066e2815b BookDataModel.merge_into: return and log absorbed fields 2024-03-23 19:28:57 +01:00
Bart Schuurmans e04cd79ff8 Redirect to new URL when a merged object is requested 2024-03-23 19:28:57 +01:00
Bart Schuurmans 5e123972e8 BookDataModel: implement merge_into method 2024-03-23 19:28:57 +01:00
Bart Schuurmans b3753ab6da Add MergedBookDataModel 2024-03-23 19:28:57 +01:00
Bart Schuurmans b8995bd4b1 Add tests for author search 2024-03-23 19:26:51 +01:00
Bart Schuurmans 769d9726e5 Add book search test cases for author aliases 2024-03-23 19:26:51 +01:00
Bart Schuurmans 36222afa79 Switch author search from TrigramSimilarity to SearchQuery 2024-03-23 19:26:51 +01:00
Bart Schuurmans 0795b4d171 Include Author aliases in Book search vector 2024-03-23 19:26:51 +01:00
Bart Schuurmans 2de35f3fc7 Calculate Author search vector with name and aliases 2024-03-23 19:26:51 +01:00
Mouse Reeve bac52eef3e
Merge pull request #3275 from ccamara/wikidata
Add wikidata field for authors
2024-03-23 08:12:09 -07:00
Mouse Reeve 5b71e94888
Merge branch 'main' into user-export 2024-03-23 07:55:46 -07:00
Mouse Reeve a914a44fba
Removes unnecessary redeclaration of wikidata model field in Author 2024-03-23 07:54:54 -07:00
Mouse Reeve 8e088a6d53
Merge branch 'main' into switch_edition_invalidate_active_shelves 2024-03-23 07:53:24 -07:00
Mouse Reeve 21f75da75e
Merge pull request #3328 from Minnozz/escape-query-in-link
Escape search query in generated URLs
2024-03-23 07:46:04 -07:00
Mouse Reeve 20db968315
Merge pull request #3322 from Minnozz/fix-font-download
Fix font download
2024-03-23 07:36:43 -07:00
Bart Schuurmans c3d25c59c5 Escape search query in generated URLs
Otherwise, a query containing '&' or other special characters results in a broken URL.
2024-03-21 16:48:34 +01:00
Bart Schuurmans 4ca52c0b38
Merge branch 'main' into trigger_migrations 2024-03-20 11:47:54 +01:00
Bart Schuurmans 6a87713f9f Recalculate all book search vectors after fixing the author trigger 2024-03-20 11:45:12 +01:00
Bart Schuurmans f423834bd0 Catch the correct exception type from Pillow 2024-03-19 12:42:52 +01:00
Bart Schuurmans 7690247ab4 Font download: log the exact error 2024-03-18 20:34:47 +01:00
Bart Schuurmans 3367b20965 Font download: destination dir is allowed to exist
Without this argument, an existing directory (but not the file) causes an error.
2024-03-18 20:23:31 +01:00
Adeodato Simó a6dc5bd13f
Make get_file_size robust against typing errors 2024-03-18 15:03:07 -03:00
Adeodato Simó 518da3b9cf Merge from main into 'user-export'
Conflicts:
	bookwyrm/models/bookwyrm_export_job.py
	requirements.txt
2024-03-18 14:47:34 -03:00
Adeodato Simó 2cf7ed477d Consolidate test_posgres.py into test_book_search.py
These are tests I missed when first writing trigger tests in
test_book_search.py.
2024-03-17 22:38:44 -03:00
Adeodato Simó cceccd1ecf
Merge from main into 'trigger_migrations'
Conflicts:
	requirements.txt
2024-03-17 21:54:15 -03:00
Adeodato Simó 90bd893568 Fix remaining instances of bad-classmethod-argument 2024-03-17 21:28:55 -03:00
Adeodato Simó e2c9ea3cd2 Fix instances of bad-classmethod-argument in recently edited files 2024-03-17 21:28:55 -03:00
Adeodato Simó 4b9fe0af0c Remove nesting in several with..patch calls 2024-03-17 20:57:39 -03:00
Adeodato Simó 1b9e0546e6 Bracket-wrap calls to patch() for better readability 2024-03-17 20:34:12 -03:00
Bart Schuurmans 0282e20b89
Merge branch 'main' into book-series-3256 2024-03-16 11:23:40 +01:00
Mouse Reeve a3465e6154
Merge pull request #3303 from MaggieFero/main
Upgrade Python Version and Several Other Packages for Security
2024-03-13 15:28:54 -07:00
Mouse Reeve b68a4cc392
Merge branch 'main' into filelink-duplicate-check 2024-03-09 07:37:26 -08:00
Mouse Reeve 6dfb5000cc
Merge pull request #3305 from dato/export_catch_missing_key_icon
json_export: also detect absent "icon" key
2024-03-09 07:37:14 -08:00
Bart Schuurmans 8d018b872f FileLinkForm: fix duplicate check 2024-03-09 15:49:42 +01:00
Adeodato Simó 9e7b040b73
Fix shelving date changing when changing editions (#3193)
Merged from  from jakejack13/switch-edition
Fixes: #3139.
2024-03-03 18:48:04 -03:00
Adeodato Simó 09c3d9c0dc
json_export: also detect absent "icon" key 2024-03-03 18:42:27 -03:00
Mouse Reeve dd9d68c97d
Merge pull request #3096 from bookwyrm-social/image-ap-serialization
Changes to how images are serialized
2024-03-02 18:58:08 -08:00
Margaret Fero d138395c75 Add linter exclusion for TBookWyrmModel 2024-03-02 17:43:49 -08:00
Margaret Fero 91fe4ad535 Fix spacing for linter 2024-03-02 17:31:16 -08:00
Margaret Fero 9fa09d5ebe Add extra space required by linter 2024-03-02 17:30:37 -08:00
Margaret Fero 39da471f79 Disable Pylint Failure for imghdr deprecation for now 2024-03-02 15:59:17 -08:00
Margaret Fero 50b811d9aa
Typo fix
Add a comma
2024-03-01 20:11:14 -08:00
Margaret Fero 1ae9870862
Add timeout to base_activity.py
An instance of requests.get was missing a timeout; this commit adds a timeout of 15 as used in other places in this codebase which already have timeouts.
2024-03-01 20:02:40 -08:00
Margaret Fero db97d76a24
Add timeout to isbn.py
An instance of requests.get in isbn.py lacks a timeout, and this commit adds one with a default of 15 as used other places in the code, where requests.get does already have a timeout.
2024-03-01 19:58:11 -08:00
Mouse Reeve 2c59908ddd
Merge branch 'main' into export-fixes 2024-02-29 16:10:20 -08:00
Mouse Reeve ec52460f02
Merge pull request #3274 from Minnozz/author-search
Add search for author
2024-02-29 15:55:12 -08:00
Adeodato Simó e6b6bd648d
Merge branch 'main' into move-ratings-and-reviews-when-switching-editions 2024-02-21 18:42:18 -03:00
Mouse Reeve 9d7965780d
Merge pull request #3285 from polarbirke/fix-label-input-association-for-shelves-filter
Fix label and input association for shelves filter
2024-02-20 16:56:57 -08:00
Mouse Reeve 8f537ef56a Adds missing migration for Korean locale 2024-02-20 16:45:16 -08:00
Mouse Reeve 6163e1a6be
Merge pull request #3283 from NetspherePub/ko_KR
Add Korean (ko-kr) to LANGUAGES and locale.
2024-02-20 16:44:31 -08:00
Ross Chapman dd1999eb8e
Adds view tests for shelf filters (#3162)
* Adds test file

* Adds success assertion

* Updates tests

* Updates shelf books creation

* Updates assertion to use isbn for Edition model

* Updates query

* trigger workflow test

* Updates validate_html

* Updates comment and test

* Fixes none test

* Adds management command to clear all deleted user data

* Adds success message

---------

Co-authored-by: Mouse Reeve <mousereeve@riseup.net>
Co-authored-by: Mouse Reeve <mouse.reeve@gmail.com>
2024-02-20 16:25:01 -08:00
Søren Birkemeyer 4c0d5ede86 Fix label and input association for shelves filter
This PR correctly associates label and text input of the shelves
filter via for- and id-attributes. With the association in place,
the aria-label can be removed (the label will be announced by
assistive software when the input is focused). This also fixes the
issue that the aria-label was not translated, whereas the label is.
2024-02-10 16:24:52 +00:00
FoW ddd13a3e2e Add Korean (ko-kr) to LANGUAGES and locale 2024-02-10 16:17:25 +09:00
Hugh Rundle 46a158d701
Merge branch 'main' into export-fixes 2024-02-06 18:31:19 +11:00
Carlos Camara 89d8537e1b Add wikidata field to author's template 2024-02-05 22:08:34 +00:00
Carlos Cámara 71f527eb1b
Merge branch 'main' into wikidata 2024-02-04 20:34:51 +01:00
Adeodato Simó 4a9d69e169
Support DATA_UPLOAD_MAX_MEMORY_MiB, only, in .env
Since arithmetic is not allowed in .env files, a change in unit for
the variable seems most usable.
2024-02-04 15:34:04 -03:00
Carlos Cámara 6ac38564e2 Add wikidata field for authors 2024-02-03 22:55:33 +00:00
Bart Schuurmans 6c9ca0bf19 Add search for author 2024-02-03 21:55:46 +01:00
Mouse Reeve 748c934986 Merge migrations upon merge migrations 2024-02-03 08:20:12 -08:00
Mouse Reeve f7580c59a5 Merge branch 'main' into check-version-number 2024-02-03 08:19:46 -08:00
Mouse Reeve 4e2b8af147 Adds merge migration 2024-02-03 08:02:51 -08:00
Mouse Reeve 48f8ee57a6 Merge branch 'main' into check-version-number 2024-02-03 08:02:15 -08:00
Mouse Reeve faf45cf956
Merge pull request #3273 from bookwyrm-social/WesleyAC-freeform-page-number
Allow page numbers to be text, instead of integers
2024-02-03 08:00:34 -08:00
Mouse Reeve a1ac9494b2 Allow admins to un-schedule tasks 2024-02-03 08:00:07 -08:00
Mouse Reeve 6d5752fb4e Adds merge migration for page numbering fix 2024-02-03 07:40:23 -08:00
Mouse Reeve 37aa7ad2f6 Merge branch 'freeform-page-number' of github.com:WesleyAC/bookwyrm into WesleyAC-freeform-page-number 2024-02-03 07:38:02 -08:00
Mouse Reeve e0667c6a03
Merge pull request #3237 from Minnozz/status-title-description
Improve OpenGraph tags for status and book pages
2024-02-03 07:37:00 -08:00
Mouse Reeve 103da863c4
Merge pull request #3239 from Minnozz/user-agent
Replace python-requests with BookWyrm in user agent
2024-02-03 07:27:58 -08:00
Mouse Reeve fa66284000
Merge pull request #3253 from skobkin/patch-autocomplete-fictionbook-format
Adding FictionBook format ("FB2", "FB3") to autocomplete options in "get a copy" block.
2024-02-03 07:26:58 -08:00
Mouse Reeve 0f0420ce04
Merge pull request #3257 from dato/prefer_shared_inbox
Use shared inboxes for mentions too
2024-02-03 07:25:51 -08:00
Mouse Reeve 438d88d8d4
Merge pull request #3260 from bSolt/fix-widths-2023
Fix awkward layout for tablets on /confirm-email, /login, /invite, and /preferences/reactivate
2024-02-03 07:18:35 -08:00
Mouse Reeve 5f2f321ed5
Merge branch 'main' into export-fixes 2024-02-03 07:04:05 -08:00
Mouse Reeve 45cc3dc979
Merge pull request #3249 from dato/cookie_age_setting
Set SESSION_COOKIE_AGE from environment
2024-02-03 07:03:12 -08:00
Mouse Reeve 9c5f6c527b
Fixes translation tags 2024-02-03 06:51:23 -08:00
Jacob Kerr 2ba7dff845 Fixed shelving date changing when changing editions 2024-01-30 16:53:59 -05:00
Hugh Rundle 3675a4cf3f
disable user exports if using azure 2024-01-29 14:28:30 +11:00
Hugh Rundle 5f7be848fc
subclass boto3 session instead of adding new env value
Thanks Dato!
2024-01-29 14:10:36 +11:00
Hugh Rundle f96ddaa3e1
Merge pull request #3 from dato/export_job_inject_aws_endpoint_setting
Subclass boto3.Session to use AWS_S3_ENDPOINT_URL
2024-01-29 13:49:45 +11:00
Hugh Rundle adff3c4251
allow user exports with s3
also undoes a line space change in settings.py to make the PR cleaner
2024-01-29 13:45:35 +11:00
Hugh Rundle 765fc1e43d
fix tests 2024-01-29 12:28:37 +11:00