Skip to content

Commit

Permalink
updte README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanmaierhofer committed Aug 15, 2022
1 parent da4fc8d commit 03c1d35
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ Usage:
Commands:
import [-t <tags>] <file|folder>* [-x <exclude>] [--addRandomLabels]
list [--skip <int>] [--take <int>]
tail
tags
tail [-v|--verbose]
apikeys
create -d <description> [-r <role>]+ [--days <float>]
Available roles are: admin, importer
Expand All @@ -78,17 +79,35 @@ Usage:
disconnect

Examples:
screenshotr connect -e "http://localhost" -k "7d10785f41e8..."
screenshotr connect -e "https://localhost" -k "7d10785f41e8..."
screenshotr disconnect
screenshotr import -t "mytag some-other-tag" img.jpg /data/pictures/
screenshotr list --skip 10 --take 5
screenshotr tail
screenshotr tags
screenshotr tail -v
screenshotr apikeys create -d "alice's import key" -r "importer"
screenshotr apikeys delete "2442d075d2f3888..."
screenshotr apikeys list
```

# Config

## Data directory
By default, the screenshotr server will store all data in `./data`.
You can set a custom directory by setting the `Screenshotr:Data` environment variable, e.g.
```
set Screenshotr:Data=/my/screenshots/data/dir
```

## User Name (from reverse proxy)
Specify the env variable `Screenshotr:HttpHeaderDisplayName=<HTTP-HEADER-NAME>` to extract and display the current user's name from an HTTP header.

This can be used, if you run a reverse proxy sending the current user's display name along with the requests.

E.g. if your reverse proxy adds an HTTP header named `X-Display-Name`, then you would specify
```
set Screenshotr:HttpHeaderDisplayName=X-Display-Name
```

# Docker

Expand Down
2 changes: 1 addition & 1 deletion src/Screenshotr.App/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

Console.WriteLine($"[ScreenshotrService] init ...");

var screenshotrBaseDir = builder.Configuration["Screenshotr:Data"];
var screenshotrBaseDir = builder.Configuration["Screenshotr:Data"] ?? "./data";
var corsOrigins = builder.Configuration["Screenshotr:CorsOrigins"];
var enableHttpLogging = bool.TryParse(builder.Configuration["Screenshotr:EnableHttpLogging"], out var x) && x;
ScreenshotrApp.HttpHeaderUserId = builder.Configuration["Screenshotr:HttpHeaderUserId"];
Expand Down

0 comments on commit 03c1d35

Please sign in to comment.