mirror of
https://github.com/slurdge/goeland.git
synced 2026-11-11 13:13:58 +00:00
[GH-ISSUE #74] Max number of characters from article #24
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: slurdge/goeland#24
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 commented on GitHub (Oct 20, 2022):
Good idea! Do you have an example of a RSS feed with such 5000 characters ?
@djm1 commented on GitHub (Oct 20, 2022):
Hello,There are two RSS feeds for example:
Thank you--S pozdravomMiroslav
@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.@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:
--
S pozdravom
Miroslav Vrabel
@.***
@djm1 commented on GitHub (Nov 15, 2022):
Hello,
today I was testing the new features and I probably need your review /
support.
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?
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"]
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:
--
S pozdravom
Miroslav Vrabel
@.***
@sweenu commented on GitHub (Nov 15, 2022):
For question 2, you need to add the
digestfilter. A toc is only meaningful if several entries are sent together.For question 3, it is a bug, you can explicitly set
encryption = tlsin 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 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:
Vulnerability Database" and email body "Digest for National Vulnerability
Database"
Expected result:
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:
--
S pozdravom
Miroslav Vrabel
@.***
@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.
filters = ["unseen", "includelink", "digest(4)", "toc"]You should put
digestaftertoc. 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.
@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:
--
S pozdravom
Miroslav Vrabel
@.***
@slurdge commented on GitHub (Nov 15, 2022):
Please try https://github.com/slurdge/goeland/releases/tag/v0.12.1 release for SSL errors. Thanks !
@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:
--
S pozdravom
Miroslav Vrabel
@.***