diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/cli.md | 8 | ||||
-rw-r--r-- | docs/example-go-plugin/plugin.go | 18 | ||||
-rw-r--r-- | docs/example-lua-plugin/main.lua | 6 | ||||
-rw-r--r-- | docs/google.md | 12 | ||||
-rw-r--r-- | docs/themes-and-plugins.md | 8 |
5 files changed, 26 insertions, 26 deletions
diff --git a/docs/cli.md b/docs/cli.md index c3bae3f..ca7c7e8 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -1,22 +1,22 @@ # SYNOPSIS - koushin [options...] <upstream servers...> + alps [options...] <upstream servers...> # DESCRIPTION -koushin is a simple and extensible webmail. It offers a web interface for IMAP, +alps is a simple and extensible webmail. It offers a web interface for IMAP, SMTP and other upstream servers. At least one upstream IMAP server needs to be specified. The easiest way to do so is to just specify a domain name: - koushin example.org + alps example.org This assumes SRV DNS records are properly set up (see [RFC 6186]). Alternatively, one or more upstream server URLs can be specified: - koushin imaps://mail.example.org:993 smtps://mail.example.org:465 + alps imaps://mail.example.org:993 smtps://mail.example.org:465 The following URL schemes are supported: diff --git a/docs/example-go-plugin/plugin.go b/docs/example-go-plugin/plugin.go index 791f5a6..7cf2eb9 100644 --- a/docs/example-go-plugin/plugin.go +++ b/docs/example-go-plugin/plugin.go @@ -1,22 +1,22 @@ -// Package exampleplugin is an example Go plugin for koushin. +// Package exampleplugin is an example Go plugin for alps. // -// To enable it, import this package from cmd/koushin/main.go. +// To enable it, import this package from cmd/alps/main.go. package exampleplugin import ( "fmt" "net/http" - "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" ) func init() { - p := koushin.GoPlugin{Name: "example"} + p := alps.GoPlugin{Name: "example"} // Setup a function called when the mailbox view is rendered - p.Inject("mailbox.html", func(ctx *koushin.Context, kdata koushin.RenderData) error { - data := kdata.(*koushinbase.MailboxRenderData) + p.Inject("mailbox.html", func(ctx *alps.Context, kdata alps.RenderData) error { + data := kdata.(*alpsbase.MailboxRenderData) fmt.Println("The mailbox view for " + data.Mailbox.Name + " is being rendered") // Set extra data that can be accessed from the mailbox.html template data.Extra["Example"] = "Hi from Go" @@ -24,7 +24,7 @@ func init() { }) // Wire up a new route - p.GET("/example", func(ctx *koushin.Context) error { + p.GET("/example", func(ctx *alps.Context) error { return ctx.String(http.StatusOK, "This is an example page.") }) @@ -35,5 +35,5 @@ func init() { }, }) - koushin.RegisterPluginLoader(p.Loader()) + alps.RegisterPluginLoader(p.Loader()) } diff --git a/docs/example-lua-plugin/main.lua b/docs/example-lua-plugin/main.lua index 8df1ec6..eafd9dd 100644 --- a/docs/example-lua-plugin/main.lua +++ b/docs/example-lua-plugin/main.lua @@ -2,18 +2,18 @@ print("Hi, this is an example Lua plugin") -- Setup a function called when the mailbox view is rendered -koushin.on_render("mailbox.html", function(data) +alps.on_render("mailbox.html", function(data) print("The mailbox view for " .. data.Mailbox.Name .. " is being rendered") -- Set extra data that can be accessed from the mailbox.html template data.Extra.Example = "Hi from Lua" end) -- Wire up a new route -koushin.set_route("GET", "/example", function(ctx) +alps.set_route("GET", "/example", function(ctx) ctx:String(200, "This is an example page.") end) -- Set a filter function that can be used from templates -koushin.set_filter("example_and", function(a, b) +alps.set_filter("example_and", function(a, b) return a .. " and " .. b end) diff --git a/docs/google.md b/docs/google.md index 64b767f..2633e5a 100644 --- a/docs/google.md +++ b/docs/google.md @@ -1,21 +1,21 @@ -# Running koushin with a Google account +# Running alps with a Google account ## Create an application password -First, you'll need to obtain an application-specific password for koushin from +First, you'll need to obtain an application-specific password for alps from the [app passwords] page on your Google account. -## Run koushin +## Run alps -Start koushin with these upstream URLs: +Start alps with these upstream URLs: - koushin imaps://imap.gmail.com smtps://smtp.gmail.com \ + alps imaps://imap.gmail.com smtps://smtp.gmail.com \ carddavs://www.googleapis.com/carddav/v1/principals/YOUREMAIL/ \ caldavs://www.google.com/calendar/dav Replace `YOUREMAIL` with your Google account's e-mail address. -Once koushin is started, you can login with your e-mail address and the app +Once alps is started, you can login with your e-mail address and the app password. [app passwords]: https://security.google.com/settings/security/apppasswords diff --git a/docs/themes-and-plugins.md b/docs/themes-and-plugins.md index 1d793f8..4c45ed7 100644 --- a/docs/themes-and-plugins.md +++ b/docs/themes-and-plugins.md @@ -17,7 +17,7 @@ Assets in `plugins/<name>/public/assets/*` are served by the HTTP server at ## Go plugins They can use the [Go plugin helpers] and need to be included at compile-time in -`cmd/koushin/main.go`. +`cmd/alps/main.go`. ## Lua plugins @@ -25,8 +25,8 @@ The entry point is at `plugins/<name>/main.lua`. API: -* `koushin.on_render(name, f)`: prior to rendering the template `name`, call +* `alps.on_render(name, f)`: prior to rendering the template `name`, call `f` with the template data (the special name `*` matches all templates) -* `koushin.set_filter(name, f)`: set a template function -* `koushin.set_route(method, path, f)`: register a new HTTP route, `f` will be +* `alps.set_filter(name, f)`: set a template function +* `alps.set_route(method, path, f)`: register a new HTTP route, `f` will be called with the HTTP context |