Use the appropriate version of run
and screenshotr
for your OS.
- e.g.
./run.sh
and./screenshotr.sh
for Linux - or
run.cmd
andscreenshotr.cmd
for Windows
git clone https://github.com/stefanmaierhofer/screenshotr.git
cd screenshotr
run
Open http://localhost:5020/ in a your browser.
screenshotr import -e http://localhost:5020 --addRandomLabels ./directory/with/images
git clone [email protected]:aardvark-community/screenshotr.git
cd screenshotr
run
nuget Screenshotr.Client
using Screenshotr;
var filename = "example.jpg";
var endpoint = "http://localhost:5020";
var client = await ScreenshotrHttpClient.Connect(endpoint);
await client.ImportScreenshot(
buffer: File.ReadAllBytes(filename),
tags: new[] { "foo", "bar" },
timestamp: new FileInfo(filename).LastWriteTime
);
Usage:
screenshotr <command> <args*> [-e <endpoint> -k <apikey>]
You can either specify endpoint (-e) and apikey (-k) each
time you run the screenshotr command, or you can use the
connect command, which will remember the values for all subsequent
runs (until you disconnect).
screenshotr --version
Print version.
screenshotr --help
Print usage message.
Commands:
import [-t <tags>] <file|folder>* [-x <exclude>] [--addRandomLabels]
list [--skip <int>] [--take <int>]
tags
tail [-v|--verbose]
apikeys
create -d <description> [-r <role>]+ [--days <float>]
Available roles are: admin, importer
delete <apikey>
list
connect -e <endpoint> -k <apikey>
disconnect
Examples:
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 tags
screenshotr tail -v
screenshotr apikeys create -d "alice's import key" -r "importer"
screenshotr apikeys delete "2442d075d2f3888..."
screenshotr apikeys list
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
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
A ready-to-run docker image can be built by running
docker build -t screenshotr .
in the project's root directory.
docker run -p 5020:5020 screenshotr
By default, all data is stored inside the container and will disappear each time the
container is restarted. In order to permanently store your data, you have to bind a directory on your host machine to /data
inside the container, e.g.
docker run screenshotr -p 5020:5020 -v /my/permanent/storage:/data
Edit docker-compose.yml
to configure a permanent data directory on the host machine:
...
volumes:
- /my/permanent/storage:/data
...
There is also an example traefik configuration in docker-compose.traefik-example.yml
.
docker compose up -d