slurdge/goeland

Max number of characters from article

djm1 opened this issue · 11 comments

djm1 commented

Would it be possible to add a filter which will limit the max number of characters which will be put to email message from article in RSS feed?

In different wording, the article from RSS feed have 5000 characters. In current version of goeland, the whole article text will be placed in email message. My target is to have a possibility to limit the number of characters, which will be placed in email message.

Example email message:
Article title #1
Text of article #1 limited to 100 characters.

Article title #2
Text of article #2 limited to 100 characters.

Please let me know if there are more details or different description is required.

Thank you

Good idea! Do you have an example of a RSS feed with such 5000 characters ?

djm1 commented

I added a filter limitwords(numwords) which should satisfy you. Also ,the new 'toc' filter would solve point1.

djm1 commented
djm1 commented

For question 2, you need to add the digest filter. A toc is only meaningful if several entries are sent together.
For question 3, it is a bug, you can explicitly set encryption = tls in your config file to fix it for now.
@slurdge you shouldn't put other cases with the default one on the switch statement for the default encryption, you also do not need breaks: https://go.dev/play/p/o805tiStWTm

djm1 commented

Hello @djm1 , thanks for the report. Please in the future open 1 issue per problem, it's easier for us to sort out.

  1. filters = ["unseen", "includelink", "digest(4)", "toc"]
    You should put digest after toc. Like this: filters = ["unseen", "includelink", "toc", "digest"]
    I'm not sure why you use (4) as a indent level, that creates h4 but that's maybe what you want.
  2. Yes encryption is a bug, I'll fix it. I wasn't unaware there is no fall through for cases.
djm1 commented

Please try https://github.com/slurdge/goeland/releases/tag/v0.12.1 release for SSL errors. Thanks !

djm1 commented