aboutsummaryrefslogtreecommitdiff
path: root/plugins/viewtext
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/viewtext')
-rw-r--r--plugins/viewtext/plugin.go8
-rw-r--r--plugins/viewtext/viewer.go12
2 files changed, 10 insertions, 10 deletions
diff --git a/plugins/viewtext/plugin.go b/plugins/viewtext/plugin.go
index c7a2bcc..1454a93 100644
--- a/plugins/viewtext/plugin.go
+++ b/plugins/viewtext/plugin.go
@@ -1,10 +1,10 @@
-package koushinviewtext
+package alpsviewtext
import (
- "git.sr.ht/~emersion/koushin"
+ "git.sr.ht/~emersion/alps"
)
func init() {
- p := koushin.GoPlugin{Name: "viewtext"}
- koushin.RegisterPluginLoader(p.Loader())
+ p := alps.GoPlugin{Name: "viewtext"}
+ alps.RegisterPluginLoader(p.Loader())
}
diff --git a/plugins/viewtext/viewer.go b/plugins/viewtext/viewer.go
index 9a91f08..a03f272 100644
--- a/plugins/viewtext/viewer.go
+++ b/plugins/viewtext/viewer.go
@@ -1,4 +1,4 @@
-package koushinviewtext
+package alpsviewtext
import (
"bufio"
@@ -7,8 +7,8 @@ import (
"net/url"
"strings"
- "git.sr.ht/~emersion/koushin"
- koushinbase "git.sr.ht/~emersion/koushin/plugins/base"
+ "git.sr.ht/~emersion/alps"
+ alpsbase "git.sr.ht/~emersion/alps/plugins/base"
"github.com/emersion/go-message"
"gitlab.com/golang-commonmark/linkify"
)
@@ -53,13 +53,13 @@ func executeTemplate(name string, data interface{}) (template.HTML, error) {
type viewer struct{}
-func (viewer) ViewMessagePart(ctx *koushin.Context, msg *koushinbase.IMAPMessage, part *message.Entity) (interface{}, error) {
+func (viewer) ViewMessagePart(ctx *alps.Context, msg *alpsbase.IMAPMessage, part *message.Entity) (interface{}, error) {
mimeType, _, err := part.Header.ContentType()
if err != nil {
return nil, err
}
if !strings.EqualFold(mimeType, "text/plain") {
- return nil, koushinbase.ErrViewUnsupported
+ return nil, alpsbase.ErrViewUnsupported
}
var tokens []interface{}
@@ -114,5 +114,5 @@ func (viewer) ViewMessagePart(ctx *koushin.Context, msg *koushinbase.IMAPMessage
}
func init() {
- koushinbase.RegisterViewer(viewer{})
+ alpsbase.RegisterViewer(viewer{})
}