https://github.com/mcuadros/go-gphoto2-cli
Golang wrapper around the gphoto2 cli
https://github.com/mcuadros/go-gphoto2-cli
Last synced: 3 months ago
JSON representation
Golang wrapper around the gphoto2 cli
- Host: GitHub
- URL: https://github.com/mcuadros/go-gphoto2-cli
- Owner: mcuadros
- License: mit
- Created: 2024-02-17T01:47:01.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-01T11:03:11.000Z (about 1 year ago)
- Last Synced: 2025-03-20T04:37:54.139Z (3 months ago)
- Language: Go
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-gphoto2-cli [](http://godoc.org/github.com/mcuadros/go-gphoto2-cli)
Golang wrapper arround the gphoto2 cli.
[gphoto2](http://www.gphoto.org/), is a set of software applications and libraries
for use in digital photography. gPhoto supports not just retrieving of images from
camera devices, but also upload and remote controlled configuration and capture,
depending on whether the camera supports those features.This library has a goal to cover basic features as capturing video and photos from
several cameras at the same time.## Installation
The recommended way to install go-tsunami
```
go get github.com/mcuadros/go-gphoto2-cli
```## Example
```go
cli := gphoto2cli.NewClient()
ports, err := cli.ListPorts(ctx)
if err != nil {
log.Fatal(err)
}for _, p := range ports {
c := gphoto2cli.NewCamera(cli, p)
r, err := c.CapturePhoto(ctx, "")
if err != nil {
log.Fatal(err)
}fmt.Printf("photo captured from %q at port %s and stored in %q\n",
p.Model, p.Port, r.LocalFile,
)
}
```## License
MIT, see [LICENSE](LICENSE)