Skip to content

Commit

Permalink
Rearrange README and update build documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
snabb committed Feb 28, 2019
1 parent bae6b85 commit a355a05
Showing 1 changed file with 33 additions and 27 deletions.
60 changes: 33 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,39 @@ This is Go library and a terminal application for remote control of
LG WebOS smart televisions. Works on Linux and Windows and probably
on OS X as well. It has been tested with LG 42LB650V-ZN television.

Simple example of using the library to turn off the TV:

Installing and using the remote control application
---------------------------------------------------

Install Go compiler if you do not have it:
```
curl https://dl.google.com/go/go1.12.linux-amd64.tar.gz | sudo tar xzC /usr/local
PATH=$PATH:/usr/local/go/bin
```
(See https://golang.org/dl/ for newer version and more detailed
instructions.)

Compile and install:
```
git clone https://github.com/snabb/webostv.git
cd webostv
go build ./cmd/webostvremote
```
The compiled binary `webostvremote` is produced in the current working
directory.

To use the remote control program with the TV, the IP address or name of the
TV can be given as a command line argument:
```
./webostvremote 192.0.2.123
```
If the address is not supplied, it will try to connect to the default
address `LGsmartTV.lan`.


Simple example of using the library to turn off the TV
------------------------------------------------------

```Go
package main
Expand All @@ -34,32 +66,6 @@ func main() {
}
```

Installing and using the remote control application
---------------------------------------------------

Install Go compiler if you do not have it:
```
curl https://dl.google.com/go/go1.11.2.linux-amd64.tar.gz | sudo tar xzC /usr/local
PATH=$PATH:/usr/local/go/bin
```
(See https://golang.org/dl/ for newer version and more detailed
instructions.)

Compile and install:
```
go get github.com/snabb/webostv/cmd/webostvremote
```
The resulting binary is at: `~/go/bin/webostvremote`

To use the remote control program with the TV, the IP address or name of the
TV can be given as a command line argument:
```
~/go/bin/webostvremote 192.0.2.123
```
If the address is not supplied, it will try to connect to the default
address `LGsmartTV.lan`.


Unimplemented / TODO
--------------------

Expand Down

0 comments on commit a355a05

Please sign in to comment.