Skip to content

Commit

Permalink
Omnivore will shut down the 30th of November
Browse files Browse the repository at this point in the history
  • Loading branch information
jvoisin committed Nov 12, 2024
1 parent c3016a4 commit ae2709c
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 191 deletions.
9 changes: 9 additions & 0 deletions internal/database/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -960,4 +960,13 @@ var migrations = []func(tx *sql.Tx) error{
_, err = tx.Exec(sql)
return err
},
func(tx *sql.Tx) (err error) {
sql := `
ALTER TABLE integrations DROP COLUMN omnivore_enabled;
ALTER TABLE integrations DROP COLUMN omnivore_api_key;
ALTER TABLE integrations DROP COLUMN omnivore_url;
`
_, err = tx.Exec(sql)
return
},
}
19 changes: 0 additions & 19 deletions internal/integration/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"miniflux.app/v2/internal/integration/notion"
"miniflux.app/v2/internal/integration/ntfy"
"miniflux.app/v2/internal/integration/nunuxkeeper"
"miniflux.app/v2/internal/integration/omnivore"
"miniflux.app/v2/internal/integration/pinboard"
"miniflux.app/v2/internal/integration/pocket"
"miniflux.app/v2/internal/integration/raindrop"
Expand Down Expand Up @@ -407,24 +406,6 @@ func SendEntry(entry *model.Entry, userIntegrations *model.Integration) {
}
}

if userIntegrations.OmnivoreEnabled {
slog.Debug("Sending entry to Omnivore",
slog.Int64("user_id", userIntegrations.UserID),
slog.Int64("entry_id", entry.ID),
slog.String("entry_url", entry.URL),
)

client := omnivore.NewClient(userIntegrations.OmnivoreAPIKey, userIntegrations.OmnivoreURL)
if err := client.SaveUrl(entry.URL); err != nil {
slog.Error("Unable to send entry to Omnivore",
slog.Int64("user_id", userIntegrations.UserID),
slog.Int64("entry_id", entry.ID),
slog.String("entry_url", entry.URL),
slog.Any("error", err),
)
}
}

if userIntegrations.RaindropEnabled {
slog.Debug("Sending entry to Raindrop",
slog.Int64("user_id", userIntegrations.UserID),
Expand Down
125 changes: 0 additions & 125 deletions internal/integration/omnivore/omnivore.go

This file was deleted.

3 changes: 0 additions & 3 deletions internal/model/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@ type Integration struct {
WebhookSecret string
RSSBridgeEnabled bool
RSSBridgeURL string
OmnivoreEnabled bool
OmnivoreAPIKey string
OmnivoreURL string
RaindropEnabled bool
RaindropToken string
RaindropCollectionID string
Expand Down
13 changes: 0 additions & 13 deletions internal/storage/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,6 @@ func (s *Storage) Integration(userID int64) (*model.Integration, error) {
webhook_secret,
rssbridge_enabled,
rssbridge_url,
omnivore_enabled,
omnivore_api_key,
omnivore_url,
raindrop_enabled,
raindrop_token,
raindrop_collection_id,
Expand Down Expand Up @@ -299,9 +296,6 @@ func (s *Storage) Integration(userID int64) (*model.Integration, error) {
&integration.WebhookSecret,
&integration.RSSBridgeEnabled,
&integration.RSSBridgeURL,
&integration.OmnivoreEnabled,
&integration.OmnivoreAPIKey,
&integration.OmnivoreURL,
&integration.RaindropEnabled,
&integration.RaindropToken,
&integration.RaindropCollectionID,
Expand Down Expand Up @@ -413,9 +407,6 @@ func (s *Storage) UpdateIntegration(integration *model.Integration) error {
webhook_secret=$76,
rssbridge_enabled=$77,
rssbridge_url=$78,
omnivore_enabled=$79,
omnivore_api_key=$80,
omnivore_url=$81,
linkwarden_enabled=$82,
linkwarden_url=$83,
linkwarden_api_key=$84,
Expand Down Expand Up @@ -518,9 +509,6 @@ func (s *Storage) UpdateIntegration(integration *model.Integration) error {
integration.WebhookSecret,
integration.RSSBridgeEnabled,
integration.RSSBridgeURL,
integration.OmnivoreEnabled,
integration.OmnivoreAPIKey,
integration.OmnivoreURL,
integration.LinkwardenEnabled,
integration.LinkwardenURL,
integration.LinkwardenAPIKey,
Expand Down Expand Up @@ -577,7 +565,6 @@ func (s *Storage) HasSaveEntry(userID int64) (result bool) {
readeck_enabled='t' OR
shaarli_enabled='t' OR
webhook_enabled='t' OR
omnivore_enabled='t' OR
raindrop_enabled='t' OR
betula_enabled='t' OR
cubox_enabled='t'
Expand Down
19 changes: 0 additions & 19 deletions internal/template/templates/views/integrations.html
Original file line number Diff line number Diff line change
Expand Up @@ -325,25 +325,6 @@ <h1 id="page-header-title">{{ t "page.integrations.title" }}</h1>
</div>
</details>

<details {{ if .form.OmnivoreEnabled }}open{{ end }}>
<summary>Omnivore</summary>
<div class="form-section">
<label>
<input type="checkbox" name="omnivore_enabled" value="1" {{ if .form.OmnivoreEnabled }}checked{{ end }}> {{ t "form.integration.omnivore_activate" }}
</label>

<label for="form-omnivore-api-key">{{ t "form.integration.omnivore_api_key" }}</label>
<input type="text" name="omnivore_api_key" id="form-omnivore-api-key" value="{{ .form.OmnivoreAPIKey }}" spellcheck="false">

<label for="form-omnivore-url">{{ t "form.integration.omnivore_url" }}</label>
<input type="url" name="omnivore_url" id="form-omnivore-url" value="{{ .form.OmnivoreURL }}" placeholder="https://api-prod.omnivore.app/api/graphql" spellcheck="false">

<div class="buttons">
<button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.update" }}</button>
</div>
</div>
</details>

<details {{ if .form.PinboardEnabled }}open{{ end }}>
<summary>Pinboard</summary>
<div class="form-section">
Expand Down
9 changes: 0 additions & 9 deletions internal/ui/form/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@ type IntegrationForm struct {
WebhookSecret string
RSSBridgeEnabled bool
RSSBridgeURL string
OmnivoreEnabled bool
OmnivoreAPIKey string
OmnivoreURL string
RaindropEnabled bool
RaindropToken string
RaindropCollectionID string
Expand Down Expand Up @@ -194,9 +191,6 @@ func (i IntegrationForm) Merge(integration *model.Integration) {
integration.WebhookURL = i.WebhookURL
integration.RSSBridgeEnabled = i.RSSBridgeEnabled
integration.RSSBridgeURL = i.RSSBridgeURL
integration.OmnivoreEnabled = i.OmnivoreEnabled
integration.OmnivoreAPIKey = i.OmnivoreAPIKey
integration.OmnivoreURL = i.OmnivoreURL
integration.RaindropEnabled = i.RaindropEnabled
integration.RaindropToken = i.RaindropToken
integration.RaindropCollectionID = i.RaindropCollectionID
Expand Down Expand Up @@ -298,9 +292,6 @@ func NewIntegrationForm(r *http.Request) *IntegrationForm {
WebhookURL: r.FormValue("webhook_url"),
RSSBridgeEnabled: r.FormValue("rssbridge_enabled") == "1",
RSSBridgeURL: r.FormValue("rssbridge_url"),
OmnivoreEnabled: r.FormValue("omnivore_enabled") == "1",
OmnivoreAPIKey: r.FormValue("omnivore_api_key"),
OmnivoreURL: r.FormValue("omnivore_url"),
RaindropEnabled: r.FormValue("raindrop_enabled") == "1",
RaindropToken: r.FormValue("raindrop_token"),
RaindropCollectionID: r.FormValue("raindrop_collection_id"),
Expand Down
3 changes: 0 additions & 3 deletions internal/ui/integration_show.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,6 @@ func (h *handler) showIntegrationPage(w http.ResponseWriter, r *http.Request) {
WebhookSecret: integration.WebhookSecret,
RSSBridgeEnabled: integration.RSSBridgeEnabled,
RSSBridgeURL: integration.RSSBridgeURL,
OmnivoreEnabled: integration.OmnivoreEnabled,
OmnivoreAPIKey: integration.OmnivoreAPIKey,
OmnivoreURL: integration.OmnivoreURL,
RaindropEnabled: integration.RaindropEnabled,
RaindropToken: integration.RaindropToken,
RaindropCollectionID: integration.RaindropCollectionID,
Expand Down

0 comments on commit ae2709c

Please sign in to comment.