-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.env
118 lines (87 loc) · 5.72 KB
/
.env
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
###################################
# General
###################################
DB_PATH="./server/database.sqlite" # Path to the SQLite database file
SCREENSHOT_INTERVAL=3 # How often to take screenshots in seconds
SERVER_PORT=5000 # Port to run the server on
###################################
# Window Title Detection
###################################
# The window title method determines how the window title is extracted from the screenshot
# Valid options: kde, ocr
# KDE Method:
# Runs a dbus service at com.screendiary.bridge. It then launches a KWin script after each
# screenshot that collects the activeClient properties and sends them to the dbus service
# OCR Method:
# Scans the image from the top down for the presence of a titlebar color. If found, the image
# is then cropped and OCR is run against the cropped section. See below options for more detail
WINDOW_TITLE_METHOD="kde"
###################################
# Batch Processing
###################################
# Enable or disable batch processing. If either of these settings is set to 0, their contents will
# be processed in batches during user inactivity rather than as soon as the image is captured.
# Enable or disable running content OCR as soon as an image is captured.
# OCR tends to be more compute intensive, especially at higher resolutions
# If the window title method is set to ocr, then OCR is always run on titles to determine application name
LIVE_OCR_CONTENT=0 # Set to 1 to enable, 0 to disable.
# Enable or disable running browser URL extraction as soon as an image is captured.
# This is only applicable when CAPTURE_BROWSER_URL is enabled
LIVE_CAPTURE_BROWSER_URL=0 # Set to 1 to enable, 0 to disable
###################################
# Browser
###################################
# If enabled, ScreenDiary will attempt to extract the URL from the titlebar
CAPTURE_BROWSER_URL=1 # Set to 1 to enable, 0 to disable
# When browser capture is enabled, ScreenDiary will first look through the history for an exact title match. If that cannot be found this value is used.
# This value represents how many minutes ago in the browsers history should be considered for a partial title match
BROWSER_HISTORY_MATCH_TIME_RANGE=15
###################################
# OCR
###################################
# Enable or disable running content OCR on unknown applications
# An unknown application is anything without a titlebar
# This option is only applicable when using the "ocr" window title method
OCR_UNKNOWN_APPLICATIONS=0 # Set to 1 to enable, 0 to disable.
# Binarization attempts to convert the image to black and white to simplify the OCR
ENABLE_BINARIZATION=1 # Set to 1 to enable, 0 to disable
BINARIZATION_THRESHOLD=50 # Threshold for binarization
###################################
# OCR Window Title Method
###################################
# The OCR method of window title reading works by scanning the image from the top down for the presence of the titlebar color
# This is then cropped from the top of the image to the height of the titlebar. OCR is then run against the cropped image
TITLEBAR_COLOR="#31363b" # Color of the titlebar background
TITLEBAR_COLOR_X=105 # How many pixels left the TITLEBAR_COLOR should be sampled from, needs to account for Spectacles transparent borders
# How many pixels down the image should the TITLEBAR_COLOR be looked for, any pixels beyond this will not be considered
# The idea being if you've got this far down the image, there is no titlebar
TITLEBAR_COLOR_Y_LIMIT=250
TITLEBAR_HEIGHT=30 # How tall the titlebar is, used for cropping for OCR
TITLEBAR_LEFT_BOUNDARY=30 # How many pixels of the left side of the titlebar should be cropped, to remove window icons from getting caught in OCR
TITLEBAR_RIGHT_BOUNDARY=85 # How many pixels of the right side of the titlebar should be cropped, to remove window decorations
###################################
# Duplicate Frame Detection
###################################
# The below options are for reducing the amount of processing performed by attempting to identify when the screen has not
# changed content. Unless you have a specific reason, you should stick with the default difference hashing.
# Difference hashing attempts to determine if the frame should be updated by comparing the difference between two frames
# and determining if its above a threshold. If the difference is below the threshold, the screenshot is not kept and title
# This is the fastest and most accurate of the three methods.
ENABLE_DIFFERENCE_THRESHOLD=0 # Set to 1 to enable, 0 to disable
DIFFERENCE_THRESHOLD=5 # 0 - 64, where 64 is 100% of the pixels must have changed
# MD5 hashing attempts to determine if the previous frame and current frame are identical using MD5 hashing.
# This performs a bit faster than difference hashing, but will result in a lot of false positives, as even
# a single bit of difference in the MD5 hash will result in the frame being processed.
ENABLE_MD5_HASHING=0 # Set to 1 to enable, 0 to disable
# Perceptual hashing attempts to determine if the previous frame and current frame are identical using perceptual hashing
# If the frames are identical, the screenshot is not kept and title extraction/OCR will not be performed
ENABLE_PERCEPTUAL_HASHING=0 # Set to 1 to enable, 0 to disable
###################################
# Debugging
###################################
DEBUG=1 # Set to 1 to enable debug mode. This will write debug information to the console and the log files
DEBUG_OCR=0 # Set to 1 to enable OCR debug mode, this will write OCR results to a file in ./ocr
# DANGER! These operations are destructive!
DEBUG_RESET=1 # Set to 1 to clear the database and screenshots folder at startup
DEBUG_RESET_LOGS=1 # Set to 1 to clear the logs at startup
DEBUG_DBUS_WINDOW=0 # Set to 1 to debug dbus window data