Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Sija committed Oct 30, 2024
1 parent 2d94e4e commit f113a22
Showing 1 changed file with 46 additions and 6 deletions.
52 changes: 46 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,50 @@
# gphoto2-web [![CI](https://github.com/Sija/gphoto2-web/actions/workflows/ci.yml/badge.svg)](https://github.com/Sija/gphoto2-web/actions/workflows/ci.yml) [![License](https://img.shields.io/github/license/Sija/gphoto2-web.svg)](https://github.com/Sija/gphoto2-web/blob/master/LICENSE)

REST web API for the [libgphoto2](http://www.gphoto.org/) library. You can use it to take pictures, previews (handy for implementing poor man's liveview feature), control/obtain various camera settings, and access connected camera's filesystem - all via JSON-based requests.
REST web API for the [libgphoto2](http://www.gphoto.org) library. You can use it to take pictures, previews (handy for implementing poor man's liveview feature), control/obtain various camera settings, and access connected camera's filesystem - all via JSON-based requests.

## Installation
## Goals

- After cloning the repo you need to call `shards install` in order to obtain needed dependencies
- Next, execute `shards build` (possibly with `--production` flag) to build the binary
- You're ready to go! It's as easy as running `./bin/server` and checking the http://localhost:3000/cameras for list of detected cameras
- Passing `SENTRY_DSN` env var while building/running will provide you with error reporting
- Providing a generic camera REST API
- Providing a feature parity with [libgphoto2](https://github.com/gphoto/libgphoto2) library
- Being a testbed for [gphoto2.cr](https://github.com/Sija/gphoto2.cr) shard
- Clean and readable code ✨
- Rock-solid stability 🪨
- High performance 🚀

## Non-Goals

- Including customizable business logic
- Including camera-specific features

## Features

- Camera detection
- Multiple cameras support
- Camera connection reloading
- Camera ability detection
- Image capture [^1]
- Live-view [^1]
- Configuration preview/modification [^1]
- File preview (incl. _raw_ camera formats) [^1]
- File download (in several formats [^2]) [^1]
- File removal [^1]
- Folder download as ZIP archive [^1]
- Folder removal [^1]
- Minimal dependencies

[^1]: Works only with supported cameras
[^3]: JPEG, WEBP, AVIF, PNG

## Setup

> [!TIP]
> Passing `SENTRY_DSN` env var while building/running will provide you with error reporting
- Run `shards install` in order to install required dependencies
- Next, execute `shards build [--release] [-Dpreview_mt]` to build the binary
- Now you're ready to go!
- It's as easy as running `./bin/server` in your terminal
- Checking the http://localhost:3000/cameras endpoint will give you a list of detected cameras

## Usage

Expand Down Expand Up @@ -104,6 +141,9 @@ REST web API for the [libgphoto2](http://www.gphoto.org/) library. You can use i
## Development
> [!TIP]
> You can use a smartphone for basic development and testing.
- Pass `DEBUG=1` in `shards build` step to compile-in the debug support. Afterwards you can use it by passing `DEBUG=1` env variable when running the server (`DEBUG=1 ./bin/server`)
## Contributing
Expand Down

0 comments on commit f113a22

Please sign in to comment.