An open API service indexing awesome lists of open source software.

https://github.com/softprops/opener

everyone loves a good opener
https://github.com/softprops/opener

Last synced: about 1 month ago
JSON representation

everyone loves a good opener

Awesome Lists containing this project

README

          

# opener

> open with something good

Opener provides interfaces for opening files and URI's on your desktop using this [tool](http://docs.oracle.com/javase/6/docs/api/java/awt/Desktop.html) which may or may not be available depending on your environment. When it's not, that's okay too.

## install

Via the copy and paste method

```scala
resolvers += "softprops-maven" at "http://dl.bintray.com/content/softprops/maven"

libraryDependencies += "me.lessis" %% "opener" % "0.1.0"
```

Via [a more civilized method](https://github.com/softprops/ls#readme) which will do the same without all the manual work.

> ls-install opener

Note. If you are a [bintray-sbt](https://github.com/softprops/bintray-sbt#readme) user you can optionally specify the resolver as

```scala
resolvers += bintray.Opts.resolver.repo("softprops", "maven")
```

## usage

Each operation is exposed as an object with an apply for the type of input the operation expects. You can open with `opener.Browse`, `opener.Edit`, `opener.Mail`, and `opener.Open`. Each operation returns a `scala.util.Try` of the attempted operation. A few examples are given below.

Open this projects readme on github.com

```scala
opener.Browse(new java.net.URI("https://github.com/softprops/opener#readme"))
```

Tell your mom how much you miss her using a service that she'll understand ( email )

```scala
opener.Mail(new java.net.URI("mailto:mom@gmail.com?subject=hi%20mom&body=miss%20you"))
```

Doug Tangren (softprops) 2013