-
-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RSS for shelves #3013
Open
mattkatz
wants to merge
24
commits into
bookwyrm-social:main
Choose a base branch
from
mattkatz:rss-for-shelves
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
RSS for shelves #3013
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
856737e
working rss feed for shelves
4ae0dbd
add a failing test for rss feeds for shelves
c142e38
fix linting issue
f665aea
fixed method without docstring
339298c
Mock activitystreams add_book_statuses_task
d3d5f1b
remove duplicate sitesettings error
7a25869
Merge branch 'main' into rss-for-shelves
jaschaurbach 7b388ae
Sort RSS Feed by Shelved date
mattkatz 3754af7
/rss shouldn't be optional in the rss route
mattkatz a2e41fa
/rss shouldn't be optional in the rss route
mattkatz 975c3ba
Correct docstring on rss feed
mattkatz e3ca543
Remove extraneous function
5b8e083
use privacy__in to respect shelf privacy settings
63d6486
Merge branch 'main' into rss-for-shelves
mattkatz 6976cb4
add user name to shelf rss feed title
mattkatz cd29b44
improve shelf rss description
mattkatz 1d8bd2b
add translation usage
09d857e
support same identifiers as book page in rss
1e14d63
Missing brackets and correct blocktrans usage
dato 5340ed3
Drop `default` filter in favor of per-metadata item conditionals
dato 8dc412c
remove pure_name since it only applies to statuses
a0d15cc
Don't show a colon if there is no author_text
74e2103
handle cases where edition has no author
98724df
use display_name to avoid name rendering as None
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{% load i18n %} | ||
{% blocktrans trimmed with book_title=obj.title book_author=obj.author_text %} | ||
‘{{ book_title }}’{% if book_author %} by {{ book_author }}{% endif %} | ||
{% endblocktrans %} | ||
{{obj.description|default:""}} | ||
{% if obj.isbn_13 %}{% trans "ISBN 13:" %} {{ obj.isbn_13 }}{% endif %} | ||
{% if obj.oclc_number %}{% trans "OCLC Number:" %} {{ obj.oclc_number }}{% endif %} | ||
{% if obj.asin %}{% trans "ASIN:" %} {{ obj.asin }}{% endif %} | ||
{% if obj.aasin %}{% trans "Audible ASIN:" %} {{ obj.aasin }}{% endif %} | ||
{% if obj.isfdb %}{% trans "ISFDB ID:" %} {{ obj.isfdb }}{% endif %} | ||
{% if obj.goodreads_key %}{% trans "Goodreads:" %} {{ obj.goodreads_key }}{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be a blocker because it seems to be a bit difficult to manage embedded HTML in the Django syndication framework, but I noticed this just runs on without line breaks so it renders like
Title of Book by Jo Bloggs Here is a description of the book
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what to do here.
If I could figure out how to trigger a cdata block, we could do something to embed new lines.
This seems like an approach someone got working, if it makes sense to you, I can take a swing at it.
https://nemecek.be/blog/33/how-to-create-rss-feed-with-html-content-in-django
For my purposes, I'm very interested in getting the book ISBN and other identifiers in as raw a format as possible, but I'd like to make sure this feed is useful and looks good for humans in a feed reader.
When I look at how other book tracking sites handle this, they use the cdata block pretty liberally.
They also just introduce custom elements like isbn and asin directly in the feed. Which doesn't seem valid xml but it seems not to blow anything up.
I'm not ready to dedicate myself just yet to implementing a custom feed generator as described in https://docs.djangoproject.com/en/5.0/ref/contrib/syndication/#custom-feed-generators
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw @hughrun - this is listed as a blocking change I think - assuming I'm not misreading githubs UI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take a look at this shortly.