From f113a224e5687cbc625ed3c489a6adfc5e21cb40 Mon Sep 17 00:00:00 2001 From: Sijawusz Pur Rahnama Date: Wed, 30 Oct 2024 02:12:46 +0100 Subject: [PATCH] Update README.md --- README.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 55bf3df..fcaf222 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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