mirror of
https://github.com/miniflux/v2.git
synced 2025-07-02 16:38:37 +00:00
Add Shiori integration
This commit is contained in:
parent
13d9d86acd
commit
28df0b119e
26 changed files with 312 additions and 13 deletions
|
@ -15,6 +15,7 @@ import (
|
|||
"miniflux.app/v2/internal/integration/pinboard"
|
||||
"miniflux.app/v2/internal/integration/pocket"
|
||||
"miniflux.app/v2/internal/integration/readwise"
|
||||
"miniflux.app/v2/internal/integration/shiori"
|
||||
"miniflux.app/v2/internal/integration/telegrambot"
|
||||
"miniflux.app/v2/internal/integration/wallabag"
|
||||
"miniflux.app/v2/internal/logger"
|
||||
|
@ -137,6 +138,20 @@ func SendEntry(entry *model.Entry, integration *model.Integration) {
|
|||
logger.Error("[Integration] UserID #%d: %v", integration.UserID, err)
|
||||
}
|
||||
}
|
||||
|
||||
if integration.ShioriEnabled {
|
||||
logger.Debug("[Integration] Sending Entry #%d %q for User #%d to Shiori", entry.ID, entry.URL, integration.UserID)
|
||||
|
||||
client := shiori.NewClient(
|
||||
integration.ShioriURL,
|
||||
integration.ShioriUsername,
|
||||
integration.ShioriPassword,
|
||||
)
|
||||
|
||||
if err := client.AddBookmark(entry.URL, entry.Title); err != nil {
|
||||
logger.Error("[Integration] Unable to send entry #%d to Shiori for user #%d: %v", entry.ID, integration.UserID, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// PushEntries pushes an entry array to third-party providers during feed refreshes.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue