mirror of
https://github.com/miniflux/v2.git
synced 2025-09-30 19:22:11 +00:00
feat(integration): add integration with archive.org
Tested locally: ```console $ Tue 26 Aug 17:34:05 CEST 2025 $ go build && ./miniflux.app -c ./config.ini -debug level=DEBUG msg="Starting daemon..." level=DEBUG msg="Starting background scheduler..." level=DEBUG msg="Worker started" worker_id=15 level=DEBUG msg="Worker started" worker_id=0 […] level=DEBUG msg="Incoming request" client_ip=127.0.0.1 request.method=POST request.uri=/entry/save/29773 request.protocol=HTTP/1.1 request.execution_time=5.57385ms level=DEBUG msg="Sending entry to archive.org" user_id=1 entry_id=29773 entry_url=https://sumnerevans.com/portfolio/ level=DEBUG msg="Sending entry to archive.org" title=Portfolio url=https://sumnerevans.com/portfolio/ ^C $ curl -I -H "User-Agent: Mozilla" https://web.archive.org/web/20250826153413/https://sumnerevans.com/portfolio/ | grep orig-date x-archive-orig-date: Tue, 26 Aug 2025 15:34:13 GMT $ ```
This commit is contained in:
parent
5fa0709663
commit
d2974ed68a
28 changed files with 107 additions and 5 deletions
|
@ -129,6 +129,7 @@ type IntegrationForm struct {
|
|||
PushoverToken string
|
||||
PushoverDevice string
|
||||
PushoverPrefix string
|
||||
ArchiveorgEnabled bool
|
||||
}
|
||||
|
||||
// Merge copy form values to the model.
|
||||
|
@ -247,6 +248,7 @@ func (i IntegrationForm) Merge(integration *model.Integration) {
|
|||
integration.PushoverToken = i.PushoverToken
|
||||
integration.PushoverDevice = i.PushoverDevice
|
||||
integration.PushoverPrefix = i.PushoverPrefix
|
||||
integration.ArchiveorgEnabled = i.ArchiveorgEnabled
|
||||
}
|
||||
|
||||
// NewIntegrationForm returns a new IntegrationForm.
|
||||
|
@ -368,6 +370,7 @@ func NewIntegrationForm(r *http.Request) *IntegrationForm {
|
|||
PushoverToken: r.FormValue("pushover_token"),
|
||||
PushoverDevice: r.FormValue("pushover_device"),
|
||||
PushoverPrefix: r.FormValue("pushover_prefix"),
|
||||
ArchiveorgEnabled: r.FormValue("archiveorg_enabled") == "1",
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue