Skip to content
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

Entry.raw_text function #553

Open
fluffy-critter opened this issue Oct 24, 2023 · 0 comments
Open

Entry.raw_text function #553

fluffy-critter opened this issue Oct 24, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@fluffy-critter
Copy link
Collaborator

Expected Behavior

It would be extremely useful to have a raw_text property on entries, to be able to more efficiently do things like:

{% if 'amzn.to' in entry.raw_text %}Some links may earn me a commission.{% endif %}

or the like.

Current Behavior

You can only do string manipulation on the already-processed entry body + more, which requires more processing that will just be discarded, especially for entries which have images.

Possible Solution

class Entry:
   ...
   @cached_property
   def raw_text(self):
      return self._message.get_payload()

Steps to Reproduce (for bugs)

Context

@fluffy-critter fluffy-critter added the enhancement New feature or request label Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant