Skip to content

Commit

Permalink
Add Gibiru and bump version to 0.6.5
Browse files Browse the repository at this point in the history
  • Loading branch information
zquestz committed Mar 12, 2022
1 parent d9f4313 commit fe47042
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ Custom providers require a few things:
* foursquare
* freebsdman
* freshports
* gibiru
* giphy
* gist
* github
Expand Down Expand Up @@ -362,7 +363,7 @@ s is released under the MIT license.
[ReportCard-Image]: https://goreportcard.com/badge/github.com/zquestz/s
[Build-Status-URL]: http://travis-ci.com/zquestz/s
[Build-Status-Image]: https://travis-ci.com/zquestz/s.svg?branch=master
[Release-URL]: https://github.com/zquestz/s/releases/tag/v0.6.4
[Release-Image]: http://img.shields.io/badge/release-v0.6.4-1eb0fc.svg
[Release-URL]: https://github.com/zquestz/s/releases/tag/v0.6.5
[Release-Image]: http://img.shields.io/badge/release-v0.6.5-1eb0fc.svg
[Chat-Image]: https://badges.gitter.im/zquestz/s.svg
[Chat-URL]: https://gitter.im/zquestz/s?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
2 changes: 1 addition & 1 deletion cmd/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

const (
appName = "s"
version = "0.6.4"
version = "0.6.5"
defaultPort = 8080
defaultProvider = "presearch"
)
Expand Down
25 changes: 25 additions & 0 deletions providers/gibiru/gibiru.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package gibiru

import (
"fmt"
"net/url"

"github.com/zquestz/s/providers"
)

func init() {
providers.AddProvider("gibiru", &Provider{})
}

// Provider merely implements the Provider interface.
type Provider struct{}

// BuildURI generates a search URL for Gibiru.
func (p *Provider) BuildURI(q string) string {
return fmt.Sprintf("https://gibiru.com/results.html?q=%s", url.QueryEscape(q))
}

// Tags returns the tags relevant to this provider.
func (p *Provider) Tags() []string {
return []string{"search"}
}
1 change: 1 addition & 0 deletions s.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import (
_ "github.com/zquestz/s/providers/foursquare"
_ "github.com/zquestz/s/providers/freebsdman"
_ "github.com/zquestz/s/providers/freshports"
_ "github.com/zquestz/s/providers/gibiru"
_ "github.com/zquestz/s/providers/giphy"
_ "github.com/zquestz/s/providers/gist"
_ "github.com/zquestz/s/providers/github"
Expand Down

0 comments on commit fe47042

Please sign in to comment.