[GH-ISSUE #74] Max number of characters from article #24

Closed
opened 2026-09-29 12:58:42 +00:00 by slurdge · 11 comments
Owner

Originally created by @djm1 on GitHub (Oct 20, 2022).
Original GitHub issue: https://github.com/slurdge/goeland/issues/74

Originally assigned to: @slurdge on GitHub.

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

Originally created by @djm1 on GitHub (Oct 20, 2022). Original GitHub issue: https://github.com/slurdge/goeland/issues/74 Originally assigned to: @slurdge on GitHub. 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
slurdge 2026-09-29 12:58:42 +00:00
Author
Owner

@slurdge commented on GitHub (Oct 20, 2022):

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

<!-- gh-comment-id:1285676360 --> @slurdge commented on GitHub (Oct 20, 2022): Good idea! Do you have an example of a RSS feed with such 5000 characters ?
Author
Owner

@djm1 commented on GitHub (Oct 20, 2022):

Hello,There are two RSS feeds for example:

  1. https://nvd.nist.gov/download/nvd-rss-analyzed.xml Here I would use max characters = 0 or some small number to get article titles only (list of topics)
  2. https://www.ghacks.net/feed/ Here I would use max characters = 200 to get first impression from article if I would like to read it or not.Please let me know if you would like to have more details or use cases.

Thank you--S pozdravomMiroslav

<!-- gh-comment-id:1285709002 --> @djm1 commented on GitHub (Oct 20, 2022): Hello,There are two RSS feeds for example: 1. https://nvd.nist.gov/download/nvd-rss-analyzed.xml Here I would use max characters = 0 or some small number to get article titles only (list of topics) 2. https://www.ghacks.net/feed/ Here I would use max characters = 200 to get first impression from article if I would like to read it or not.Please let me know if you would like to have more details or use cases. Thank you--S pozdravomMiroslav
Author
Owner

@slurdge commented on GitHub (Nov 13, 2022):

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

<!-- gh-comment-id:1312749501 --> @slurdge commented on GitHub (Nov 13, 2022): I added a filter `limitwords(numwords)` which should satisfy you. Also ,the new 'toc' filter would solve point1.
Author
Owner

@djm1 commented on GitHub (Nov 13, 2022):

Hello,

that sound really great, thank you for your support and adding the new
features. I will test them once the new binaries will be available for
download.

On Sun, Nov 13, 2022 at 3:55 PM slurdge @.***> wrote:

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

—
Reply to this email directly, view it on GitHub
https://github.com/slurdge/goeland/issues/74#issuecomment-1312749501,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEKD6AYUOEGFBXNM76UM2BLWID6NLANCNFSM6AAAAAARJ6NCVM
.
You are receiving this because you authored the thread.Message ID:
@.***>

--

S pozdravom
Miroslav Vrabel
@.***

<!-- gh-comment-id:1312775479 --> @djm1 commented on GitHub (Nov 13, 2022): Hello, that sound really great, thank you for your support and adding the new features. I will test them once the new binaries will be available for download. On Sun, Nov 13, 2022 at 3:55 PM slurdge ***@***.***> wrote: > I added a filter limitwords(numwords) which should satisfy you. Also ,the > new 'toc' filter would solve point1. > > — > Reply to this email directly, view it on GitHub > <https://github.com/slurdge/goeland/issues/74#issuecomment-1312749501>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AEKD6AYUOEGFBXNM76UM2BLWID6NLANCNFSM6AAAAAARJ6NCVM> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> > -- S pozdravom Miroslav Vrabel ***@***.***
Author
Owner

@djm1 commented on GitHub (Nov 15, 2022):

Hello,

today I was testing the new features and I probably need your review /
support.

  1. limitwords(numwords) - In case of digest mode, can this filter be
    applied per article?

Example configuration:
[sources.test-feed-1]
url = "https://nvd.nist.gov/download/nvd-rss-analyzed.xml"
type = "feed"
filters = ["unseen", "includelink", "embedimage(left)", "digest(4)",
"retrieve", "limitwords(1)"]

Expected result:
Each article will have a title + max 1 word from article.

In case that I'm using the filters incorrectly, can you, please, advise me
the right way?

  1. toc - I tried to use this feature, but I have received email message
    with ToC and also each article in separate email message. What is the right
    way to use this filter to get only one email message with ToC?

Example configuration:
[sources.test-feed-1]
url = "https://nvd.nist.gov/download/nvd-rss-analyzed.xml"
type = "feed"
filters = ["unseen", "includelink", "toc"]

  1. Email SSL error message - from version 0.12 I started receiving SSL
    error message:
    ERRO[0001] error sending email: 530 5.7.0 Must issue a STARTTLS command
    first

Example configuration:
[email]
host = "my.email.server"
port = 587
username = @.***"
password = "email.password"
include-header = false
include-footer = false
include-title = false
timeout-ms = 5000
allow-insecure = true

In version 0.11 it is working right. Is there any way how to troubleshoot
this issue?

Thank you

On Sun, Nov 13, 2022 at 5:57 PM Vrabel, Miroslav @.***> wrote:

Hello,

that sound really great, thank you for your support and adding the new
features. I will test them once the new binaries will be available for
download.

On Sun, Nov 13, 2022 at 3:55 PM slurdge @.***> wrote:

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

—
Reply to this email directly, view it on GitHub
https://github.com/slurdge/goeland/issues/74#issuecomment-1312749501,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEKD6AYUOEGFBXNM76UM2BLWID6NLANCNFSM6AAAAAARJ6NCVM
.
You are receiving this because you authored the thread.Message ID:
@.***>

--

S pozdravom
Miroslav Vrabel
@.***

--

S pozdravom
Miroslav Vrabel
@.***

<!-- gh-comment-id:1315044443 --> @djm1 commented on GitHub (Nov 15, 2022): Hello, today I was testing the new features and I probably need your review / support. 1) limitwords(numwords) - In case of digest mode, can this filter be applied per article? Example configuration: [sources.test-feed-1] url = "https://nvd.nist.gov/download/nvd-rss-analyzed.xml" type = "feed" filters = ["unseen", "includelink", "embedimage(left)", "digest(4)", "retrieve", "limitwords(1)"] Expected result: Each article will have a title + max 1 word from article. In case that I'm using the filters incorrectly, can you, please, advise me the right way? 2) toc - I tried to use this feature, but I have received email message with ToC and also each article in separate email message. What is the right way to use this filter to get only one email message with ToC? Example configuration: [sources.test-feed-1] url = "https://nvd.nist.gov/download/nvd-rss-analyzed.xml" type = "feed" filters = ["unseen", "includelink", "toc"] 3) Email SSL error message - from version 0.12 I started receiving SSL error message: ERRO[0001] error sending email: 530 5.7.0 Must issue a STARTTLS command first Example configuration: [email] host = "my.email.server" port = 587 username = ***@***.***" password = "email.password" include-header = false include-footer = false include-title = false timeout-ms = 5000 allow-insecure = true In version 0.11 it is working right. Is there any way how to troubleshoot this issue? Thank you On Sun, Nov 13, 2022 at 5:57 PM Vrabel, Miroslav ***@***.***> wrote: > Hello, > > that sound really great, thank you for your support and adding the new > features. I will test them once the new binaries will be available for > download. > > On Sun, Nov 13, 2022 at 3:55 PM slurdge ***@***.***> wrote: > >> I added a filter limitwords(numwords) which should satisfy you. Also >> ,the new 'toc' filter would solve point1. >> >> — >> Reply to this email directly, view it on GitHub >> <https://github.com/slurdge/goeland/issues/74#issuecomment-1312749501>, >> or unsubscribe >> <https://github.com/notifications/unsubscribe-auth/AEKD6AYUOEGFBXNM76UM2BLWID6NLANCNFSM6AAAAAARJ6NCVM> >> . >> You are receiving this because you authored the thread.Message ID: >> ***@***.***> >> > > > -- > > S pozdravom > Miroslav Vrabel > ***@***.*** > -- S pozdravom Miroslav Vrabel ***@***.***
Author
Owner

@sweenu commented on GitHub (Nov 15, 2022):

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

<!-- gh-comment-id:1315083478 --> @sweenu commented on GitHub (Nov 15, 2022): 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
Author
Owner

@djm1 commented on GitHub (Nov 15, 2022):

Hello,

thank you for your quick reply.

For point 2, I used configuration:
[sources.test-feed-1]
url = "https://nvd.nist.gov/download/nvd-rss-analyzed.xml"
type = "feed"
filters = ["unseen", "includelink", "digest(4)", "toc"]

The result are two email messages:

  • one email message with typical diggest, as in previous version
  • second email message with email subject "Table of Content for National
    Vulnerability Database" and email body "Digest for National Vulnerability
    Database"

Expected result:

  • one email message with email body:
    Title of article one
    Title of article two
    ...

Can you, please, check or give me an example configuration for provided RSS
feed URL?

For point 3, I modified configuration in the way (if I got your message
correctly):
[email]
host = "my.email.server"
port = 587
username = @.***"
password = "email.password"
include-header = false
include-footer = false
include-title = false
timeout-ms = 5000
allow-insecure = true
encryption = tls

The result is error log:
panic: fatal error config file: While parsing config: toml: expected 'true'

goroutine 1 [running]:
github.com/slurdge/goeland/config.ReadDefaultConfig({0x684387, 0x7},
{0x7ed123ed, 0x10})
/home/runner/work/goeland/goeland/config/config.go:68 +0x530
github.com/slurdge/goeland/cmd.initConfig()
/home/runner/work/goeland/goeland/cmd/root.go:62 +0x58
github.com/spf13/cobra.(Command).preRun(...)
@.
/command.go:946
github.com/spf13/cobra.(Command).execute(0xbaffa0, {0x2aa28c0, 0x2, 0x2})
@.
/command.go:876
+0x47c
github.com/spf13/cobra.(Command).ExecuteC(0xbafe30)
/home/runner/go/pkg/mod/
@.
/command.go:1044 +0x420
github.com/spf13/cobra.(Command).Execute(...)
@.
/command.go:968
github.com/slurdge/goeland/cmd.Execute()
/home/runner/work/goeland/goeland/cmd/root.go:42 +0x20
main.main()
/home/runner/work/goeland/goeland/main.go:18 +0xd8

Can you, please, check or give me an example configuration?
Please let me know if more details are required from my side.

Thank you

On Tue, Nov 15, 2022 at 11:09 AM Bruno Inec @.***>
wrote:

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 https://github.com/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

—
Reply to this email directly, view it on GitHub
https://github.com/slurdge/goeland/issues/74#issuecomment-1315083478,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEKD6A432JCKN3PFSMUIE63WINOORANCNFSM6AAAAAARJ6NCVM
.
You are receiving this because you authored the thread.Message ID:
@.***>

--

S pozdravom
Miroslav Vrabel
@.***

<!-- gh-comment-id:1315154872 --> @djm1 commented on GitHub (Nov 15, 2022): Hello, thank you for your quick reply. For point 2, I used configuration: [sources.test-feed-1] url = "https://nvd.nist.gov/download/nvd-rss-analyzed.xml" type = "feed" filters = ["unseen", "includelink", "digest(4)", "toc"] The result are two email messages: - one email message with typical diggest, as in previous version - second email message with email subject "Table of Content for National Vulnerability Database" and email body "Digest for National Vulnerability Database" Expected result: - one email message with email body: Title of article one Title of article two ... Can you, please, check or give me an example configuration for provided RSS feed URL? For point 3, I modified configuration in the way (if I got your message correctly): [email] host = "my.email.server" port = 587 username = ***@***.***" password = "email.password" include-header = false include-footer = false include-title = false timeout-ms = 5000 allow-insecure = true encryption = tls The result is error log: panic: fatal error config file: While parsing config: toml: expected 'true' goroutine 1 [running]: github.com/slurdge/goeland/config.ReadDefaultConfig({0x684387, 0x7}, {0x7ed123ed, 0x10}) /home/runner/work/goeland/goeland/config/config.go:68 +0x530 github.com/slurdge/goeland/cmd.initConfig() /home/runner/work/goeland/goeland/cmd/root.go:62 +0x58 github.com/spf13/cobra.(*Command).preRun(...) ***@***.***/command.go:946 github.com/spf13/cobra.(*Command).execute(0xbaffa0, {0x2aa28c0, 0x2, 0x2}) ***@***.***/command.go:876 +0x47c github.com/spf13/cobra.(*Command).ExecuteC(0xbafe30) /home/runner/go/pkg/mod/ ***@***.***/command.go:1044 +0x420 github.com/spf13/cobra.(*Command).Execute(...) ***@***.***/command.go:968 github.com/slurdge/goeland/cmd.Execute() /home/runner/work/goeland/goeland/cmd/root.go:42 +0x20 main.main() /home/runner/work/goeland/goeland/main.go:18 +0xd8 Can you, please, check or give me an example configuration? Please let me know if more details are required from my side. Thank you On Tue, Nov 15, 2022 at 11:09 AM Bruno Inec ***@***.***> wrote: > 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 <https://github.com/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 > > — > Reply to this email directly, view it on GitHub > <https://github.com/slurdge/goeland/issues/74#issuecomment-1315083478>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AEKD6A432JCKN3PFSMUIE63WINOORANCNFSM6AAAAAARJ6NCVM> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> > -- S pozdravom Miroslav Vrabel ***@***.***
Author
Owner

@slurdge commented on GitHub (Nov 15, 2022):

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.
<!-- gh-comment-id:1315175208 --> @slurdge commented on GitHub (Nov 15, 2022): 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.
Author
Owner

@djm1 commented on GitHub (Nov 15, 2022):

Hello,

I'm sorry for the confusion with mixing the cases.

For the point 1 - thank you for your support, now I'm getting the results
as expected - one email message with ToC, we can close this point as solved.

For the point 2 - thank you for information, I will wait for the new
release. Should I open new case to keep it tracked in separate ticket,
please?

Thank you

On Tue, Nov 15, 2022 at 12:26 PM slurdge @.***> wrote:

Hello @djm1 https://github.com/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.

—
Reply to this email directly, view it on GitHub
https://github.com/slurdge/goeland/issues/74#issuecomment-1315175208,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEKD6A6G6G24CJMMIBIIX7TWINXNNANCNFSM6AAAAAARJ6NCVM
.
You are receiving this because you were mentioned.Message ID:
@.***>

--

S pozdravom
Miroslav Vrabel
@.***

<!-- gh-comment-id:1315351565 --> @djm1 commented on GitHub (Nov 15, 2022): Hello, I'm sorry for the confusion with mixing the cases. For the point 1 - thank you for your support, now I'm getting the results as expected - one email message with ToC, we can close this point as solved. For the point 2 - thank you for information, I will wait for the new release. Should I open new case to keep it tracked in separate ticket, please? Thank you On Tue, Nov 15, 2022 at 12:26 PM slurdge ***@***.***> wrote: > Hello @djm1 <https://github.com/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. > > — > Reply to this email directly, view it on GitHub > <https://github.com/slurdge/goeland/issues/74#issuecomment-1315175208>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AEKD6A6G6G24CJMMIBIIX7TWINXNNANCNFSM6AAAAAARJ6NCVM> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> > -- S pozdravom Miroslav Vrabel ***@***.***
Author
Owner

@slurdge commented on GitHub (Nov 15, 2022):

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

<!-- gh-comment-id:1315358022 --> @slurdge commented on GitHub (Nov 15, 2022): Please try https://github.com/slurdge/goeland/releases/tag/v0.12.1 release for SSL errors. Thanks !
Author
Owner

@djm1 commented on GitHub (Nov 15, 2022):

Hello,

based on firsts tests it looks like that the issue is solved - no error
message and the email is delivered as in version 0.11 .
Based on this I would suggest to close this issue as solved.

Thank you once again for implementing additional features and your fast
response in solving the issues :-)

On Tue, Nov 15, 2022 at 3:06 PM slurdge @.***> wrote:

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

—
Reply to this email directly, view it on GitHub
https://github.com/slurdge/goeland/issues/74#issuecomment-1315358022,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEKD6A7HVBNYE5BBEI47NU3WIOKHXANCNFSM6AAAAAARJ6NCVM
.
You are receiving this because you were mentioned.Message ID:
@.***>

--

S pozdravom
Miroslav Vrabel
@.***

<!-- gh-comment-id:1315574146 --> @djm1 commented on GitHub (Nov 15, 2022): Hello, based on firsts tests it looks like that the issue is solved - no error message and the email is delivered as in version 0.11 . Based on this I would suggest to close this issue as solved. Thank you once again for implementing additional features and your fast response in solving the issues :-) On Tue, Nov 15, 2022 at 3:06 PM slurdge ***@***.***> wrote: > Please try https://github.com/slurdge/goeland/releases/tag/v0.12.1 > release for SSL errors. Thanks ! > > — > Reply to this email directly, view it on GitHub > <https://github.com/slurdge/goeland/issues/74#issuecomment-1315358022>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AEKD6A7HVBNYE5BBEI47NU3WIOKHXANCNFSM6AAAAAARJ6NCVM> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> > -- S pozdravom Miroslav Vrabel ***@***.***
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: slurdge/goeland#24
No description provided.